diff --git a/CHANGES.md b/CHANGES.md index 7c6f8184a62..bb5aead61d8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,18 @@ # Changes +## [0.198.0](https://github.com/googleapis/google-api-go-client/compare/v0.197.0...v0.198.0) (2024-09-19) + + +### Features + +* **all:** Auto-regenerate discovery clients ([#2780](https://github.com/googleapis/google-api-go-client/issues/2780)) ([3c2f8ce](https://github.com/googleapis/google-api-go-client/commit/3c2f8ceed16459df46581c51793c8db52ff3277a)) +* **all:** Auto-regenerate discovery clients ([#2782](https://github.com/googleapis/google-api-go-client/issues/2782)) ([5a4dc60](https://github.com/googleapis/google-api-go-client/commit/5a4dc604e76b8cebb3275d3a5b706b8fa0c265b7)) +* **all:** Auto-regenerate discovery clients ([#2783](https://github.com/googleapis/google-api-go-client/issues/2783)) ([923816f](https://github.com/googleapis/google-api-go-client/commit/923816f92366360e67eceace16422d0b9c019982)) +* **all:** Auto-regenerate discovery clients ([#2784](https://github.com/googleapis/google-api-go-client/issues/2784)) ([786e8a8](https://github.com/googleapis/google-api-go-client/commit/786e8a8491515b4add373ccd6ba15cf46caadc1f)) +* **all:** Auto-regenerate discovery clients ([#2786](https://github.com/googleapis/google-api-go-client/issues/2786)) ([65d7953](https://github.com/googleapis/google-api-go-client/commit/65d7953dca7b4221c4b359f155bb790d9e0b450b)) +* **all:** Auto-regenerate discovery clients ([#2788](https://github.com/googleapis/google-api-go-client/issues/2788)) ([d27a832](https://github.com/googleapis/google-api-go-client/commit/d27a83225d99bd8bb57149dbd5b8c42c397dc6dd)) +* **all:** Auto-regenerate discovery clients ([#2789](https://github.com/googleapis/google-api-go-client/issues/2789)) ([c16dd63](https://github.com/googleapis/google-api-go-client/commit/c16dd63d7d928ecf95d94ccf19f59529d7c5ca46)) + ## [0.197.0](https://github.com/googleapis/google-api-go-client/compare/v0.196.0...v0.197.0) (2024-09-10) diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index c2feac876e6..31d433250cb 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1290,7 +1290,7 @@ } } }, - "revision": "20240811", + "revision": "20240908", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1357,6 +1357,35 @@ }, "type": "object" }, + "AccessScope": { + "description": "Access scope represents the client scope, etc. to which the settings will be applied to.", + "id": "AccessScope", + "properties": { + "clientScope": { + "$ref": "ClientScope", + "description": "Optional. Client scope for this access scope." + } + }, + "type": "object" + }, + "AccessSettings": { + "description": "Access settings represent the set of conditions that must be met for access to be granted. At least one of the fields must be set.", + "id": "AccessSettings", + "properties": { + "accessLevels": { + "description": "Optional. Access level that a user must have to be granted access. Only one access level is supported, not multiple. This repeated field must have exactly one element. Example: \"accessPolicies/9522/accessLevels/device_trusted\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "reauthSettings": { + "$ref": "ReauthSettings", + "description": "Optional. Reauth settings applied to user access on a given AccessScope." + } + }, + "type": "object" + }, "ApiOperation": { "description": "Identification for an API Operation.", "id": "ApiOperation", @@ -1550,6 +1579,17 @@ "properties": {}, "type": "object" }, + "ClientScope": { + "description": "Client scope represents the application, etc. subject to this binding's restrictions.", + "id": "ClientScope", + "properties": { + "restrictedClientApplication": { + "$ref": "Application", + "description": "Optional. The application that is subject to this binding's scope." + } + }, + "type": "object" + }, "CommitServicePerimetersRequest": { "description": "A request to commit dry-run specs in all Service Perimeters belonging to an Access Policy.", "id": "CommitServicePerimetersRequest", @@ -1860,12 +1900,23 @@ "description": "Immutable. Assigned by the server during creation. The last segment has an arbitrary length and has only URI unreserved characters (as defined by [RFC 3986 Section 2.3](https://tools.ietf.org/html/rfc3986#section-2.3)). Should not be specified by the client during creation. Example: \"organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N\"", "type": "string" }, + "reauthSettings": { + "$ref": "ReauthSettings", + "description": "Optional. GCSL policy for the group key." + }, "restrictedClientApplications": { "description": "Optional. A list of applications that are subject to this binding's restrictions. If the list is empty, the binding restrictions will universally apply to all applications.", "items": { "$ref": "Application" }, "type": "array" + }, + "scopedAccessSettings": { + "description": "Optional. A list of scoped access settings that set this binding's restrictions on a subset of applications. This field cannot be set if restricted_client_applications is set.", + "items": { + "$ref": "ScopedAccessSettings" + }, + "type": "array" } }, "type": "object" @@ -2231,6 +2282,47 @@ }, "type": "object" }, + "ReauthSettings": { + "description": "Stores settings related to Google Cloud Session Length including session duration, the type of challenge (i.e. method) they should face when their session expires, and other related settings.", + "id": "ReauthSettings", + "properties": { + "maxInactivity": { + "description": "Optional. How long a user is allowed to take between actions before a new access token must be issued. Presently only set for Cloud Apps.", + "format": "google-duration", + "type": "string" + }, + "reauthMethod": { + "description": "Optional. Reauth method when users GCP session is up.", + "enum": [ + "REAUTH_METHOD_UNSPECIFIED", + "LOGIN", + "SECURITY_KEY", + "PASSWORD" + ], + "enumDescriptions": [ + "If method undefined in API, we will use LOGIN by default.", + "The user will prompted to perform regular login. Users who are enrolled for two-step verification and haven't chosen to \"Remember this computer\" will be prompted for their second factor.", + "The user will be prompted to autheticate using their security key. If no security key has been configured, then we will fallback to LOGIN.", + "The user will be prompted for their password." + ], + "type": "string" + }, + "sessionLength": { + "description": "Optional. The session length. Setting this field to zero is equal to disabling. Reauth. Also can set infinite session by flipping the enabled bit to false below. If use_oidc_max_age is true, for OIDC apps, the session length will be the minimum of this field and OIDC max_age param.", + "format": "google-duration", + "type": "string" + }, + "sessionLengthEnabled": { + "description": "Optional. Big red button to turn off GCSL. When false, all fields set above will be disregarded and the session length is basically infinite.", + "type": "boolean" + }, + "useOidcMaxAge": { + "description": "Optional. Only useful for OIDC apps. When false, the OIDC max_age param, if passed in the authentication request will be ignored. When true, the re-auth period will be the minimum of the session_length field and the max_age OIDC param.", + "type": "boolean" + } + }, + "type": "object" + }, "ReplaceAccessLevelsRequest": { "description": "A request to replace all existing Access Levels in an Access Policy with the Access Levels provided. This is done atomically.", "id": "ReplaceAccessLevelsRequest", @@ -2295,6 +2387,25 @@ }, "type": "object" }, + "ScopedAccessSettings": { + "description": "A relationship between access settings and its scope.", + "id": "ScopedAccessSettings", + "properties": { + "activeSettings": { + "$ref": "AccessSettings", + "description": "Optional. Access settings for this scoped access settings. This field may be empty if dry_run_settings is set." + }, + "dryRunSettings": { + "$ref": "AccessSettings", + "description": "Optional. Dry-run access settings for this scoped access settings. This field may be empty if active_settings is set." + }, + "scope": { + "$ref": "AccessScope", + "description": "Optional. Application, etc. to which the access settings will be applied to. Implicitly, this is the scoped access settings key; as such, it must be unique and non-empty." + } + }, + "type": "object" + }, "ServicePerimeter": { "description": "`ServicePerimeter` describes a set of Google Cloud resources which can freely import and export data amongst themselves, but not export outside of the `ServicePerimeter`. If a request with a source within this `ServicePerimeter` has a target outside of the `ServicePerimeter`, the request will be blocked. Otherwise the request is allowed. There are two types of Service Perimeter - Regular and Bridge. Regular Service Perimeters cannot overlap, a single Google Cloud project or VPC network can only belong to a single regular Service Perimeter. Service Perimeter Bridges can contain only Google Cloud projects as members, a single Google Cloud project may belong to multiple Service Perimeter Bridges.", "id": "ServicePerimeter", diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index 8485702a802..5d1666f046d 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -346,6 +346,58 @@ func (s AccessPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AccessScope: Access scope represents the client scope, etc. to which the +// settings will be applied to. +type AccessScope struct { + // ClientScope: Optional. Client scope for this access scope. + ClientScope *ClientScope `json:"clientScope,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClientScope") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ClientScope") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AccessScope) MarshalJSON() ([]byte, error) { + type NoMethod AccessScope + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AccessSettings: Access settings represent the set of conditions that must be +// met for access to be granted. At least one of the fields must be set. +type AccessSettings struct { + // AccessLevels: Optional. Access level that a user must have to be granted + // access. Only one access level is supported, not multiple. This repeated + // field must have exactly one element. Example: + // "accessPolicies/9522/accessLevels/device_trusted" + AccessLevels []string `json:"accessLevels,omitempty"` + // ReauthSettings: Optional. Reauth settings applied to user access on a given + // AccessScope. + ReauthSettings *ReauthSettings `json:"reauthSettings,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccessLevels") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccessLevels") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AccessSettings) MarshalJSON() ([]byte, error) { + type NoMethod AccessSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ApiOperation: Identification for an API Operation. type ApiOperation struct { // MethodSelectors: API methods or permissions to allow. Method or permission @@ -682,6 +734,30 @@ func (s Binding) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// ClientScope: Client scope represents the application, etc. subject to this +// binding's restrictions. +type ClientScope struct { + // RestrictedClientApplication: Optional. The application that is subject to + // this binding's scope. + RestrictedClientApplication *Application `json:"restrictedClientApplication,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RestrictedClientApplication") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RestrictedClientApplication") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClientScope) MarshalJSON() ([]byte, error) { + type NoMethod ClientScope + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CommitServicePerimetersRequest: A request to commit dry-run specs in all // Service Perimeters belonging to an Access Policy. type CommitServicePerimetersRequest struct { @@ -1139,10 +1215,16 @@ type GcpUserAccessBinding struct { // Should not be specified by the client during creation. Example: // "organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N" Name string `json:"name,omitempty"` + // ReauthSettings: Optional. GCSL policy for the group key. + ReauthSettings *ReauthSettings `json:"reauthSettings,omitempty"` // RestrictedClientApplications: Optional. A list of applications that are // subject to this binding's restrictions. If the list is empty, the binding // restrictions will universally apply to all applications. RestrictedClientApplications []*Application `json:"restrictedClientApplications,omitempty"` + // ScopedAccessSettings: Optional. A list of scoped access settings that set + // this binding's restrictions on a subset of applications. This field cannot + // be set if restricted_client_applications is set. + ScopedAccessSettings []*ScopedAccessSettings `json:"scopedAccessSettings,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1783,6 +1865,58 @@ func (s Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ReauthSettings: Stores settings related to Google Cloud Session Length +// including session duration, the type of challenge (i.e. method) they should +// face when their session expires, and other related settings. +type ReauthSettings struct { + // MaxInactivity: Optional. How long a user is allowed to take between actions + // before a new access token must be issued. Presently only set for Cloud Apps. + MaxInactivity string `json:"maxInactivity,omitempty"` + // ReauthMethod: Optional. Reauth method when users GCP session is up. + // + // Possible values: + // "REAUTH_METHOD_UNSPECIFIED" - If method undefined in API, we will use + // LOGIN by default. + // "LOGIN" - The user will prompted to perform regular login. Users who are + // enrolled for two-step verification and haven't chosen to "Remember this + // computer" will be prompted for their second factor. + // "SECURITY_KEY" - The user will be prompted to autheticate using their + // security key. If no security key has been configured, then we will fallback + // to LOGIN. + // "PASSWORD" - The user will be prompted for their password. + ReauthMethod string `json:"reauthMethod,omitempty"` + // SessionLength: Optional. The session length. Setting this field to zero is + // equal to disabling. Reauth. Also can set infinite session by flipping the + // enabled bit to false below. If use_oidc_max_age is true, for OIDC apps, the + // session length will be the minimum of this field and OIDC max_age param. + SessionLength string `json:"sessionLength,omitempty"` + // SessionLengthEnabled: Optional. Big red button to turn off GCSL. When false, + // all fields set above will be disregarded and the session length is basically + // infinite. + SessionLengthEnabled bool `json:"sessionLengthEnabled,omitempty"` + // UseOidcMaxAge: Optional. Only useful for OIDC apps. When false, the OIDC + // max_age param, if passed in the authentication request will be ignored. When + // true, the re-auth period will be the minimum of the session_length field and + // the max_age OIDC param. + UseOidcMaxAge bool `json:"useOidcMaxAge,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxInactivity") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxInactivity") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReauthSettings) MarshalJSON() ([]byte, error) { + type NoMethod ReauthSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ReplaceAccessLevelsRequest: A request to replace all existing Access Levels // in an Access Policy with the Access Levels provided. This is done // atomically. @@ -1894,6 +2028,36 @@ func (s ReplaceServicePerimetersResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ScopedAccessSettings: A relationship between access settings and its scope. +type ScopedAccessSettings struct { + // ActiveSettings: Optional. Access settings for this scoped access settings. + // This field may be empty if dry_run_settings is set. + ActiveSettings *AccessSettings `json:"activeSettings,omitempty"` + // DryRunSettings: Optional. Dry-run access settings for this scoped access + // settings. This field may be empty if active_settings is set. + DryRunSettings *AccessSettings `json:"dryRunSettings,omitempty"` + // Scope: Optional. Application, etc. to which the access settings will be + // applied to. Implicitly, this is the scoped access settings key; as such, it + // must be unique and non-empty. + Scope *AccessScope `json:"scope,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveSettings") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveSettings") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ScopedAccessSettings) MarshalJSON() ([]byte, error) { + type NoMethod ScopedAccessSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ServicePerimeter: `ServicePerimeter` describes a set of Google Cloud // resources which can freely import and export data amongst themselves, but // not export outside of the `ServicePerimeter`. If a request with a source diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 0d7b826ae47..0caf7d6a412 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -4271,7 +4271,7 @@ ], "parameters": { "featureGroupId": { - "description": "Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name. This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within the project and location.", + "description": "Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within the project and location.", "location": "query", "type": "string" }, @@ -17760,7 +17760,7 @@ } } }, - "revision": "20240828", + "revision": "20240907", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -17899,8 +17899,16 @@ "type": "object" }, "CloudAiLargeModelsVisionRaiInfo": { + "description": "Next ID: 6", "id": "CloudAiLargeModelsVisionRaiInfo", "properties": { + "blockedEntities": { + "description": "List of blocked entities from the blocklist if it is detected.", + "items": { + "type": "string" + }, + "type": "array" + }, "detectedLabels": { "description": "The list of detected labels for different rai categories.", "items": { @@ -19844,6 +19852,10 @@ }, "type": "array" }, + "generationConfig": { + "$ref": "GoogleCloudAiplatformV1GenerationConfig", + "description": "Optional. Generation config that the model will use to generate the response." + }, "instances": { "description": "Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", "items": { @@ -20082,6 +20094,25 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest": { + "description": "Request message for [NotebookService.CreateNotebookExecutionJob]", + "id": "GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest", + "properties": { + "notebookExecutionJob": { + "$ref": "GoogleCloudAiplatformV1NotebookExecutionJob", + "description": "Required. The NotebookExecutionJob to create." + }, + "notebookExecutionJobId": { + "description": "Optional. User specified ID for the NotebookExecutionJob.", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Location to create the NotebookExecutionJob. Format: `projects/{project}/locations/{location}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1CreateNotebookRuntimeTemplateOperationMetadata": { "description": "Metadata information for NotebookService.CreateNotebookRuntimeTemplate.", "id": "GoogleCloudAiplatformV1CreateNotebookRuntimeTemplateOperationMetadata", @@ -21043,6 +21074,13 @@ "description": "Output only. Provides paths for users to send requests directly to the deployed index services running on Cloud via private services access. This field is populated if network is configured.", "readOnly": true }, + "pscAutomationConfigs": { + "description": "Optional. If set for PSC deployed index, PSC connection will be automatically created after deployment is done and the endpoint information is populated in private_endpoints.psc_automated_endpoints.", + "items": { + "$ref": "GoogleCloudAiplatformV1PSCAutomationConfig" + }, + "type": "array" + }, "reservedIpRanges": { "description": "Optional. A list of reserved ip ranges under the VPC network that can be used for this DeployedIndex. If set, we will deploy the index within the provided ip ranges. Otherwise, the index might be deployed to any ip ranges under the provided VPC network. The value should be the name of the address (https://cloud.google.com/compute/docs/reference/rest/v1/addresses) Example: ['vertex-ai-ip-range']. For more information about subnets and network IP ranges, please see https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges.", "items": { @@ -23053,7 +23091,7 @@ "description": "Required. Immutable. The BigQuery source URI that points to either a BigQuery Table or View." }, "dense": { - "description": "Optional. If set, all feature values will be fetched from a single row per unique entityId including nulls. If not set, will collapse all rows for each unique entityId into a singe row with any non-null values if present, if no non-null values are present will sync null. ex: If source has schema (entity_id, feature_timestamp, f0, f1) and values (e1, 2020-01-01T10:00:00.123Z, 10, 15) (e1, 2020-02-01T10:00:00.123Z, 20, null) If dense is set, (e1, 20, null) is synced to online stores. If dense is not set, (e1, 20, 15) is synced to online stores.", + "description": "Optional. If set, all feature values will be fetched from a single row per unique entityId including nulls. If not set, will collapse all rows for each unique entityId into a singe row with any non-null values if present, if no non-null values are present will sync null. ex: If source has schema `(entity_id, feature_timestamp, f0, f1)` and the following rows: `(e1, 2020-01-01T10:00:00.123Z, 10, 15)` `(e1, 2020-02-01T10:00:00.123Z, 20, null)` If dense is set, `(e1, 20, null)` is synced to online stores. If dense is not set, `(e1, 20, 15)` is synced to online stores.", "type": "boolean" }, "entityIdColumns": { @@ -23727,7 +23765,7 @@ "type": "string" }, "uri": { - "description": "Required. The BigQuery view/table URI that will be materialized on each manual sync trigger. The table/view is expected to have the following columns at least: Field name Type Mode corpus_id STRING REQUIRED/NULLABLE file_id STRING REQUIRED/NULLABLE chunk_id STRING REQUIRED/NULLABLE chunk_data_type STRING REQUIRED/NULLABLE chunk_data STRING REQUIRED/NULLABLE embeddings FLOAT REPEATED file_original_uri STRING REQUIRED/NULLABLE", + "description": "Required. The BigQuery view/table URI that will be materialized on each manual sync trigger. The table/view is expected to have the following columns and types at least: - `corpus_id` (STRING, NULLABLE/REQUIRED) - `file_id` (STRING, NULLABLE/REQUIRED) - `chunk_id` (STRING, NULLABLE/REQUIRED) - `chunk_data_type` (STRING, NULLABLE/REQUIRED) - `chunk_data` (STRING, NULLABLE/REQUIRED) - `embeddings` (FLOAT, REPEATED) - `file_original_uri` (STRING, NULLABLE/REQUIRED)", "type": "string" } }, @@ -24453,6 +24491,13 @@ "$ref": "GoogleCloudAiplatformV1GenerationConfig", "description": "Optional. Generation config." }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", + "type": "object" + }, "safetySettings": { "description": "Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.", "items": { @@ -29487,6 +29532,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PSCAutomationConfig": { + "description": "PSC config that is used to automatically create forwarding rule via ServiceConnectionMap.", + "id": "GoogleCloudAiplatformV1PSCAutomationConfig", + "properties": { + "network": { + "description": "Required. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in '12345', and {network} is network name.", + "type": "string" + }, + "projectId": { + "description": "Required. Project id used to create forwarding rule.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1PairwiseMetricInput": { "description": "Input for pairwise metric.", "id": "GoogleCloudAiplatformV1PairwiseMetricInput", @@ -32199,14 +32259,16 @@ "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", - "HARM_CATEGORY_SEXUALLY_EXPLICIT" + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_CIVIC_INTEGRITY" ], "enumDescriptions": [ "The harm category is unspecified.", "The harm category is hate speech.", "The harm category is dangerous content.", "The harm category is harassment.", - "The harm category is sexually explicit content." + "The harm category is sexually explicit content.", + "The harm category is civic integrity." ], "readOnly": true, "type": "string" @@ -32299,14 +32361,16 @@ "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", - "HARM_CATEGORY_SEXUALLY_EXPLICIT" + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_CIVIC_INTEGRITY" ], "enumDescriptions": [ "The harm category is unspecified.", "The harm category is hate speech.", "The harm category is dangerous content.", "The harm category is harassment.", - "The harm category is sexually explicit content." + "The harm category is sexually explicit content.", + "The harm category is civic integrity." ], "type": "string" }, @@ -32331,14 +32395,16 @@ "BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", - "BLOCK_NONE" + "BLOCK_NONE", + "OFF" ], "enumDescriptions": [ "Unspecified harm block threshold.", "Block low threshold and above (i.e. block more).", "Block medium threshold and above.", "Block only high threshold (i.e. block less).", - "Block none." + "Block none.", + "Turn off the safety filter." ], "type": "string" } @@ -32502,6 +32568,10 @@ "readOnly": true, "type": "boolean" }, + "createNotebookExecutionJobRequest": { + "$ref": "GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest", + "description": "Request for NotebookService.CreateNotebookExecutionJob." + }, "createPipelineJobRequest": { "$ref": "GoogleCloudAiplatformV1CreatePipelineJobRequest", "description": "Request for PipelineService.CreatePipelineJob. CreatePipelineJobRequest.parent field is required (format: projects/{project}/locations/{location})." @@ -32754,6 +32824,13 @@ "description": "Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.", "type": "object" }, + "propertyOrdering": { + "description": "Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.", + "items": { + "type": "string" + }, + "type": "array" + }, "required": { "description": "Optional. Required properties of Type.OBJECT.", "items": { @@ -38047,7 +38124,7 @@ "type": "object" }, "GoogleCloudAiplatformV1SupervisedTuningSpec": { - "description": "Tuning Spec for Supervised Tuning.", + "description": "Tuning Spec for Supervised Tuning for first party models.", "id": "GoogleCloudAiplatformV1SupervisedTuningSpec", "properties": { "hyperParameters": { diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index e51dab4d1cd..d51abdfd094 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -1551,7 +1551,11 @@ func (s *CloudAiLargeModelsVisionNamedBoundingBox) UnmarshalJSON(data []byte) er return nil } +// CloudAiLargeModelsVisionRaiInfo: Next ID: 6 type CloudAiLargeModelsVisionRaiInfo struct { + // BlockedEntities: List of blocked entities from the blocklist if it is + // detected. + BlockedEntities []string `json:"blockedEntities,omitempty"` // DetectedLabels: The list of detected labels for different rai categories. DetectedLabels []*CloudAiLargeModelsVisionRaiInfoDetectedLabels `json:"detectedLabels,omitempty"` // ModelName: The model name used to indexing into the RaiFilterConfig map. @@ -1564,13 +1568,13 @@ type CloudAiLargeModelsVisionRaiInfo struct { // Scores: List of rai scores mapping to the rai categories. Rounded to 1 // decimal place. Scores []float64 `json:"scores,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLabels") to + // ForceSendFields is a list of field names (e.g. "BlockedEntities") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLabels") to include in + // NullFields is a list of field names (e.g. "BlockedEntities") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -4383,6 +4387,9 @@ func (s GoogleCloudAiplatformV1CopyModelResponse) MarshalJSON() ([]byte, error) type GoogleCloudAiplatformV1CountTokensRequest struct { // Contents: Optional. Input content. Contents []*GoogleCloudAiplatformV1Content `json:"contents,omitempty"` + // GenerationConfig: Optional. Generation config that the model will use to + // generate the response. + GenerationConfig *GoogleCloudAiplatformV1GenerationConfig `json:"generationConfig,omitempty"` // Instances: Optional. The instances that are the input to token counting // call. Schema is identical to the prediction schema of the underlying model. Instances []interface{} `json:"instances,omitempty"` @@ -4838,6 +4845,35 @@ func (s GoogleCloudAiplatformV1CreateNotebookExecutionJobOperationMetadata) Mars return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest: Request message +// for [NotebookService.CreateNotebookExecutionJob] +type GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest struct { + // NotebookExecutionJob: Required. The NotebookExecutionJob to create. + NotebookExecutionJob *GoogleCloudAiplatformV1NotebookExecutionJob `json:"notebookExecutionJob,omitempty"` + // NotebookExecutionJobId: Optional. User specified ID for the + // NotebookExecutionJob. + NotebookExecutionJobId string `json:"notebookExecutionJobId,omitempty"` + // Parent: Required. The resource name of the Location to create the + // NotebookExecutionJob. Format: `projects/{project}/locations/{location}` + Parent string `json:"parent,omitempty"` + // ForceSendFields is a list of field names (e.g. "NotebookExecutionJob") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NotebookExecutionJob") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1CreateNotebookRuntimeTemplateOperationMetadata: // Metadata information for NotebookService.CreateNotebookRuntimeTemplate. type GoogleCloudAiplatformV1CreateNotebookRuntimeTemplateOperationMetadata struct { @@ -6161,6 +6197,11 @@ type GoogleCloudAiplatformV1DeployedIndex struct { // directly to the deployed index services running on Cloud via private // services access. This field is populated if network is configured. PrivateEndpoints *GoogleCloudAiplatformV1IndexPrivateEndpoints `json:"privateEndpoints,omitempty"` + // PscAutomationConfigs: Optional. If set for PSC deployed index, PSC + // connection will be automatically created after deployment is done and the + // endpoint information is populated in + // private_endpoints.psc_automated_endpoints. + PscAutomationConfigs []*GoogleCloudAiplatformV1PSCAutomationConfig `json:"pscAutomationConfigs,omitempty"` // ReservedIpRanges: Optional. A list of reserved ip ranges under the VPC // network that can be used for this DeployedIndex. If set, we will deploy the // index within the provided ip ranges. Otherwise, the index might be deployed @@ -8930,10 +8971,10 @@ type GoogleCloudAiplatformV1FeatureGroupBigQuery struct { // row per unique entityId including nulls. If not set, will collapse all rows // for each unique entityId into a singe row with any non-null values if // present, if no non-null values are present will sync null. ex: If source has - // schema (entity_id, feature_timestamp, f0, f1) and values (e1, - // 2020-01-01T10:00:00.123Z, 10, 15) (e1, 2020-02-01T10:00:00.123Z, 20, null) - // If dense is set, (e1, 20, null) is synced to online stores. If dense is not - // set, (e1, 20, 15) is synced to online stores. + // schema `(entity_id, feature_timestamp, f0, f1)` and the following rows: + // `(e1, 2020-01-01T10:00:00.123Z, 10, 15)` `(e1, 2020-02-01T10:00:00.123Z, 20, + // null)` If dense is set, `(e1, 20, null)` is synced to online stores. If + // dense is not set, `(e1, 20, 15)` is synced to online stores. Dense bool `json:"dense,omitempty"` // EntityIdColumns: Optional. Columns to construct entity_id / row keys. If not // provided defaults to `entity_id`. @@ -9897,10 +9938,11 @@ type GoogleCloudAiplatformV1FeatureViewVertexRagSource struct { RagCorpusId int64 `json:"ragCorpusId,omitempty,string"` // Uri: Required. The BigQuery view/table URI that will be materialized on each // manual sync trigger. The table/view is expected to have the following - // columns at least: Field name Type Mode corpus_id STRING REQUIRED/NULLABLE - // file_id STRING REQUIRED/NULLABLE chunk_id STRING REQUIRED/NULLABLE - // chunk_data_type STRING REQUIRED/NULLABLE chunk_data STRING REQUIRED/NULLABLE - // embeddings FLOAT REPEATED file_original_uri STRING REQUIRED/NULLABLE + // columns and types at least: - `corpus_id` (STRING, NULLABLE/REQUIRED) - + // `file_id` (STRING, NULLABLE/REQUIRED) - `chunk_id` (STRING, + // NULLABLE/REQUIRED) - `chunk_data_type` (STRING, NULLABLE/REQUIRED) - + // `chunk_data` (STRING, NULLABLE/REQUIRED) - `embeddings` (FLOAT, REPEATED) - + // `file_original_uri` (STRING, NULLABLE/REQUIRED) Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "RagCorpusId") to // unconditionally include in API requests. By default, fields with empty or @@ -11138,6 +11180,13 @@ type GoogleCloudAiplatformV1GenerateContentRequest struct { Contents []*GoogleCloudAiplatformV1Content `json:"contents,omitempty"` // GenerationConfig: Optional. Generation config. GenerationConfig *GoogleCloudAiplatformV1GenerationConfig `json:"generationConfig,omitempty"` + // Labels: Optional. The labels with user-defined metadata for the request. It + // is used for billing and reporting only. Label keys and values can be no + // longer than 63 characters (Unicode codepoints) and can only contain + // lowercase letters, numeric characters, underscores, and dashes. + // International characters are allowed. Label values are optional. Label keys + // must start with a letter. + Labels map[string]string `json:"labels,omitempty"` // SafetySettings: Optional. Per request settings for blocking unsafe content. // Enforced on GenerateContentResponse.candidates. SafetySettings []*GoogleCloudAiplatformV1SafetySetting `json:"safetySettings,omitempty"` @@ -17990,6 +18039,36 @@ func (s GoogleCloudAiplatformV1NotebookRuntimeTemplateRef) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PSCAutomationConfig: PSC config that is used to +// automatically create forwarding rule via ServiceConnectionMap. +type GoogleCloudAiplatformV1PSCAutomationConfig struct { + // Network: Required. The full name of the Google Compute Engine network + // (https://cloud.google.com/compute/docs/networks-and-firewalls#networks). + // Format + // (https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): + // `projects/{project}/global/networks/{network}`. Where {project} is a project + // number, as in '12345', and {network} is network name. + Network string `json:"network,omitempty"` + // ProjectId: Required. Project id used to create forwarding rule. + ProjectId string `json:"projectId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Network") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Network") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1PSCAutomationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PSCAutomationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1PairwiseMetricInput: Input for pairwise metric. type GoogleCloudAiplatformV1PairwiseMetricInput struct { // Instance: Required. Pairwise metric instance. @@ -21849,6 +21928,7 @@ type GoogleCloudAiplatformV1SafetyRating struct { // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually explicit // content. + // "HARM_CATEGORY_CIVIC_INTEGRITY" - The harm category is civic integrity. Category string `json:"category,omitempty"` // Probability: Output only. Harm probability levels in the content. // @@ -21960,6 +22040,7 @@ type GoogleCloudAiplatformV1SafetySetting struct { // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually explicit // content. + // "HARM_CATEGORY_CIVIC_INTEGRITY" - The harm category is civic integrity. Category string `json:"category,omitempty"` // Method: Optional. Specify if the threshold is used for probability or // severity score. If not specified, the threshold is used for probability @@ -21979,6 +22060,7 @@ type GoogleCloudAiplatformV1SafetySetting struct { // "BLOCK_MEDIUM_AND_ABOVE" - Block medium threshold and above. // "BLOCK_ONLY_HIGH" - Block only high threshold (i.e. block less). // "BLOCK_NONE" - Block none. + // "OFF" - Turn off the safety filter. Threshold string `json:"threshold,omitempty"` // ForceSendFields is a list of field names (e.g. "Category") to // unconditionally include in API requests. By default, fields with empty or @@ -22242,6 +22324,9 @@ type GoogleCloudAiplatformV1Schedule struct { // scheduled. New runs will be scheduled after the backfill is complete. // Default to false. CatchUp bool `json:"catchUp,omitempty"` + // CreateNotebookExecutionJobRequest: Request for + // NotebookService.CreateNotebookExecutionJob. + CreateNotebookExecutionJobRequest *GoogleCloudAiplatformV1CreateNotebookExecutionJobRequest `json:"createNotebookExecutionJobRequest,omitempty"` // CreatePipelineJobRequest: Request for PipelineService.CreatePipelineJob. // CreatePipelineJobRequest.parent field is required (format: // projects/{project}/locations/{location}). @@ -22455,6 +22540,9 @@ type GoogleCloudAiplatformV1Schema struct { // Properties: Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of // Type.OBJECT. Properties map[string]GoogleCloudAiplatformV1Schema `json:"properties,omitempty"` + // PropertyOrdering: Optional. The order of the properties. Not a standard + // field in open api spec. Only used to support the order of the properties. + PropertyOrdering []string `json:"propertyOrdering,omitempty"` // Required: Optional. Required properties of Type.OBJECT. Required []string `json:"required,omitempty"` // Title: Optional. The title of the Schema. @@ -30993,7 +31081,7 @@ func (s *GoogleCloudAiplatformV1SupervisedTuningDatasetDistributionDatasetBucket } // GoogleCloudAiplatformV1SupervisedTuningSpec: Tuning Spec for Supervised -// Tuning. +// Tuning for first party models. type GoogleCloudAiplatformV1SupervisedTuningSpec struct { // HyperParameters: Optional. Hyperparameters for SFT. HyperParameters *GoogleCloudAiplatformV1SupervisedHyperParameters `json:"hyperParameters,omitempty"` @@ -48711,9 +48799,9 @@ func (r *ProjectsLocationsFeatureGroupsService) Create(parent string, googleclou // FeatureGroupId sets the optional parameter "featureGroupId": Required. The // ID to use for this FeatureGroup, which will become the final component of -// the FeatureGroup's resource name. This value may be up to 60 characters, and -// valid characters are `[a-z0-9_]`. The first character cannot be a number. -// The value must be unique within the project and location. +// the FeatureGroup's resource name. This value may be up to 128 characters, +// and valid characters are `[a-z0-9_]`. The first character cannot be a +// number. The value must be unique within the project and location. func (c *ProjectsLocationsFeatureGroupsCreateCall) FeatureGroupId(featureGroupId string) *ProjectsLocationsFeatureGroupsCreateCall { c.urlParams_.Set("featureGroupId", featureGroupId) return c diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 8a3a56881c8..daf78eacc4e 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -894,6 +894,62 @@ "resources": { "locations": { "methods": { + "augmentPrompt": { + "description": "Given an input prompt, it returns augmented prompt from vertex rag store to guide LLM towards generating grounded responses.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:augmentPrompt", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.augmentPrompt", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the Location from which to augment prompt. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}:augmentPrompt", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1AugmentPromptRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1AugmentPromptResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "corroborateContent": { + "description": "Given an input text, it returns a score that evaluates the factuality of the text. It also extracts and returns claims from the text and provides supporting facts.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:corroborateContent", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.corroborateContent", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the Location from which to corroborate text. The users must have permission to make a call in the project. Format: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}:corroborateContent", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1CorroborateContentRequest" + }, + "response": { + "$ref": "GoogleCloudAiplatformV1beta1CorroborateContentResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "evaluateInstances": { "description": "Evaluates instances based on a given metric.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:evaluateInstances", @@ -5947,7 +6003,7 @@ ], "parameters": { "featureGroupId": { - "description": "Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name. This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within the project and location.", + "description": "Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within the project and location.", "location": "query", "type": "string" }, @@ -21087,7 +21143,7 @@ } } }, - "revision": "20240828", + "revision": "20240907", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -21226,8 +21282,16 @@ "type": "object" }, "CloudAiLargeModelsVisionRaiInfo": { + "description": "Next ID: 6", "id": "CloudAiLargeModelsVisionRaiInfo", "properties": { + "blockedEntities": { + "description": "List of blocked entities from the blocklist if it is detected.", + "items": { + "type": "string" + }, + "type": "array" + }, "detectedLabels": { "description": "The list of detected labels for different rai categories.", "items": { @@ -21742,6 +21806,30 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ArtifactTypeSchema": { + "description": "The definition of a artifact type in MLMD.", + "id": "GoogleCloudAiplatformV1beta1ArtifactTypeSchema", + "properties": { + "instanceSchema": { + "description": "Contains a raw YAML string, describing the format of the properties of the type.", + "type": "string" + }, + "schemaTitle": { + "description": "The name of the type. The format of the title must be: `.`. Examples: - `aiplatform.Model` - `acme.CustomModel` When this field is set, the type must be pre-registered in the MLMD store.", + "type": "string" + }, + "schemaUri": { + "deprecated": true, + "description": "Points to a YAML file stored on Cloud Storage describing the format. Deprecated. Use PipelineArtifactTypeSchema.schema_title or PipelineArtifactTypeSchema.instance_schema instead.", + "type": "string" + }, + "schemaVersion": { + "description": "The schema version of the artifact. If the value is not set, it defaults to the latest version in the system.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1AssignNotebookRuntimeOperationMetadata": { "description": "Metadata information for NotebookService.AssignNotebookRuntime.", "id": "GoogleCloudAiplatformV1beta1AssignNotebookRuntimeOperationMetadata", @@ -21825,6 +21913,64 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1AugmentPromptRequest": { + "description": "Request message for AugmentPrompt.", + "id": "GoogleCloudAiplatformV1beta1AugmentPromptRequest", + "properties": { + "contents": { + "description": "Optional. Input content to augment, only text format is supported for now.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Content" + }, + "type": "array" + }, + "model": { + "$ref": "GoogleCloudAiplatformV1beta1AugmentPromptRequestModel", + "description": "Optional. Metadata of the backend deployed model." + }, + "vertexRagStore": { + "$ref": "GoogleCloudAiplatformV1beta1VertexRagStore", + "description": "Optional. Retrieves contexts from the Vertex RagStore." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1AugmentPromptRequestModel": { + "description": "Metadata of the backend deployed model.", + "id": "GoogleCloudAiplatformV1beta1AugmentPromptRequestModel", + "properties": { + "model": { + "description": "Optional. The model that the user will send the augmented prompt for content generation.", + "type": "string" + }, + "modelVersion": { + "description": "Optional. The model version of the backend deployed model.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1AugmentPromptResponse": { + "description": "Response message for AugmentPrompt.", + "id": "GoogleCloudAiplatformV1beta1AugmentPromptResponse", + "properties": { + "augmentedPrompt": { + "description": "Augmented prompt, only text format is supported for now.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Content" + }, + "type": "array" + }, + "facts": { + "description": "Retrieved facts from RAG data sources.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Fact" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1AuthConfig": { "description": "Auth configuration to run the extension.", "id": "GoogleCloudAiplatformV1beta1AuthConfig", @@ -23149,6 +23295,36 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Claim": { + "description": "Claim that is extracted from the input text and facts that support it.", + "id": "GoogleCloudAiplatformV1beta1Claim", + "properties": { + "endIndex": { + "description": "Index in the input text where the claim ends (exclusive).", + "format": "int32", + "type": "integer" + }, + "factIndexes": { + "description": "Indexes of the facts supporting this claim.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "score": { + "description": "Confidence score of this corroboration.", + "format": "float", + "type": "number" + }, + "startIndex": { + "description": "Index in the input text where the claim starts (inclusive).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1CoherenceInput": { "description": "Input for coherence metric.", "id": "GoogleCloudAiplatformV1beta1CoherenceInput", @@ -23506,6 +23682,59 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1CorroborateContentRequest": { + "description": "Request message for CorroborateContent.", + "id": "GoogleCloudAiplatformV1beta1CorroborateContentRequest", + "properties": { + "content": { + "$ref": "GoogleCloudAiplatformV1beta1Content", + "description": "Optional. Input content to corroborate, only text format is supported for now." + }, + "facts": { + "description": "Optional. Facts used to generate the text can also be used to corroborate the text.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Fact" + }, + "type": "array" + }, + "parameters": { + "$ref": "GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters", + "description": "Optional. Parameters that can be set to override default settings per request." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters": { + "description": "Parameters that can be overrided per request.", + "id": "GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters", + "properties": { + "citationThreshold": { + "description": "Optional. Only return claims with citation score larger than the threshold.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1CorroborateContentResponse": { + "description": "Response message for CorroborateContent.", + "id": "GoogleCloudAiplatformV1beta1CorroborateContentResponse", + "properties": { + "claims": { + "description": "Claims that are extracted from the input content and facts that support the claims.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Claim" + }, + "type": "array" + }, + "corroborationScore": { + "description": "Confidence score of corroborating content. Value is [0,1] with 1 is the most confidence.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1CountTokensRequest": { "description": "Request message for PredictionService.CountTokens.", "id": "GoogleCloudAiplatformV1beta1CountTokensRequest", @@ -23517,6 +23746,10 @@ }, "type": "array" }, + "generationConfig": { + "$ref": "GoogleCloudAiplatformV1beta1GenerationConfig", + "description": "Optional. Generation config that the model will use to generate the response." + }, "instances": { "description": "Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", "items": { @@ -24934,6 +25167,13 @@ "description": "Output only. Provides paths for users to send requests directly to the deployed index services running on Cloud via private services access. This field is populated if network is configured.", "readOnly": true }, + "pscAutomationConfigs": { + "description": "Optional. If set for PSC deployed index, PSC connection will be automatically created after deployment is done and the endpoint information is populated in private_endpoints.psc_automated_endpoints.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1PSCAutomationConfig" + }, + "type": "array" + }, "reservedIpRanges": { "description": "Optional. A list of reserved ip ranges under the VPC network that can be used for this DeployedIndex. If set, we will deploy the index within the provided ip ranges. Otherwise, the index might be deployed to any ip ranges under the provided VPC network. The value should be the name of the address (https://cloud.google.com/compute/docs/reference/rest/v1/addresses) Example: ['vertex-ai-ip-range']. For more information about subnets and network IP ranges, please see https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges.", "items": { @@ -27041,6 +27281,34 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Fact": { + "description": "The fact used in grounding.", + "id": "GoogleCloudAiplatformV1beta1Fact", + "properties": { + "query": { + "description": "Query that is used to retrieve this fact.", + "type": "string" + }, + "summary": { + "description": "If present, the summary/snippet of the fact.", + "type": "string" + }, + "title": { + "description": "If present, it refers to the title of this fact.", + "type": "string" + }, + "uri": { + "description": "If present, this uri links to the source of the fact.", + "type": "string" + }, + "vectorDistance": { + "description": "If present, the distance between the query vector and this fact vector.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Feature": { "description": "Feature Metadata information. For example, color is a feature that describes an apple.", "id": "GoogleCloudAiplatformV1beta1Feature", @@ -27193,7 +27461,7 @@ "description": "Required. Immutable. The BigQuery source URI that points to either a BigQuery Table or View." }, "dense": { - "description": "Optional. If set, all feature values will be fetched from a single row per unique entityId including nulls. If not set, will collapse all rows for each unique entityId into a singe row with any non-null values if present, if no non-null values are present will sync null. ex: If source has schema (entity_id, feature_timestamp, f0, f1) and values (e1, 2020-01-01T10:00:00.123Z, 10, 15) (e1, 2020-02-01T10:00:00.123Z, 20, null) If dense is set, (e1, 20, null) is synced to online stores. If dense is not set, (e1, 20, 15) is synced to online stores.", + "description": "Optional. If set, all feature values will be fetched from a single row per unique entityId including nulls. If not set, will collapse all rows for each unique entityId into a singe row with any non-null values if present, if no non-null values are present will sync null. ex: If source has schema `(entity_id, feature_timestamp, f0, f1)` and the following rows: `(e1, 2020-01-01T10:00:00.123Z, 10, 15)` `(e1, 2020-02-01T10:00:00.123Z, 20, null)` If dense is set, `(e1, 20, null)` is synced to online stores. If dense is not set, `(e1, 20, 15)` is synced to online stores.", "type": "boolean" }, "entityIdColumns": { @@ -27976,7 +28244,7 @@ "type": "string" }, "uri": { - "description": "Required. The BigQuery view/table URI that will be materialized on each manual sync trigger. The table/view is expected to have the following columns at least: Field name Type Mode corpus_id STRING REQUIRED/NULLABLE file_id STRING REQUIRED/NULLABLE chunk_id STRING REQUIRED/NULLABLE chunk_data_type STRING REQUIRED/NULLABLE chunk_data STRING REQUIRED/NULLABLE embeddings FLOAT REPEATED file_original_uri STRING REQUIRED/NULLABLE", + "description": "Required. The BigQuery view/table URI that will be materialized on each manual sync trigger. The table/view is expected to have the following columns and types at least: - `corpus_id` (STRING, NULLABLE/REQUIRED) - `file_id` (STRING, NULLABLE/REQUIRED) - `chunk_id` (STRING, NULLABLE/REQUIRED) - `chunk_data_type` (STRING, NULLABLE/REQUIRED) - `chunk_data` (STRING, NULLABLE/REQUIRED) - `embeddings` (FLOAT, REPEATED) - `file_original_uri` (STRING, NULLABLE/REQUIRED)", "type": "string" } }, @@ -28794,6 +29062,13 @@ "$ref": "GoogleCloudAiplatformV1beta1GenerationConfig", "description": "Optional. Generation config." }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", + "type": "object" + }, "safetySettings": { "description": "Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.", "items": { @@ -29695,6 +29970,14 @@ "format": "int32", "type": "integer" }, + "partialFailureBigquerySink": { + "$ref": "GoogleCloudAiplatformV1beta1BigQueryDestination", + "description": "The BigQuery destination to write partial failures to. It should be a bigquery table resource name (e.g. \"bq://projectId.bqDatasetId.bqTableId\"). If the dataset id does not exist, it will be created. If the table does not exist, it will be created with the expected schema. If the table exists, the schema will be validated and data will be added to this existing table." + }, + "partialFailureGcsSink": { + "$ref": "GoogleCloudAiplatformV1beta1GcsDestination", + "description": "The Cloud Storage path to write partial failures to." + }, "ragFileChunkingConfig": { "$ref": "GoogleCloudAiplatformV1beta1RagFileChunkingConfig", "description": "Specifies the size and overlap of chunks after importing RagFiles." @@ -34975,6 +35258,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PSCAutomationConfig": { + "description": "PSC config that is used to automatically create forwarding rule via ServiceConnectionMap.", + "id": "GoogleCloudAiplatformV1beta1PSCAutomationConfig", + "properties": { + "network": { + "description": "Required. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in '12345', and {network} is network name.", + "type": "string" + }, + "projectId": { + "description": "Required. Project id used to create forwarding rule.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PairwiseMetricInput": { "description": "Input for pairwise metric.", "id": "GoogleCloudAiplatformV1beta1PairwiseMetricInput", @@ -35449,6 +35747,12 @@ "description": "The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to which the Pipeline Job's workload should be peered. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. Private services access must already be configured for the network. Pipeline job will apply the network configuration to the Google Cloud resources being launched, if applied, such as Vertex AI Training or Dataflow job. If left unspecified, the workload is not peered with any network.", "type": "string" }, + "originalPipelineJobId": { + "description": "Output only. The original pipeline job id if this pipeline job is a rerun of a previous pipeline job.", + "format": "int64", + "readOnly": true, + "type": "string" + }, "pipelineSpec": { "additionalProperties": { "description": "Properties of the object.", @@ -35457,6 +35761,14 @@ "description": "The spec of the pipeline.", "type": "object" }, + "pipelineTaskRerunConfigs": { + "description": "Output only. The rerun configs for each task in the pipeline job. By default, the rerun will: 1. Use the same input artifacts as the original run. 2. Use the same input parameters as the original run. 3. Skip all the tasks that are already succeeded in the original run. 4. Rerun all the tasks that are not succeeded in the original run. By providing this field, users can override the default behavior and specify the rerun config for each task.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1PipelineTaskRerunConfig" + }, + "readOnly": true, + "type": "array" + }, "preflightValidations": { "description": "Optional. Whether to do component level validations before job creation.", "type": "boolean" @@ -35867,6 +36179,77 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PipelineTaskRerunConfig": { + "description": "User provided rerun config to submit a rerun pipelinejob. This includes 1. Which task to rerun 2. User override input parameters and artifacts.", + "id": "GoogleCloudAiplatformV1beta1PipelineTaskRerunConfig", + "properties": { + "inputs": { + "$ref": "GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigInputs", + "description": "Output only. The runtime input of the task overridden by the user.", + "readOnly": true + }, + "skipDownstreamTasks": { + "description": "Output only. Whether to skip downstream tasks. Default value is False.", + "readOnly": true, + "type": "boolean" + }, + "skipTask": { + "description": "Output only. Whether to skip this task. Default value is False.", + "readOnly": true, + "type": "boolean" + }, + "taskId": { + "description": "Output only. The system generated ID of the task. Retrieved from original run.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "taskName": { + "description": "Output only. The name of the task.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigArtifactList": { + "description": "A list of artifact metadata.", + "id": "GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigArtifactList", + "properties": { + "artifacts": { + "description": "Output only. A list of artifact metadata.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1RuntimeArtifact" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigInputs": { + "description": "Runtime inputs data of the task.", + "id": "GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigInputs", + "properties": { + "artifacts": { + "additionalProperties": { + "$ref": "GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigArtifactList" + }, + "description": "Output only. Input artifacts.", + "readOnly": true, + "type": "object" + }, + "parameterValues": { + "additionalProperties": { + "type": "any" + }, + "description": "Output only. Input parameters.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PipelineTemplateMetadata": { "description": "Pipeline template metadata if PipelineJob.template_uri is from supported template registry. Currently, the only supported registry is Artifact Registry.", "id": "GoogleCloudAiplatformV1beta1PipelineTemplateMetadata", @@ -37495,6 +37878,10 @@ "$ref": "GoogleCloudAiplatformV1beta1ApiAuth", "description": "Authentication config for the chosen Vector DB." }, + "pinecone": { + "$ref": "GoogleCloudAiplatformV1beta1RagVectorDbConfigPinecone", + "description": "The config for the Pinecone." + }, "ragManagedDb": { "$ref": "GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb", "description": "The config for the RAG-managed Vector DB." @@ -37503,6 +37890,10 @@ "$ref": "GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore", "description": "The config for the Vertex Feature Store." }, + "vertexVectorSearch": { + "$ref": "GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexVectorSearch", + "description": "The config for the Vertex Vector Search." + }, "weaviate": { "$ref": "GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate", "description": "The config for the Weaviate." @@ -37510,6 +37901,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RagVectorDbConfigPinecone": { + "description": "The config for the Pinecone.", + "id": "GoogleCloudAiplatformV1beta1RagVectorDbConfigPinecone", + "properties": { + "indexName": { + "description": "Pinecone index name. This value cannot be changed after it's set.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb": { "description": "The config for the default RAG-managed Vector DB.", "id": "GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb", @@ -37527,6 +37929,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexVectorSearch": { + "description": "The config for the Vertex Vector Search.", + "id": "GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexVectorSearch", + "properties": { + "index": { + "description": "The resource name of the Index. Format: `projects/{project}/locations/{location}/indexes/{index}`", + "type": "string" + }, + "indexEndpoint": { + "description": "The resource name of the Index Endpoint. Format: `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate": { "description": "The config for the Weaviate.", "id": "GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate", @@ -38383,6 +38800,49 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RuntimeArtifact": { + "description": "The definition of a runtime artifact.", + "id": "GoogleCloudAiplatformV1beta1RuntimeArtifact", + "properties": { + "customProperties": { + "additionalProperties": { + "$ref": "GoogleCloudAiplatformV1beta1Value" + }, + "deprecated": true, + "description": "The custom properties of the artifact. Deprecated. Use RuntimeArtifact.metadata instead.", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Properties of the Artifact.", + "type": "object" + }, + "name": { + "description": "The name of an artifact.", + "type": "string" + }, + "properties": { + "additionalProperties": { + "$ref": "GoogleCloudAiplatformV1beta1Value" + }, + "deprecated": true, + "description": "The properties of the artifact. Deprecated. Use RuntimeArtifact.metadata instead.", + "type": "object" + }, + "type": { + "$ref": "GoogleCloudAiplatformV1beta1ArtifactTypeSchema", + "description": "The type of the artifact." + }, + "uri": { + "description": "The URI of the artifact.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RuntimeConfig": { "description": "Runtime configuration to run the extension.", "id": "GoogleCloudAiplatformV1beta1RuntimeConfig", @@ -38476,14 +38936,16 @@ "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", - "HARM_CATEGORY_SEXUALLY_EXPLICIT" + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_CIVIC_INTEGRITY" ], "enumDescriptions": [ "The harm category is unspecified.", "The harm category is hate speech.", "The harm category is dangerous content.", "The harm category is harassment.", - "The harm category is sexually explicit content." + "The harm category is sexually explicit content.", + "The harm category is civic integrity." ], "readOnly": true, "type": "string" @@ -38576,14 +39038,16 @@ "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", - "HARM_CATEGORY_SEXUALLY_EXPLICIT" + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_CIVIC_INTEGRITY" ], "enumDescriptions": [ "The harm category is unspecified.", "The harm category is hate speech.", "The harm category is dangerous content.", "The harm category is harassment.", - "The harm category is sexually explicit content." + "The harm category is sexually explicit content.", + "The harm category is civic integrity." ], "type": "string" }, @@ -38608,14 +39072,16 @@ "BLOCK_LOW_AND_ABOVE", "BLOCK_MEDIUM_AND_ABOVE", "BLOCK_ONLY_HIGH", - "BLOCK_NONE" + "BLOCK_NONE", + "OFF" ], "enumDescriptions": [ "Unspecified harm block threshold.", "Block low threshold and above (i.e. block more).", "Block medium threshold and above.", "Block only high threshold (i.e. block less).", - "Block none." + "Block none.", + "Turn off the safety filter." ], "type": "string" } @@ -39039,6 +39505,13 @@ "description": "Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.", "type": "object" }, + "propertyOrdering": { + "description": "Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.", + "items": { + "type": "string" + }, + "type": "array" + }, "required": { "description": "Optional. Required properties of Type.OBJECT.", "items": { @@ -44494,7 +44967,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1SupervisedTuningSpec": { - "description": "Tuning Spec for Supervised Tuning.", + "description": "Tuning Spec for Supervised Tuning for first party models.", "id": "GoogleCloudAiplatformV1beta1SupervisedTuningSpec", "properties": { "hyperParameters": { diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 0cdbb2dc4b5..d4551ea3885 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -1875,7 +1875,11 @@ func (s *CloudAiLargeModelsVisionNamedBoundingBox) UnmarshalJSON(data []byte) er return nil } +// CloudAiLargeModelsVisionRaiInfo: Next ID: 6 type CloudAiLargeModelsVisionRaiInfo struct { + // BlockedEntities: List of blocked entities from the blocklist if it is + // detected. + BlockedEntities []string `json:"blockedEntities,omitempty"` // DetectedLabels: The list of detected labels for different rai categories. DetectedLabels []*CloudAiLargeModelsVisionRaiInfoDetectedLabels `json:"detectedLabels,omitempty"` // ModelName: The model name used to indexing into the RaiFilterConfig map. @@ -1888,13 +1892,13 @@ type CloudAiLargeModelsVisionRaiInfo struct { // Scores: List of rai scores mapping to the rai categories. Rounded to 1 // decimal place. Scores []float64 `json:"scores,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLabels") to + // ForceSendFields is a list of field names (e.g. "BlockedEntities") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLabels") to include in + // NullFields is a list of field names (e.g. "BlockedEntities") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -2544,6 +2548,41 @@ func (s GoogleCloudAiplatformV1beta1Artifact) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ArtifactTypeSchema: The definition of a artifact +// type in MLMD. +type GoogleCloudAiplatformV1beta1ArtifactTypeSchema struct { + // InstanceSchema: Contains a raw YAML string, describing the format of the + // properties of the type. + InstanceSchema string `json:"instanceSchema,omitempty"` + // SchemaTitle: The name of the type. The format of the title must be: `.`. + // Examples: - `aiplatform.Model` - `acme.CustomModel` When this field is set, + // the type must be pre-registered in the MLMD store. + SchemaTitle string `json:"schemaTitle,omitempty"` + // SchemaUri: Points to a YAML file stored on Cloud Storage describing the + // format. Deprecated. Use PipelineArtifactTypeSchema.schema_title or + // PipelineArtifactTypeSchema.instance_schema instead. + SchemaUri string `json:"schemaUri,omitempty"` + // SchemaVersion: The schema version of the artifact. If the value is not set, + // it defaults to the latest version in the system. + SchemaVersion string `json:"schemaVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "InstanceSchema") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "InstanceSchema") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1ArtifactTypeSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ArtifactTypeSchema + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1AssignNotebookRuntimeOperationMetadata: Metadata // information for NotebookService.AssignNotebookRuntime. type GoogleCloudAiplatformV1beta1AssignNotebookRuntimeOperationMetadata struct { @@ -2695,6 +2734,88 @@ func (s *GoogleCloudAiplatformV1beta1Attribution) UnmarshalJSON(data []byte) err return nil } +// GoogleCloudAiplatformV1beta1AugmentPromptRequest: Request message for +// AugmentPrompt. +type GoogleCloudAiplatformV1beta1AugmentPromptRequest struct { + // Contents: Optional. Input content to augment, only text format is supported + // for now. + Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` + // Model: Optional. Metadata of the backend deployed model. + Model *GoogleCloudAiplatformV1beta1AugmentPromptRequestModel `json:"model,omitempty"` + // VertexRagStore: Optional. Retrieves contexts from the Vertex RagStore. + VertexRagStore *GoogleCloudAiplatformV1beta1VertexRagStore `json:"vertexRagStore,omitempty"` + // ForceSendFields is a list of field names (e.g. "Contents") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Contents") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1AugmentPromptRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1AugmentPromptRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1AugmentPromptRequestModel: Metadata of the +// backend deployed model. +type GoogleCloudAiplatformV1beta1AugmentPromptRequestModel struct { + // Model: Optional. The model that the user will send the augmented prompt for + // content generation. + Model string `json:"model,omitempty"` + // ModelVersion: Optional. The model version of the backend deployed model. + ModelVersion string `json:"modelVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "Model") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1AugmentPromptRequestModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1AugmentPromptRequestModel + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1AugmentPromptResponse: Response message for +// AugmentPrompt. +type GoogleCloudAiplatformV1beta1AugmentPromptResponse struct { + // AugmentedPrompt: Augmented prompt, only text format is supported for now. + AugmentedPrompt []*GoogleCloudAiplatformV1beta1Content `json:"augmentedPrompt,omitempty"` + // Facts: Retrieved facts from RAG data sources. + Facts []*GoogleCloudAiplatformV1beta1Fact `json:"facts,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AugmentedPrompt") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AugmentedPrompt") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1AugmentPromptResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1AugmentPromptResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1AuthConfig: Auth configuration to run the // extension. type GoogleCloudAiplatformV1beta1AuthConfig struct { @@ -4659,6 +4780,49 @@ func (s GoogleCloudAiplatformV1beta1CitationMetadata) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Claim: Claim that is extracted from the input +// text and facts that support it. +type GoogleCloudAiplatformV1beta1Claim struct { + // EndIndex: Index in the input text where the claim ends (exclusive). + EndIndex int64 `json:"endIndex,omitempty"` + // FactIndexes: Indexes of the facts supporting this claim. + FactIndexes []int64 `json:"factIndexes,omitempty"` + // Score: Confidence score of this corroboration. + Score float64 `json:"score,omitempty"` + // StartIndex: Index in the input text where the claim starts (inclusive). + StartIndex int64 `json:"startIndex,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1Claim) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Claim + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1Claim) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1Claim + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + // GoogleCloudAiplatformV1beta1CoherenceInput: Input for coherence metric. type GoogleCloudAiplatformV1beta1CoherenceInput struct { // Instance: Required. Coherence instance. @@ -5166,11 +5330,126 @@ func (s GoogleCloudAiplatformV1beta1CorpusStatus) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1CorroborateContentRequest: Request message for +// CorroborateContent. +type GoogleCloudAiplatformV1beta1CorroborateContentRequest struct { + // Content: Optional. Input content to corroborate, only text format is + // supported for now. + Content *GoogleCloudAiplatformV1beta1Content `json:"content,omitempty"` + // Facts: Optional. Facts used to generate the text can also be used to + // corroborate the text. + Facts []*GoogleCloudAiplatformV1beta1Fact `json:"facts,omitempty"` + // Parameters: Optional. Parameters that can be set to override default + // settings per request. + Parameters *GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters `json:"parameters,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Content") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1CorroborateContentRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CorroborateContentRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters: Parameters +// that can be overrided per request. +type GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters struct { + // CitationThreshold: Optional. Only return claims with citation score larger + // than the threshold. + CitationThreshold float64 `json:"citationThreshold,omitempty"` + // ForceSendFields is a list of field names (e.g. "CitationThreshold") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CitationThreshold") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1CorroborateContentRequestParameters + var s1 struct { + CitationThreshold gensupport.JSONFloat64 `json:"citationThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.CitationThreshold = float64(s1.CitationThreshold) + return nil +} + +// GoogleCloudAiplatformV1beta1CorroborateContentResponse: Response message for +// CorroborateContent. +type GoogleCloudAiplatformV1beta1CorroborateContentResponse struct { + // Claims: Claims that are extracted from the input content and facts that + // support the claims. + Claims []*GoogleCloudAiplatformV1beta1Claim `json:"claims,omitempty"` + // CorroborationScore: Confidence score of corroborating content. Value is + // [0,1] with 1 is the most confidence. + CorroborationScore float64 `json:"corroborationScore,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Claims") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Claims") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1CorroborateContentResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1CorroborateContentResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1CorroborateContentResponse) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1CorroborateContentResponse + var s1 struct { + CorroborationScore gensupport.JSONFloat64 `json:"corroborationScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.CorroborationScore = float64(s1.CorroborationScore) + return nil +} + // GoogleCloudAiplatformV1beta1CountTokensRequest: Request message for // PredictionService.CountTokens. type GoogleCloudAiplatformV1beta1CountTokensRequest struct { // Contents: Optional. Input content. Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` + // GenerationConfig: Optional. Generation config that the model will use to + // generate the response. + GenerationConfig *GoogleCloudAiplatformV1beta1GenerationConfig `json:"generationConfig,omitempty"` // Instances: Optional. The instances that are the input to token counting // call. Schema is identical to the prediction schema of the underlying model. Instances []interface{} `json:"instances,omitempty"` @@ -7255,6 +7534,11 @@ type GoogleCloudAiplatformV1beta1DeployedIndex struct { // directly to the deployed index services running on Cloud via private // services access. This field is populated if network is configured. PrivateEndpoints *GoogleCloudAiplatformV1beta1IndexPrivateEndpoints `json:"privateEndpoints,omitempty"` + // PscAutomationConfigs: Optional. If set for PSC deployed index, PSC + // connection will be automatically created after deployment is done and the + // endpoint information is populated in + // private_endpoints.psc_automated_endpoints. + PscAutomationConfigs []*GoogleCloudAiplatformV1beta1PSCAutomationConfig `json:"pscAutomationConfigs,omitempty"` // ReservedIpRanges: Optional. A list of reserved ip ranges under the VPC // network that can be used for this DeployedIndex. If set, we will deploy the // index within the provided ip ranges. Otherwise, the index might be deployed @@ -10195,6 +10479,51 @@ func (s GoogleCloudAiplatformV1beta1ExtensionPrivateServiceConnectConfig) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Fact: The fact used in grounding. +type GoogleCloudAiplatformV1beta1Fact struct { + // Query: Query that is used to retrieve this fact. + Query string `json:"query,omitempty"` + // Summary: If present, the summary/snippet of the fact. + Summary string `json:"summary,omitempty"` + // Title: If present, it refers to the title of this fact. + Title string `json:"title,omitempty"` + // Uri: If present, this uri links to the source of the fact. + Uri string `json:"uri,omitempty"` + // VectorDistance: If present, the distance between the query vector and this + // fact vector. + VectorDistance float64 `json:"vectorDistance,omitempty"` + // ForceSendFields is a list of field names (e.g. "Query") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Query") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1Fact) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Fact + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1Fact) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1Fact + var s1 struct { + VectorDistance gensupport.JSONFloat64 `json:"vectorDistance"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.VectorDistance = float64(s1.VectorDistance) + return nil +} + // GoogleCloudAiplatformV1beta1Feature: Feature Metadata information. For // example, color is a feature that describes an apple. type GoogleCloudAiplatformV1beta1Feature struct { @@ -10354,10 +10683,10 @@ type GoogleCloudAiplatformV1beta1FeatureGroupBigQuery struct { // row per unique entityId including nulls. If not set, will collapse all rows // for each unique entityId into a singe row with any non-null values if // present, if no non-null values are present will sync null. ex: If source has - // schema (entity_id, feature_timestamp, f0, f1) and values (e1, - // 2020-01-01T10:00:00.123Z, 10, 15) (e1, 2020-02-01T10:00:00.123Z, 20, null) - // If dense is set, (e1, 20, null) is synced to online stores. If dense is not - // set, (e1, 20, 15) is synced to online stores. + // schema `(entity_id, feature_timestamp, f0, f1)` and the following rows: + // `(e1, 2020-01-01T10:00:00.123Z, 10, 15)` `(e1, 2020-02-01T10:00:00.123Z, 20, + // null)` If dense is set, `(e1, 20, null)` is synced to online stores. If + // dense is not set, `(e1, 20, 15)` is synced to online stores. Dense bool `json:"dense,omitempty"` // EntityIdColumns: Optional. Columns to construct entity_id / row keys. If not // provided defaults to `entity_id`. @@ -11468,10 +11797,11 @@ type GoogleCloudAiplatformV1beta1FeatureViewVertexRagSource struct { RagCorpusId int64 `json:"ragCorpusId,omitempty,string"` // Uri: Required. The BigQuery view/table URI that will be materialized on each // manual sync trigger. The table/view is expected to have the following - // columns at least: Field name Type Mode corpus_id STRING REQUIRED/NULLABLE - // file_id STRING REQUIRED/NULLABLE chunk_id STRING REQUIRED/NULLABLE - // chunk_data_type STRING REQUIRED/NULLABLE chunk_data STRING REQUIRED/NULLABLE - // embeddings FLOAT REPEATED file_original_uri STRING REQUIRED/NULLABLE + // columns and types at least: - `corpus_id` (STRING, NULLABLE/REQUIRED) - + // `file_id` (STRING, NULLABLE/REQUIRED) - `chunk_id` (STRING, + // NULLABLE/REQUIRED) - `chunk_data_type` (STRING, NULLABLE/REQUIRED) - + // `chunk_data` (STRING, NULLABLE/REQUIRED) - `embeddings` (FLOAT, REPEATED) - + // `file_original_uri` (STRING, NULLABLE/REQUIRED) Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "RagCorpusId") to // unconditionally include in API requests. By default, fields with empty or @@ -12825,6 +13155,13 @@ type GoogleCloudAiplatformV1beta1GenerateContentRequest struct { Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` // GenerationConfig: Optional. Generation config. GenerationConfig *GoogleCloudAiplatformV1beta1GenerationConfig `json:"generationConfig,omitempty"` + // Labels: Optional. The labels with user-defined metadata for the request. It + // is used for billing and reporting only. Label keys and values can be no + // longer than 63 characters (Unicode codepoints) and can only contain + // lowercase letters, numeric characters, underscores, and dashes. + // International characters are allowed. Label values are optional. Label keys + // must start with a letter. + Labels map[string]string `json:"labels,omitempty"` // SafetySettings: Optional. Per request settings for blocking unsafe content. // Enforced on GenerateContentResponse.candidates. SafetySettings []*GoogleCloudAiplatformV1beta1SafetySetting `json:"safetySettings,omitempty"` @@ -13965,6 +14302,15 @@ type GoogleCloudAiplatformV1beta1ImportRagFilesConfig struct { // import jobs. Consult the Quotas page on the project to set an appropriate // value here. If unspecified, a default value of 1,000 QPM would be used. MaxEmbeddingRequestsPerMin int64 `json:"maxEmbeddingRequestsPerMin,omitempty"` + // PartialFailureBigquerySink: The BigQuery destination to write partial + // failures to. It should be a bigquery table resource name (e.g. + // "bq://projectId.bqDatasetId.bqTableId"). If the dataset id does not exist, + // it will be created. If the table does not exist, it will be created with the + // expected schema. If the table exists, the schema will be validated and data + // will be added to this existing table. + PartialFailureBigquerySink *GoogleCloudAiplatformV1beta1BigQueryDestination `json:"partialFailureBigquerySink,omitempty"` + // PartialFailureGcsSink: The Cloud Storage path to write partial failures to. + PartialFailureGcsSink *GoogleCloudAiplatformV1beta1GcsDestination `json:"partialFailureGcsSink,omitempty"` // RagFileChunkingConfig: Specifies the size and overlap of chunks after // importing RagFiles. RagFileChunkingConfig *GoogleCloudAiplatformV1beta1RagFileChunkingConfig `json:"ragFileChunkingConfig,omitempty"` @@ -21337,6 +21683,36 @@ func (s GoogleCloudAiplatformV1beta1NotebookRuntimeTemplateRef) MarshalJSON() ([ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PSCAutomationConfig: PSC config that is used to +// automatically create forwarding rule via ServiceConnectionMap. +type GoogleCloudAiplatformV1beta1PSCAutomationConfig struct { + // Network: Required. The full name of the Google Compute Engine network + // (https://cloud.google.com/compute/docs/networks-and-firewalls#networks). + // Format + // (https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): + // `projects/{project}/global/networks/{network}`. Where {project} is a project + // number, as in '12345', and {network} is network name. + Network string `json:"network,omitempty"` + // ProjectId: Required. Project id used to create forwarding rule. + ProjectId string `json:"projectId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Network") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Network") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PSCAutomationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PSCAutomationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PairwiseMetricInput: Input for pairwise metric. type GoogleCloudAiplatformV1beta1PairwiseMetricInput struct { // Instance: Required. Pairwise metric instance. @@ -21924,8 +22300,19 @@ type GoogleCloudAiplatformV1beta1PipelineJob struct { // applied, such as Vertex AI Training or Dataflow job. If left unspecified, // the workload is not peered with any network. Network string `json:"network,omitempty"` + // OriginalPipelineJobId: Output only. The original pipeline job id if this + // pipeline job is a rerun of a previous pipeline job. + OriginalPipelineJobId int64 `json:"originalPipelineJobId,omitempty,string"` // PipelineSpec: The spec of the pipeline. PipelineSpec googleapi.RawMessage `json:"pipelineSpec,omitempty"` + // PipelineTaskRerunConfigs: Output only. The rerun configs for each task in + // the pipeline job. By default, the rerun will: 1. Use the same input + // artifacts as the original run. 2. Use the same input parameters as the + // original run. 3. Skip all the tasks that are already succeeded in the + // original run. 4. Rerun all the tasks that are not succeeded in the original + // run. By providing this field, users can override the default behavior and + // specify the rerun config for each task. + PipelineTaskRerunConfigs []*GoogleCloudAiplatformV1beta1PipelineTaskRerunConfig `json:"pipelineTaskRerunConfigs,omitempty"` // PreflightValidations: Optional. Whether to do component level validations // before job creation. PreflightValidations bool `json:"preflightValidations,omitempty"` @@ -22341,6 +22728,88 @@ func (s GoogleCloudAiplatformV1beta1PipelineTaskExecutorDetailCustomJobDetail) M return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PipelineTaskRerunConfig: User provided rerun +// config to submit a rerun pipelinejob. This includes 1. Which task to rerun +// 2. User override input parameters and artifacts. +type GoogleCloudAiplatformV1beta1PipelineTaskRerunConfig struct { + // Inputs: Output only. The runtime input of the task overridden by the user. + Inputs *GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigInputs `json:"inputs,omitempty"` + // SkipDownstreamTasks: Output only. Whether to skip downstream tasks. Default + // value is False. + SkipDownstreamTasks bool `json:"skipDownstreamTasks,omitempty"` + // SkipTask: Output only. Whether to skip this task. Default value is False. + SkipTask bool `json:"skipTask,omitempty"` + // TaskId: Output only. The system generated ID of the task. Retrieved from + // original run. + TaskId int64 `json:"taskId,omitempty,string"` + // TaskName: Output only. The name of the task. + TaskName string `json:"taskName,omitempty"` + // ForceSendFields is a list of field names (e.g. "Inputs") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Inputs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PipelineTaskRerunConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PipelineTaskRerunConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigArtifactList: A list of +// artifact metadata. +type GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigArtifactList struct { + // Artifacts: Output only. A list of artifact metadata. + Artifacts []*GoogleCloudAiplatformV1beta1RuntimeArtifact `json:"artifacts,omitempty"` + // ForceSendFields is a list of field names (e.g. "Artifacts") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Artifacts") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigArtifactList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigArtifactList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigInputs: Runtime inputs +// data of the task. +type GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigInputs struct { + // Artifacts: Output only. Input artifacts. + Artifacts map[string]GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigArtifactList `json:"artifacts,omitempty"` + // ParameterValues: Output only. Input parameters. + ParameterValues googleapi.RawMessage `json:"parameterValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "Artifacts") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Artifacts") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigInputs) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PipelineTaskRerunConfigInputs + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PipelineTemplateMetadata: Pipeline template // metadata if PipelineJob.template_uri is from supported template registry. // Currently, the only supported registry is Artifact Registry. @@ -24784,10 +25253,14 @@ func (s *GoogleCloudAiplatformV1beta1RagQueryRanking) UnmarshalJSON(data []byte) type GoogleCloudAiplatformV1beta1RagVectorDbConfig struct { // ApiAuth: Authentication config for the chosen Vector DB. ApiAuth *GoogleCloudAiplatformV1beta1ApiAuth `json:"apiAuth,omitempty"` + // Pinecone: The config for the Pinecone. + Pinecone *GoogleCloudAiplatformV1beta1RagVectorDbConfigPinecone `json:"pinecone,omitempty"` // RagManagedDb: The config for the RAG-managed Vector DB. RagManagedDb *GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb `json:"ragManagedDb,omitempty"` // VertexFeatureStore: The config for the Vertex Feature Store. VertexFeatureStore *GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore `json:"vertexFeatureStore,omitempty"` + // VertexVectorSearch: The config for the Vertex Vector Search. + VertexVectorSearch *GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexVectorSearch `json:"vertexVectorSearch,omitempty"` // Weaviate: The config for the Weaviate. Weaviate *GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate `json:"weaviate,omitempty"` // ForceSendFields is a list of field names (e.g. "ApiAuth") to unconditionally @@ -24808,6 +25281,29 @@ func (s GoogleCloudAiplatformV1beta1RagVectorDbConfig) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RagVectorDbConfigPinecone: The config for the +// Pinecone. +type GoogleCloudAiplatformV1beta1RagVectorDbConfigPinecone struct { + // IndexName: Pinecone index name. This value cannot be changed after it's set. + IndexName string `json:"indexName,omitempty"` + // ForceSendFields is a list of field names (e.g. "IndexName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IndexName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1RagVectorDbConfigPinecone) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagVectorDbConfigPinecone + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb: The config for // the default RAG-managed Vector DB. type GoogleCloudAiplatformV1beta1RagVectorDbConfigRagManagedDb struct { @@ -24838,6 +25334,33 @@ func (s GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexFeatureStore) Marshal return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexVectorSearch: The config +// for the Vertex Vector Search. +type GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexVectorSearch struct { + // Index: The resource name of the Index. Format: + // `projects/{project}/locations/{location}/indexes/{index}` + Index string `json:"index,omitempty"` + // IndexEndpoint: The resource name of the Index Endpoint. Format: + // `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + IndexEndpoint string `json:"indexEndpoint,omitempty"` + // ForceSendFields is a list of field names (e.g. "Index") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Index") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexVectorSearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RagVectorDbConfigVertexVectorSearch + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate: The config for the // Weaviate. type GoogleCloudAiplatformV1beta1RagVectorDbConfigWeaviate struct { @@ -26218,6 +26741,41 @@ func (s GoogleCloudAiplatformV1beta1RougeSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RuntimeArtifact: The definition of a runtime +// artifact. +type GoogleCloudAiplatformV1beta1RuntimeArtifact struct { + // CustomProperties: The custom properties of the artifact. Deprecated. Use + // RuntimeArtifact.metadata instead. + CustomProperties map[string]GoogleCloudAiplatformV1beta1Value `json:"customProperties,omitempty"` + // Metadata: Properties of the Artifact. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The name of an artifact. + Name string `json:"name,omitempty"` + // Properties: The properties of the artifact. Deprecated. Use + // RuntimeArtifact.metadata instead. + Properties map[string]GoogleCloudAiplatformV1beta1Value `json:"properties,omitempty"` + // Type: The type of the artifact. + Type *GoogleCloudAiplatformV1beta1ArtifactTypeSchema `json:"type,omitempty"` + // Uri: The URI of the artifact. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomProperties") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomProperties") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1RuntimeArtifact) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RuntimeArtifact + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1RuntimeConfig: Runtime configuration to run the // extension. type GoogleCloudAiplatformV1beta1RuntimeConfig struct { @@ -26374,6 +26932,7 @@ type GoogleCloudAiplatformV1beta1SafetyRating struct { // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually explicit // content. + // "HARM_CATEGORY_CIVIC_INTEGRITY" - The harm category is civic integrity. Category string `json:"category,omitempty"` // Probability: Output only. Harm probability levels in the content. // @@ -26485,6 +27044,7 @@ type GoogleCloudAiplatformV1beta1SafetySetting struct { // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually explicit // content. + // "HARM_CATEGORY_CIVIC_INTEGRITY" - The harm category is civic integrity. Category string `json:"category,omitempty"` // Method: Optional. Specify if the threshold is used for probability or // severity score. If not specified, the threshold is used for probability @@ -26504,6 +27064,7 @@ type GoogleCloudAiplatformV1beta1SafetySetting struct { // "BLOCK_MEDIUM_AND_ABOVE" - Block medium threshold and above. // "BLOCK_ONLY_HIGH" - Block only high threshold (i.e. block less). // "BLOCK_NONE" - Block none. + // "OFF" - Turn off the safety filter. Threshold string `json:"threshold,omitempty"` // ForceSendFields is a list of field names (e.g. "Category") to // unconditionally include in API requests. By default, fields with empty or @@ -26987,6 +27548,9 @@ type GoogleCloudAiplatformV1beta1Schema struct { // Properties: Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of // Type.OBJECT. Properties map[string]GoogleCloudAiplatformV1beta1Schema `json:"properties,omitempty"` + // PropertyOrdering: Optional. The order of the properties. Not a standard + // field in open api spec. Only used to support the order of the properties. + PropertyOrdering []string `json:"propertyOrdering,omitempty"` // Required: Optional. Required properties of Type.OBJECT. Required []string `json:"required,omitempty"` // Title: Optional. The title of the Schema. @@ -35807,7 +36371,7 @@ func (s *GoogleCloudAiplatformV1beta1SupervisedTuningDatasetDistributionDatasetB } // GoogleCloudAiplatformV1beta1SupervisedTuningSpec: Tuning Spec for Supervised -// Tuning. +// Tuning for first party models. type GoogleCloudAiplatformV1beta1SupervisedTuningSpec struct { // HyperParameters: Optional. Hyperparameters for SFT. HyperParameters *GoogleCloudAiplatformV1beta1SupervisedHyperParameters `json:"hyperParameters,omitempty"` @@ -41580,6 +42144,219 @@ func (c *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*Googl return ret, nil } +type ProjectsLocationsAugmentPromptCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1augmentpromptrequest *GoogleCloudAiplatformV1beta1AugmentPromptRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AugmentPrompt: Given an input prompt, it returns augmented prompt from +// vertex rag store to guide LLM towards generating grounded responses. +// +// - parent: The resource name of the Location from which to augment prompt. +// The users must have permission to make a call in the project. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) AugmentPrompt(parent string, googlecloudaiplatformv1beta1augmentpromptrequest *GoogleCloudAiplatformV1beta1AugmentPromptRequest) *ProjectsLocationsAugmentPromptCall { + c := &ProjectsLocationsAugmentPromptCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1augmentpromptrequest = googlecloudaiplatformv1beta1augmentpromptrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAugmentPromptCall) Fields(s ...googleapi.Field) *ProjectsLocationsAugmentPromptCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAugmentPromptCall) Context(ctx context.Context) *ProjectsLocationsAugmentPromptCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAugmentPromptCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAugmentPromptCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1augmentpromptrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:augmentPrompt") + 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 "aiplatform.projects.locations.augmentPrompt" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1AugmentPromptResponse.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 *ProjectsLocationsAugmentPromptCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1AugmentPromptResponse, 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 := &GoogleCloudAiplatformV1beta1AugmentPromptResponse{ + 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 +} + +type ProjectsLocationsCorroborateContentCall struct { + s *Service + parent string + googlecloudaiplatformv1beta1corroboratecontentrequest *GoogleCloudAiplatformV1beta1CorroborateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CorroborateContent: Given an input text, it returns a score that evaluates +// the factuality of the text. It also extracts and returns claims from the +// text and provides supporting facts. +// +// - parent: The resource name of the Location from which to corroborate text. +// The users must have permission to make a call in the project. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) CorroborateContent(parent string, googlecloudaiplatformv1beta1corroboratecontentrequest *GoogleCloudAiplatformV1beta1CorroborateContentRequest) *ProjectsLocationsCorroborateContentCall { + c := &ProjectsLocationsCorroborateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1beta1corroboratecontentrequest = googlecloudaiplatformv1beta1corroboratecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCorroborateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCorroborateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCorroborateContentCall) Context(ctx context.Context) *ProjectsLocationsCorroborateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCorroborateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCorroborateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1corroboratecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}:corroborateContent") + 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 "aiplatform.projects.locations.corroborateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1CorroborateContentResponse.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 *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1CorroborateContentResponse, 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 := &GoogleCloudAiplatformV1beta1CorroborateContentResponse{ + 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 +} + type ProjectsLocationsEvaluateInstancesCall struct { s *Service location string @@ -59998,9 +60775,9 @@ func (r *ProjectsLocationsFeatureGroupsService) Create(parent string, googleclou // FeatureGroupId sets the optional parameter "featureGroupId": Required. The // ID to use for this FeatureGroup, which will become the final component of -// the FeatureGroup's resource name. This value may be up to 60 characters, and -// valid characters are `[a-z0-9_]`. The first character cannot be a number. -// The value must be unique within the project and location. +// the FeatureGroup's resource name. This value may be up to 128 characters, +// and valid characters are `[a-z0-9_]`. The first character cannot be a +// number. The value must be unique within the project and location. func (c *ProjectsLocationsFeatureGroupsCreateCall) FeatureGroupId(featureGroupId string) *ProjectsLocationsFeatureGroupsCreateCall { c.urlParams_.Set("featureGroupId", featureGroupId) return c diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 842121015cd..8ae9dce29a8 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -311,7 +311,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). To give your feedback on this API, complete the [Google Analytics Access Reports feedback](https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) form.", "flatPath": "v1alpha/accounts/{accountsId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.accounts.runAccessReport", @@ -1017,7 +1017,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). To give your feedback on this API, complete the [Google Analytics Access Reports feedback](https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) form.", "flatPath": "v1alpha/properties/{propertiesId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.properties.runAccessReport", @@ -4886,7 +4886,7 @@ } } }, - "revision": "20240823", + "revision": "20240916", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 4ee9c5f8801..f05cfbdd85f 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -7046,6 +7046,10 @@ type AccountsRunAccessReportCall struct { // property configuration changes like adding a stream or changing a property's // time zone. For configuration change history, see searchChangeHistoryEvents // (https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). +// To give your feedback on this API, complete the Google Analytics Access +// Reports feedback +// (https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) +// form. // // - entity: The Data Access Report supports requesting at the property level // or account level. If requested at the account level, Data Access Reports @@ -10001,6 +10005,10 @@ type PropertiesRunAccessReportCall struct { // property configuration changes like adding a stream or changing a property's // time zone. For configuration change history, see searchChangeHistoryEvents // (https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). +// To give your feedback on this API, complete the Google Analytics Access +// Reports feedback +// (https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) +// form. // // - entity: The Data Access Report supports requesting at the property level // or account level. If requested at the account level, Data Access Reports diff --git a/analyticsadmin/v1beta/analyticsadmin-api.json b/analyticsadmin/v1beta/analyticsadmin-api.json index 8a79cdc734a..32cec0ec367 100644 --- a/analyticsadmin/v1beta/analyticsadmin-api.json +++ b/analyticsadmin/v1beta/analyticsadmin-api.json @@ -305,7 +305,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). To give your feedback on this API, complete the [Google Analytics Access Reports feedback](https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) form.", "flatPath": "v1beta/accounts/{accountsId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.accounts.runAccessReport", @@ -561,7 +561,7 @@ ] }, "runAccessReport": { - "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "description": "Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA Data API, and other products like Firebase \u0026 Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). To give your feedback on this API, complete the [Google Analytics Access Reports feedback](https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) form.", "flatPath": "v1beta/properties/{propertiesId}:runAccessReport", "httpMethod": "POST", "id": "analyticsadmin.properties.runAccessReport", @@ -1788,7 +1788,7 @@ } } }, - "revision": "20240823", + "revision": "20240916", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1betaAccessBetweenFilter": { diff --git a/analyticsadmin/v1beta/analyticsadmin-gen.go b/analyticsadmin/v1beta/analyticsadmin-gen.go index 337ab6befe3..0f9849622d2 100644 --- a/analyticsadmin/v1beta/analyticsadmin-gen.go +++ b/analyticsadmin/v1beta/analyticsadmin-gen.go @@ -3423,6 +3423,10 @@ type AccountsRunAccessReportCall struct { // property configuration changes like adding a stream or changing a property's // time zone. For configuration change history, see searchChangeHistoryEvents // (https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). +// To give your feedback on this API, complete the Google Analytics Access +// Reports feedback +// (https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) +// form. // // - entity: The Data Access Report supports requesting at the property level // or account level. If requested at the account level, Data Access Reports @@ -4472,6 +4476,10 @@ type PropertiesRunAccessReportCall struct { // property configuration changes like adding a stream or changing a property's // time zone. For configuration change history, see searchChangeHistoryEvents // (https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). +// To give your feedback on this API, complete the Google Analytics Access +// Reports feedback +// (https://docs.google.com/forms/d/e/1FAIpQLSdmEBUrMzAEdiEKk5TV5dEHvDUZDRlgWYdQdAeSdtR4hVjEhw/viewform) +// form. // // - entity: The Data Access Report supports requesting at the property level // or account level. If requested at the account level, Data Access Reports diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json index ed7ef38c1e2..48c7c65ea98 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json @@ -851,7 +851,7 @@ } } }, - "revision": "20231112", + "revision": "20240916", "rootUrl": "https://androiddeviceprovisioning.googleapis.com/", "schemas": { "ClaimDeviceRequest": { @@ -1291,6 +1291,10 @@ "description": "The device’s IMEI number. Validated on input.", "type": "string" }, + "imei2": { + "description": "The device’s second IMEI number.", + "type": "string" + }, "manufacturer": { "description": "The device manufacturer’s name. Matches the device's built-in value returned from `android.os.Build.MANUFACTURER`. Allowed values are listed in [Android manufacturers](/zero-touch/resources/manufacturer-names#manufacturers-names).", "type": "string" @@ -1299,6 +1303,10 @@ "description": "The device’s MEID number.", "type": "string" }, + "meid2": { + "description": "The device’s second MEID number.", + "type": "string" + }, "model": { "description": "The device model's name. Allowed values are listed in [Android models](/zero-touch/resources/manufacturer-names#model-names) and [Chrome OS models](https://support.google.com/chrome/a/answer/10130175#identify_compatible).", "type": "string" diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go index e827171e72b..b59b696007b 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go @@ -831,6 +831,8 @@ type DeviceIdentifier struct { DeviceType string `json:"deviceType,omitempty"` // Imei: The device’s IMEI number. Validated on input. Imei string `json:"imei,omitempty"` + // Imei2: The device’s second IMEI number. + Imei2 string `json:"imei2,omitempty"` // Manufacturer: The device manufacturer’s name. Matches the device's // built-in value returned from `android.os.Build.MANUFACTURER`. Allowed values // are listed in Android manufacturers @@ -838,6 +840,8 @@ type DeviceIdentifier struct { Manufacturer string `json:"manufacturer,omitempty"` // Meid: The device’s MEID number. Meid string `json:"meid,omitempty"` + // Meid2: The device’s second MEID number. + Meid2 string `json:"meid2,omitempty"` // Model: The device model's name. Allowed values are listed in Android models // (/zero-touch/resources/manufacturer-names#model-names) and Chrome OS models // (https://support.google.com/chrome/a/answer/10130175#identify_compatible). diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 54c250bd0fc..e83e0200388 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -723,7 +723,7 @@ "accept": [ "application/octet-stream" ], - "maxSize": "10737418240", + "maxSize": "53687091200", "protocols": { "resumable": { "multipart": true, @@ -4732,7 +4732,7 @@ } } }, - "revision": "20240821", + "revision": "20240917", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "Abi": { @@ -5253,7 +5253,7 @@ "type": "string" }, "billingPeriodDuration": { - "description": "Required. Subscription period, specified in ISO 8601 format. For a list of acceptable billing periods, refer to the help center.", + "description": "Required. Immutable. Subscription period, specified in ISO 8601 format. For a list of acceptable billing periods, refer to the help center. The duration is immutable after the base plan is created.", "type": "string" }, "gracePeriodDuration": { @@ -7085,11 +7085,11 @@ "type": "string" }, "billingPeriodDuration": { - "description": "Required. Subscription period, specified in ISO 8601 format. For a list of acceptable billing periods, refer to the help center.", + "description": "Required. Immutable. Subscription period, specified in ISO 8601 format. For a list of acceptable billing periods, refer to the help center. The duration is immutable after the base plan is created.", "type": "string" }, "committedPaymentsCount": { - "description": "Required. The number of payments the user is committed to.", + "description": "Required. Immutable. The number of payments the user is committed to. It is immutable after the base plan is created.", "format": "int32", "type": "integer" }, @@ -7112,7 +7112,7 @@ "type": "string" }, "renewalType": { - "description": "Required. Installments base plan renewal type. Determines the behavior at the end of the initial commitment.", + "description": "Required. Immutable. Installments base plan renewal type. Determines the behavior at the end of the initial commitment. The renewal type is immutable after the base plan is created.", "enum": [ "RENEWAL_TYPE_UNSPECIFIED", "RENEWAL_TYPE_RENEWS_WITHOUT_COMMITMENT", @@ -7748,7 +7748,7 @@ "id": "PrepaidBasePlanType", "properties": { "billingPeriodDuration": { - "description": "Required. Subscription period, specified in ISO 8601 format. For a list of acceptable billing periods, refer to the help center.", + "description": "Required. Immutable. Subscription period, specified in ISO 8601 format. For a list of acceptable billing periods, refer to the help center. The duration is immutable after the base plan is created.", "type": "string" }, "timeExtension": { @@ -8671,7 +8671,7 @@ "type": "string" }, "phases": { - "description": "Required. The phases of this subscription offer. Must contain at least one entry, and may contain at most five. Users will always receive all these phases in the specified order. Phases may not be added, removed, or reordered after initial creation.", + "description": "Required. The phases of this subscription offer. Must contain at least one and at most two entries. Users will always receive all these phases in the specified order.", "items": { "$ref": "SubscriptionOfferPhase" }, diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index 7cc7e0cc1b2..6787fda2e3e 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -1245,8 +1245,9 @@ type AutoRenewingBasePlanType struct { // range P0D (zero days) to P30D (30 days). If not specified, the default value // is P30D (30 days). AccountHoldDuration string `json:"accountHoldDuration,omitempty"` - // BillingPeriodDuration: Required. Subscription period, specified in ISO 8601 - // format. For a list of acceptable billing periods, refer to the help center. + // BillingPeriodDuration: Required. Immutable. Subscription period, specified + // in ISO 8601 format. For a list of acceptable billing periods, refer to the + // help center. The duration is immutable after the base plan is created. BillingPeriodDuration string `json:"billingPeriodDuration,omitempty"` // GracePeriodDuration: Grace period of the subscription, specified in ISO 8601 // format. Acceptable values are P0D (zero days), P3D (3 days), P7D (7 days), @@ -3652,11 +3653,12 @@ type InstallmentsBasePlanType struct { // P0D (zero days) to P30D (30days). If not specified, the default value is // P30D (30 days). AccountHoldDuration string `json:"accountHoldDuration,omitempty"` - // BillingPeriodDuration: Required. Subscription period, specified in ISO 8601 - // format. For a list of acceptable billing periods, refer to the help center. + // BillingPeriodDuration: Required. Immutable. Subscription period, specified + // in ISO 8601 format. For a list of acceptable billing periods, refer to the + // help center. The duration is immutable after the base plan is created. BillingPeriodDuration string `json:"billingPeriodDuration,omitempty"` - // CommittedPaymentsCount: Required. The number of payments the user is - // committed to. + // CommittedPaymentsCount: Required. Immutable. The number of payments the user + // is committed to. It is immutable after the base plan is created. CommittedPaymentsCount int64 `json:"committedPaymentsCount,omitempty"` // GracePeriodDuration: Grace period of the subscription, specified in ISO 8601 // format. Acceptable values are P0D (zero days), P3D (3 days), P7D (7 days), @@ -3676,8 +3678,9 @@ type InstallmentsBasePlanType struct { // period of their existing subscription will be used to extend the duration of // the new billing plan. ProrationMode string `json:"prorationMode,omitempty"` - // RenewalType: Required. Installments base plan renewal type. Determines the - // behavior at the end of the initial commitment. + // RenewalType: Required. Immutable. Installments base plan renewal type. + // Determines the behavior at the end of the initial commitment. The renewal + // type is immutable after the base plan is created. // // Possible values: // "RENEWAL_TYPE_UNSPECIFIED" - Unspecified state. @@ -4598,8 +4601,9 @@ type PendingCancellation struct { // PrepaidBasePlanType: Represents a base plan that does not automatically // renew at the end of the base plan, and must be manually renewed by the user. type PrepaidBasePlanType struct { - // BillingPeriodDuration: Required. Subscription period, specified in ISO 8601 - // format. For a list of acceptable billing periods, refer to the help center. + // BillingPeriodDuration: Required. Immutable. Subscription period, specified + // in ISO 8601 format. For a list of acceptable billing periods, refer to the + // help center. The duration is immutable after the base plan is created. BillingPeriodDuration string `json:"billingPeriodDuration,omitempty"` // TimeExtension: Whether users should be able to extend this prepaid base plan // in Google Play surfaces. Defaults to TIME_EXTENSION_ACTIVE if not specified. @@ -5898,9 +5902,8 @@ type SubscriptionOffer struct { // subscription belongs to. PackageName string `json:"packageName,omitempty"` // Phases: Required. The phases of this subscription offer. Must contain at - // least one entry, and may contain at most five. Users will always receive all - // these phases in the specified order. Phases may not be added, removed, or - // reordered after initial creation. + // least one and at most two entries. Users will always receive all these + // phases in the specified order. Phases []*SubscriptionOfferPhase `json:"phases,omitempty"` // ProductId: Required. Immutable. The ID of the parent subscription this offer // belongs to. diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index db755cd29d3..e2548b37290 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -5402,6 +5402,62 @@ }, "deployments": { "methods": { + "get": { + "description": "Gets a particular deployment of Api proxy or a shared flow in an environment", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/deployments/{deploymentsId}", + "httpMethod": "GET", + "id": "apigee.organizations.environments.deployments.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the api proxy or the shared flow deployment. Use the following structure in your request: `organizations/{org}/environments/{env}/deployments/{deployment}`", + "location": "path", + "pattern": "^organizations/[^/]+/environments/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudApigeeV1Deployment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the IAM policy on a deployment. For more information, see [Manage users, roles, and permissions using the API](https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). You must have the `apigee.deployments.getIamPolicy` permission to call this API.", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/deployments/{deploymentsId}:getIamPolicy", + "httpMethod": "GET", + "id": "apigee.organizations.environments.deployments.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": "^organizations/[^/]+/environments/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists all deployments of API proxies or shared flows in an environment.", "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/deployments", @@ -5431,6 +5487,62 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "setIamPolicy": { + "description": "Sets the IAM policy on a deployment, if the policy already exists it will be replaced. For more information, see [Manage users, roles, and permissions using the API](https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). You must have the `apigee.deployments.setIamPolicy` permission to call this API.", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/deployments/{deploymentsId}:setIamPolicy", + "httpMethod": "POST", + "id": "apigee.organizations.environments.deployments.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": "^organizations/[^/]+/environments/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Tests the permissions of a user on a deployment, and returns a subset of permissions that the user has on the deployment. If the deployment does not exist, an empty permission set is returned (a NOT_FOUND error is not returned).", + "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}/deployments/{deploymentsId}:testIamPermissions", + "httpMethod": "POST", + "id": "apigee.organizations.environments.deployments.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": "^organizations/[^/]+/environments/[^/]+/deployments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -10045,7 +10157,7 @@ } } }, - "revision": "20240903", + "revision": "20240905", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index 6df042e2716..377fe3e6b6f 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -31234,6 +31234,248 @@ func (c *OrganizationsEnvironmentsCachesDeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } +type OrganizationsEnvironmentsDeploymentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a particular deployment of Api proxy or a shared flow in an +// environment +// +// - name: Name of the api proxy or the shared flow deployment. Use the +// following structure in your request: +// `organizations/{org}/environments/{env}/deployments/{deployment}`. +func (r *OrganizationsEnvironmentsDeploymentsService) Get(name string) *OrganizationsEnvironmentsDeploymentsGetCall { + c := &OrganizationsEnvironmentsDeploymentsGetCall{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 +// details. +func (c *OrganizationsEnvironmentsDeploymentsGetCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsDeploymentsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *OrganizationsEnvironmentsDeploymentsGetCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsDeploymentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsEnvironmentsDeploymentsGetCall) Context(ctx context.Context) *OrganizationsEnvironmentsDeploymentsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsEnvironmentsDeploymentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEnvironmentsDeploymentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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.deployments.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudApigeeV1Deployment.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 *OrganizationsEnvironmentsDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudApigeeV1Deployment, 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 := &GoogleCloudApigeeV1Deployment{ + 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 +} + +type OrganizationsEnvironmentsDeploymentsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the IAM policy on a deployment. For more information, see +// Manage users, roles, and permissions using the API +// (https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). +// You must have the `apigee.deployments.getIamPolicy` permission to call this +// API. +// +// - 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 *OrganizationsEnvironmentsDeploymentsService) GetIamPolicy(resource string) *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall { + c := &OrganizationsEnvironmentsDeploymentsGetIamPolicyCall{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 *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall { + 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 +// details. +func (c *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall) IfNoneMatch(entityTag string) *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "apigee.organizations.environments.deployments.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *OrganizationsEnvironmentsDeploymentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + 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 +} + type OrganizationsEnvironmentsDeploymentsListCall struct { s *Service parent string @@ -31353,6 +31595,223 @@ func (c *OrganizationsEnvironmentsDeploymentsListCall) Do(opts ...googleapi.Call return ret, nil } +type OrganizationsEnvironmentsDeploymentsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the IAM policy on a deployment, if the policy already +// exists it will be replaced. For more information, see Manage users, roles, +// and permissions using the API +// (https://cloud.google.com/apigee/docs/api-platform/system-administration/manage-users-roles). +// You must have the `apigee.deployments.setIamPolicy` permission to call this +// API. +// +// - 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 *OrganizationsEnvironmentsDeploymentsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *OrganizationsEnvironmentsDeploymentsSetIamPolicyCall { + c := &OrganizationsEnvironmentsDeploymentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OrganizationsEnvironmentsDeploymentsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsDeploymentsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsEnvironmentsDeploymentsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsEnvironmentsDeploymentsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsEnvironmentsDeploymentsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEnvironmentsDeploymentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + 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 "apigee.organizations.environments.deployments.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *OrganizationsEnvironmentsDeploymentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + 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 +} + +type OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Tests the permissions of a user on a deployment, and +// returns a subset of permissions that the user has on the deployment. If the +// deployment does not exist, an empty permission set is returned (a NOT_FOUND +// error is not returned). +// +// - 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 *OrganizationsEnvironmentsDeploymentsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall { + c := &OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } + 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 "apigee.organizations.environments.deployments.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1TestIamPermissionsResponse.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 *OrganizationsEnvironmentsDeploymentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ + 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 +} + type OrganizationsEnvironmentsFlowhooksAttachSharedFlowToFlowHookCall struct { s *Service name string diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 2cfbd488fe8..56e8dc875cd 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240823", + "revision": "20240913", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -699,7 +699,8 @@ "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", "REGIONAL_CONTROLS", "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", - "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT", + "IRS_1075" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -724,7 +725,8 @@ "Assured Workloads Sovereign Controls KSA", "Assured Workloads for Regional Controls", "Healthcare and Life Science Controls", - "Healthcare and Life Science Controls with US Support" + "Healthcare and Life Science Controls with US Support", + "Internal Revenue Service 1075 controls" ], "type": "string" }, @@ -1186,7 +1188,8 @@ "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", "REGIONAL_CONTROLS", "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", - "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT", + "IRS_1075" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -1211,7 +1214,8 @@ "Assured Workloads Sovereign Controls KSA", "Assured Workloads for Regional Controls", "Healthcare and Life Science Controls", - "Healthcare and Life Science Controls with US Support" + "Healthcare and Life Science Controls with US Support", + "Internal Revenue Service 1075 controls" ], "type": "string" }, diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 2b17129e525..c379bbd67c2 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -353,6 +353,7 @@ type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct { // Controls // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life // Science Controls with US Support + // "IRS_1075" - Internal Revenue Service 1075 controls ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -892,6 +893,7 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // Controls // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life // Science Controls with US Support + // "IRS_1075" - Internal Revenue Service 1075 controls ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the Workload. ComplianceStatus *GoogleCloudAssuredworkloadsV1WorkloadComplianceStatus `json:"complianceStatus,omitempty"` diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index ad17eaf8996..61d7230752e 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -588,7 +588,7 @@ } } }, - "revision": "20240823", + "revision": "20240913", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { @@ -696,7 +696,8 @@ "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", "REGIONAL_CONTROLS", "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", - "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT", + "IRS_1075" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -721,7 +722,8 @@ "Assured Workloads Sovereign Controls KSA", "Assured Workloads for Regional Controls", "Healthcare and Life Science Controls", - "Healthcare and Life Science Controls with US Support" + "Healthcare and Life Science Controls with US Support", + "Internal Revenue Service 1075 controls" ], "type": "string" }, @@ -1181,7 +1183,8 @@ "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS", "REGIONAL_CONTROLS", "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS", - "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" + "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT", + "IRS_1075" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -1206,7 +1209,8 @@ "Assured Workloads Sovereign Controls KSA", "Assured Workloads for Regional Controls", "Healthcare and Life Science Controls", - "Healthcare and Life Science Controls with US Support" + "Healthcare and Life Science Controls with US Support", + "Internal Revenue Service 1075 controls" ], "type": "string" }, diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index 5cbb605f0a6..20ded6a3c7e 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -353,6 +353,7 @@ type GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata struct { // Controls // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life // Science Controls with US Support + // "IRS_1075" - Internal Revenue Service 1075 controls ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -876,6 +877,7 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // Controls // "HEALTHCARE_AND_LIFE_SCIENCES_CONTROLS_US_SUPPORT" - Healthcare and Life // Science Controls with US Support + // "IRS_1075" - Internal Revenue Service 1075 controls ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the Workload. ComplianceStatus *GoogleCloudAssuredworkloadsV1beta1WorkloadComplianceStatus `json:"complianceStatus,omitempty"` diff --git a/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index fc21b2299e5..c6266a13dfb 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -642,6 +642,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. Reserved for future use to provide a BASIC \u0026 FULL view of Backup Vault", + "enum": [ + "BACKUP_VAULT_VIEW_UNSPECIFIED", + "BACKUP_VAULT_VIEW_BASIC", + "BACKUP_VAULT_VIEW_FULL" + ], + "enumDescriptions": [ + "If the value is not set, the default 'FULL' view is used.", + "Includes basic data about the Backup Vault, but not the full contents.", + "Includes all data about the Backup Vault. This is the default value (for both ListBackupVaults and GetBackupVault)." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -688,6 +703,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. Reserved for future use to provide a BASIC \u0026 FULL view of Backup Vault.", + "enum": [ + "BACKUP_VAULT_VIEW_UNSPECIFIED", + "BACKUP_VAULT_VIEW_BASIC", + "BACKUP_VAULT_VIEW_FULL" + ], + "enumDescriptions": [ + "If the value is not set, the default 'FULL' view is used.", + "Includes basic data about the Backup Vault, but not the full contents.", + "Includes all data about the Backup Vault. This is the default value (for both ListBackupVaults and GetBackupVault)." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/backupVaults", @@ -1111,6 +1141,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+/backups/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. Reserved for future use to provide a BASIC \u0026 FULL view of Backup resource.", + "enum": [ + "BACKUP_VIEW_UNSPECIFIED", + "BACKUP_VIEW_BASIC", + "BACKUP_VIEW_FULL" + ], + "enumDescriptions": [ + "If the value is not set, the default 'FULL' view is used.", + "Includes basic data about the Backup, but not the full contents.", + "Includes all data about the Backup. This is the default value (for both ListBackups and GetBackup)." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+name}", @@ -1157,6 +1202,21 @@ "pattern": "^projects/[^/]+/locations/[^/]+/backupVaults/[^/]+/dataSources/[^/]+$", "required": true, "type": "string" + }, + "view": { + "description": "Optional. Reserved for future use to provide a BASIC \u0026 FULL view of Backup resource.", + "enum": [ + "BACKUP_VIEW_UNSPECIFIED", + "BACKUP_VIEW_BASIC", + "BACKUP_VIEW_FULL" + ], + "enumDescriptions": [ + "If the value is not set, the default 'FULL' view is used.", + "Includes basic data about the Backup, but not the full contents.", + "Includes all data about the Backup. This is the default value (for both ListBackups and GetBackup)." + ], + "location": "query", + "type": "string" } }, "path": "v1/{+parent}/backups", @@ -1598,7 +1658,7 @@ } } }, - "revision": "20240828", + "revision": "20240913", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AbandonBackupRequest": { @@ -2278,7 +2338,7 @@ "type": "object" }, "BackupPlan": { - "description": "A `BackupPlan` specifies some common fields, such as `display_name` as well as one or more `BackupRule` messages. Each `BackupRule` has a retention policy and defines a schedule by which the system is to perform backup workloads.", + "description": "A `BackupPlan` specifies some common fields, such as `description` as well as one or more `BackupRule` messages. Each `BackupRule` has a retention policy and defines a schedule by which the system is to perform backup workloads.", "id": "BackupPlan", "properties": { "backupRules": { diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index d8ddd754427..3b2852691ca 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -944,7 +944,7 @@ func (s BackupLock) MarshalJSON() ([]byte, error) { } // BackupPlan: A `BackupPlan` specifies some common fields, such as -// `display_name` as well as one or more `BackupRule` messages. Each +// `description` as well as one or more `BackupRule` messages. Each // `BackupRule` has a retention policy and defines a schedule by which the // system is to perform backup workloads. type BackupPlan struct { @@ -5921,6 +5921,27 @@ func (r *ProjectsLocationsBackupVaultsService) Get(name string) *ProjectsLocatio return c } +// View sets the optional parameter "view": Reserved for future use to provide +// a BASIC & FULL view of Backup Vault +// +// Possible values: +// +// "BACKUP_VAULT_VIEW_UNSPECIFIED" - If the value is not set, the default +// +// 'FULL' view is used. +// +// "BACKUP_VAULT_VIEW_BASIC" - Includes basic data about the Backup Vault, +// +// but not the full contents. +// +// "BACKUP_VAULT_VIEW_FULL" - Includes all data about the Backup Vault. This +// +// is the default value (for both ListBackupVaults and GetBackupVault). +func (c *ProjectsLocationsBackupVaultsGetCall) View(view string) *ProjectsLocationsBackupVaultsGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -6060,6 +6081,27 @@ func (c *ProjectsLocationsBackupVaultsListCall) PageToken(pageToken string) *Pro return c } +// View sets the optional parameter "view": Reserved for future use to provide +// a BASIC & FULL view of Backup Vault. +// +// Possible values: +// +// "BACKUP_VAULT_VIEW_UNSPECIFIED" - If the value is not set, the default +// +// 'FULL' view is used. +// +// "BACKUP_VAULT_VIEW_BASIC" - Includes basic data about the Backup Vault, +// +// but not the full contents. +// +// "BACKUP_VAULT_VIEW_FULL" - Includes all data about the Backup Vault. This +// +// is the default value (for both ListBackupVaults and GetBackupVault). +func (c *ProjectsLocationsBackupVaultsListCall) View(view string) *ProjectsLocationsBackupVaultsListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -7570,6 +7612,27 @@ func (r *ProjectsLocationsBackupVaultsDataSourcesBackupsService) Get(name string return c } +// View sets the optional parameter "view": Reserved for future use to provide +// a BASIC & FULL view of Backup resource. +// +// Possible values: +// +// "BACKUP_VIEW_UNSPECIFIED" - If the value is not set, the default 'FULL' +// +// view is used. +// +// "BACKUP_VIEW_BASIC" - Includes basic data about the Backup, but not the +// +// full contents. +// +// "BACKUP_VIEW_FULL" - Includes all data about the Backup. This is the +// +// default value (for both ListBackups and GetBackup). +func (c *ProjectsLocationsBackupVaultsDataSourcesBackupsGetCall) View(view string) *ProjectsLocationsBackupVaultsDataSourcesBackupsGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -7709,6 +7772,27 @@ func (c *ProjectsLocationsBackupVaultsDataSourcesBackupsListCall) PageToken(page return c } +// View sets the optional parameter "view": Reserved for future use to provide +// a BASIC & FULL view of Backup resource. +// +// Possible values: +// +// "BACKUP_VIEW_UNSPECIFIED" - If the value is not set, the default 'FULL' +// +// view is used. +// +// "BACKUP_VIEW_BASIC" - Includes basic data about the Backup, but not the +// +// full contents. +// +// "BACKUP_VIEW_FULL" - Includes all data about the Backup. This is the +// +// default value (for both ListBackups and GetBackup). +func (c *ProjectsLocationsBackupVaultsDataSourcesBackupsListCall) View(view string) *ProjectsLocationsBackupVaultsDataSourcesBackupsListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index ff5c4dfc69e..1f650e18442 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -1264,10 +1264,7 @@ "path": "v1alpha/{+name}:cancel", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaCancelSubscriptionResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + } }, "create": { "description": "Creates a new BeyondCorp Enterprise Subscription in a given organization. Location will always be global as BeyondCorp subscriptions are per organization.", @@ -1292,10 +1289,7 @@ }, "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + } }, "get": { "description": "Gets details of a single Subscription.", @@ -1317,10 +1311,7 @@ "path": "v1alpha/{+name}", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + } }, "list": { "description": "Lists Subscriptions in a given organization and location.", @@ -1353,10 +1344,7 @@ "path": "v1alpha/{+parent}/subscriptions", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + } }, "patch": { "description": "Updates an existing BeyondCorp Enterprise Subscription in a given organization. Location will always be global as BeyondCorp subscriptions are per organization.", @@ -1392,10 +1380,7 @@ }, "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + } }, "restart": { "description": "Restarts an existing BeyondCorp Enterprise Subscription in a given organization, that is scheduled for cancellation. Location will always be global as BeyondCorp subscriptions are per organization. Returns the timestamp for when the cancellation will become effective", @@ -1422,10 +1407,7 @@ "path": "v1alpha/{+name}:restart", "response": { "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaRestartSubscriptionResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + } } } } @@ -3496,7 +3478,7 @@ ], "parameters": { "applicationId": { - "description": "Optional. User-settable Hub resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or letter.", + "description": "Optional. User-settable Application resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or letter.", "location": "query", "type": "string" }, @@ -3592,115 +3574,6 @@ ] } } - }, - "hubs": { - "methods": { - "create": { - "description": "Creates a new Hub in a given project and location.", - "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/hubs", - "httpMethod": "POST", - "id": "beyondcorp.projects.locations.global.securityGateways.hubs.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "hubId": { - "description": "Optional. User-settable Hub resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or letter.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The resource name of the parent SecurityGateway using the form: `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.", - "location": "query", - "type": "string" - } - }, - "path": "v1alpha/{+parent}/hubs", - "request": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single Hub.", - "flatPath": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/hubs/{hubsId}", - "httpMethod": "PATCH", - "id": "beyondcorp.projects.locations.global.securityGateways.hubs.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. Name of the resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/global/securityGateways/[^/]+/hubs/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request timed out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Required. Mutable fields include: display_name.", - "format": "google-fieldmask", - "location": "query", - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "request": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "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": "v1alpha/projects/{projectsId}/locations/global/securityGateways/{securityGatewaysId}/hubs/{hubsId}:testIamPermissions", - "httpMethod": "POST", - "id": "beyondcorp.projects.locations.global.securityGateways.hubs.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/global/securityGateways/[^/]+/hubs/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+resource}:testIamPermissions", - "request": { - "$ref": "GoogleIamV1TestIamPermissionsRequest" - }, - "response": { - "$ref": "GoogleIamV1TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } } } } @@ -4347,7 +4220,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Mutable fields include: display_name, gateway_regions.", + "description": "Required. Mutable fields include: display_name, hubs.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -4392,6 +4265,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "setPeering": { + "description": "This is a custom method to allow customers to create a peering connections between Google network and customer networks. This is enabled only for the allowlisted customers.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}:setPeering", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.securityGateways.setPeering", + "parameterOrder": [ + "securityGateway" + ], + "parameters": { + "securityGateway": { + "description": "Required. BeyondCorp SecurityGateway name using the form: `projects/{project}/locations/{location}/securityGateways/{security_gateway}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+securityGateway}:setPeering", + "request": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaSetPeeringRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}:testIamPermissions", @@ -4484,6 +4385,37 @@ "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications/{applicationsId}:getIamPolicy", + "httpMethod": "GET", + "id": "beyondcorp.projects.locations.securityGateways.applications.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/applications/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "list": { "description": "Lists Applications in a given project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications", @@ -4494,7 +4426,7 @@ ], "parameters": { "filter": { - "description": "Optional. A filter specifying constraints of a list operation. All fields in the Hub message are supported. For example, the following query will return the Hub with displayName \"test-application\" For more information, please refer to https://google.aip.dev/160.", + "description": "Optional. A filter specifying constraints of a list operation. All fields in the Application message are supported. For example, the following query will return the Application with displayName \"test-application\" For more information, please refer to https://google.aip.dev/160.", "location": "query", "type": "string" }, @@ -4510,7 +4442,7 @@ "type": "integer" }, "pageToken": { - "description": "Optional. The next_page_token value returned from a previous ListHubsRequest, if any.", + "description": "Optional. The next_page_token value returned from a previous ListApplicationsRequest, if any.", "location": "query", "type": "string" }, @@ -4529,112 +4461,30 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - } - } - }, - "hubs": { - "methods": { - "delete": { - "description": "Deletes a single Hub.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/hubs/{hubsId}", - "httpMethod": "DELETE", - "id": "beyondcorp.projects.locations.securityGateways.hubs.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/hubs/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "get": { - "description": "Gets details of a single Hub.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/hubs/{hubsId}", - "httpMethod": "GET", - "id": "beyondcorp.projects.locations.securityGateways.hubs.get", + "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/applications/{applicationsId}:setIamPolicy", + "httpMethod": "POST", + "id": "beyondcorp.projects.locations.securityGateways.applications.setIamPolicy", "parameterOrder": [ - "name" + "resource" ], "parameters": { - "name": { - "description": "Required. The resource name of the Hub using the form: `projects/{project_id}/locations/global/securityGateway/{security_gateway_id}/hubs/{hub_id}`", + "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/[^/]+/securityGateways/[^/]+/hubs/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+/applications/[^/]+$", "required": true, "type": "string" } }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists Hubs in a given project and location.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/securityGateways/{securityGatewaysId}/hubs", - "httpMethod": "GET", - "id": "beyondcorp.projects.locations.securityGateways.hubs.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. A filter specifying constraints of a list operation. All fields in the Hub message are supported. For example, the following query will return the Hub with displayName \"test-hub\" For more information, please refer to https://google.aip.dev/160.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous ListHubsRequest, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The parent location to which the resources belong. `projects/{project_id}/locations/global/securityGateways/{security_gateway_id}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/securityGateways/[^/]+$", - "required": true, - "type": "string" - } + "path": "v1alpha/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" }, - "path": "v1alpha/{+parent}/hubs", "response": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse" + "$ref": "GoogleIamV1Policy" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -4649,7 +4499,7 @@ } } }, - "revision": "20240807", + "revision": "20240904", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -6827,10 +6677,6 @@ "description": "A Beyondcorp Application resource information.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication", "properties": { - "applicationMatchFilter": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter", - "description": "Required. Application filter conditions associated with an application." - }, "createTime": { "description": "Output only. Timestamp when the resource was created.", "format": "google-datetime", @@ -6841,6 +6687,13 @@ "description": "Optional. An arbitrary user-provided name for the Route resource. Cannot exceed 64 characters.", "type": "string" }, + "endpointMatchers": { + "description": "Required. Endpoint matchers associated with an application. A combination of hostname and ports as endpoint matcher is used to match the application. Match conditions for OR logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if one the conditions are met. The conditions can be one of the following combination (Hostname), (Hostname \u0026 Ports) EXAMPLES: Hostname - (\"*.abc.com\"), (\"xyz.abc.com\") Hostname and Ports - (\"abc.com\" and \"22\"), (\"abc.com\" and \"22,33\") etc", + "items": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher" + }, + "type": "array" + }, "name": { "description": "Identifier. Name of the resource.", "type": "string" @@ -6854,30 +6707,12 @@ }, "type": "object" }, - "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter": { - "description": "Match Criteria for Application Filtering.", - "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter", - "properties": { - "matchConditions": { - "description": "Required. Match conditions for AND logic. An array of match conditions to allow for multiple matching criteria. The rule is considered a match if all the conditions are met. The conditions can be one of the following combination (FQDN), (FQDN \u0026 PORTS), (IP_ADDRESS), (IP_ADDRESS \u0026 PORTS) EXAMPLES: FQDN - (\"*.abc.com\"), (\"xyz.abc.com\") FQDN and PORTS - (\"abc.com\" and \"22\"), (\"abc.com\" and \"22,33)\" etc IP_ADDRESS - (\"10.20.30.40\"), (\"100.20.30.40\") IP_ADDRESS and PORTS - (\"10.20.30.40\" and \"4\"), (\"10.20.30.40\" and \"4,5\")", - "items": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition": { - "description": "Match condition for idenfying the application.", - "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition", + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher": { + "description": "EndpointMatcher contains the information of the endpoint that will match the application.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher", "properties": { - "fqdn": { - "description": "Optional. FQDN of the application.", - "type": "string" - }, - "ipAddress": { - "description": "Optional. IP Address of the application.", + "hostname": { + "description": "Required. Hostname of the application.", "type": "string" }, "ports": { @@ -6892,74 +6727,12 @@ "type": "object" }, "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub": { - "description": "A Beyondcorp Hub resource information.", + "description": "The Hub message contains information pertaining to the regional data path deployments.", "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub", "properties": { - "createTime": { - "description": "Output only. Timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "displayName": { - "description": "Optional. An arbitrary user-provided name for the Hub. Cannot exceed 64 characters.", - "type": "string" - }, - "name": { - "description": "Identifier. Name of the resource.", - "type": "string" - }, "natGatewayConfig": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig", - "description": "Required. NAT gateway setup to ensure enough NAT IP addresses are available to handle the traffic needed to access the applications. Allows to explicitly enable or disable the NAT in the Hub along with the total IPs allocated to handle the capacity limits." - }, - "state": { - "description": "Output only. The operational state of the Hub.", - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "UPDATING", - "DELETING", - "RUNNING", - "DOWN", - "ERROR" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "Hub is being created.", - "Hub is being updated.", - "Hub is being deleted.", - "Hub is running.", - "Hub is down and may be restored in the future. This happens when CCFE sends ProjectState = OFF.", - "Hub encountered an error and is in an indeterministic state." - ], - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. Timestamp when the resource was last modified.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig": { - "description": "Represents the NAT Gateway configuration.", - "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig", - "properties": { - "enableNatGateway": { - "description": "Optional. Explicitly enable or disable the NAT Gateway. This is defaulted to false until NAT Gateway configuration is fully supported and any request with a disable option will be rejected.", - "type": "boolean" - }, - "natIps": { - "description": "Output only. List of NAT IPs that will be used for establishing connection to the endpoints.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaNatGatewayConfig", + "description": "Optional. NAT gateway setup to ensure enough NAT IP addresses are available to handle the traffic needed to access the applications. Allows to explicitly enable or disable the NAT in the Hub along with the total IPs allocated to handle the capacity limits." } }, "type": "object" @@ -6989,21 +6762,21 @@ }, "type": "object" }, - "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse": { - "description": "Message for response to listing Hubs.", - "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse", + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse": { + "description": "Message for response to listing SecurityGateways.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse", "properties": { - "hubs": { - "description": "A list of BeyondCorp Hub in the project.", - "items": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" - }, - "type": "array" - }, "nextPageToken": { "description": "A token to retrieve the next page of results, or empty if there are no more results in the list.", "type": "string" }, + "securityGateways": { + "description": "A list of BeyondCorp SecurityGateway in the project.", + "items": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway" + }, + "type": "array" + }, "unreachable": { "description": "A list of locations that could not be reached.", "items": { @@ -7014,27 +6787,35 @@ }, "type": "object" }, - "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse": { - "description": "Message for response to listing SecurityGateways.", - "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse", + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaNatGatewayConfig": { + "description": "Represents the NAT Gateway configuration.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaNatGatewayConfig", "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results, or empty if there are no more results in the list.", - "type": "string" - }, - "securityGateways": { - "description": "A list of BeyondCorp SecurityGateway in the project.", + "natIps": { + "description": "Output only. List of NAT IPs that will be used for establishing connection to the endpoints.", "items": { - "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway" + "type": "string" }, + "readOnly": true, "type": "array" - }, - "unreachable": { - "description": "A list of locations that could not be reached.", + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaPeering": { + "description": "VPC Peering details.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaPeering", + "properties": { + "dnsZones": { + "description": "Optional. List of DNS zones for DNS peering with the customer VPC network.", "items": { "type": "string" }, "type": "array" + }, + "targetVpcNetwork": { + "description": "Required. The name of the Target VPC network name in the format: `projects/{project}/global/networks/{network}", + "type": "string" } }, "type": "object" @@ -7061,6 +6842,13 @@ "readOnly": true, "type": "array" }, + "hubs": { + "additionalProperties": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub" + }, + "description": "Optional. Map of Hubs that represents regional data path deployment with GCP region as a key.", + "type": "object" + }, "name": { "description": "Identifier. Name of the resource.", "type": "string" @@ -7141,6 +6929,28 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpSecuritygatewaysV1alphaSetPeeringRequest": { + "description": "Set Peering request for creating a VPC peering between Google network and customer networks.", + "id": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaSetPeeringRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "validateOnly": { + "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + "type": "boolean" + }, + "vpcPeerings": { + "description": "Required. List of Peering connection information.", + "items": { + "$ref": "GoogleCloudBeyondcorpSecuritygatewaysV1alphaPeering" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudLocationListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "GoogleCloudLocationListLocationsResponse", diff --git a/beyondcorp/v1alpha/beyondcorp-gen.go b/beyondcorp/v1alpha/beyondcorp-gen.go index 7645358032e..32d1dc4ca42 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -421,7 +421,6 @@ type ProjectsLocationsGlobalService struct { func NewProjectsLocationsGlobalSecurityGatewaysService(s *Service) *ProjectsLocationsGlobalSecurityGatewaysService { rs := &ProjectsLocationsGlobalSecurityGatewaysService{s: s} rs.Applications = NewProjectsLocationsGlobalSecurityGatewaysApplicationsService(s) - rs.Hubs = NewProjectsLocationsGlobalSecurityGatewaysHubsService(s) return rs } @@ -429,8 +428,6 @@ type ProjectsLocationsGlobalSecurityGatewaysService struct { s *Service Applications *ProjectsLocationsGlobalSecurityGatewaysApplicationsService - - Hubs *ProjectsLocationsGlobalSecurityGatewaysHubsService } func NewProjectsLocationsGlobalSecurityGatewaysApplicationsService(s *Service) *ProjectsLocationsGlobalSecurityGatewaysApplicationsService { @@ -442,15 +439,6 @@ type ProjectsLocationsGlobalSecurityGatewaysApplicationsService struct { s *Service } -func NewProjectsLocationsGlobalSecurityGatewaysHubsService(s *Service) *ProjectsLocationsGlobalSecurityGatewaysHubsService { - rs := &ProjectsLocationsGlobalSecurityGatewaysHubsService{s: s} - return rs -} - -type ProjectsLocationsGlobalSecurityGatewaysHubsService struct { - s *Service -} - func NewProjectsLocationsInsightsService(s *Service) *ProjectsLocationsInsightsService { rs := &ProjectsLocationsInsightsService{s: s} return rs @@ -481,7 +469,6 @@ type ProjectsLocationsOperationsService struct { func NewProjectsLocationsSecurityGatewaysService(s *Service) *ProjectsLocationsSecurityGatewaysService { rs := &ProjectsLocationsSecurityGatewaysService{s: s} rs.Applications = NewProjectsLocationsSecurityGatewaysApplicationsService(s) - rs.Hubs = NewProjectsLocationsSecurityGatewaysHubsService(s) return rs } @@ -489,8 +476,6 @@ type ProjectsLocationsSecurityGatewaysService struct { s *Service Applications *ProjectsLocationsSecurityGatewaysApplicationsService - - Hubs *ProjectsLocationsSecurityGatewaysHubsService } func NewProjectsLocationsSecurityGatewaysApplicationsService(s *Service) *ProjectsLocationsSecurityGatewaysApplicationsService { @@ -502,15 +487,6 @@ type ProjectsLocationsSecurityGatewaysApplicationsService struct { s *Service } -func NewProjectsLocationsSecurityGatewaysHubsService(s *Service) *ProjectsLocationsSecurityGatewaysHubsService { - rs := &ProjectsLocationsSecurityGatewaysHubsService{s: s} - return rs -} - -type ProjectsLocationsSecurityGatewaysHubsService struct { - s *Service -} - // AllocatedConnection: Allocated connection of the AppGateway. type AllocatedConnection struct { // IngressPort: Required. The ingress port of an allocated connection @@ -2887,14 +2863,20 @@ func (s GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription) Marsh // GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication: A Beyondcorp // Application resource information. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication struct { - // ApplicationMatchFilter: Required. Application filter conditions associated - // with an application. - ApplicationMatchFilter *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter `json:"applicationMatchFilter,omitempty"` // CreateTime: Output only. Timestamp when the resource was created. CreateTime string `json:"createTime,omitempty"` // DisplayName: Optional. An arbitrary user-provided name for the Route // resource. Cannot exceed 64 characters. DisplayName string `json:"displayName,omitempty"` + // EndpointMatchers: Required. Endpoint matchers associated with an + // application. A combination of hostname and ports as endpoint matcher is used + // to match the application. Match conditions for OR logic. An array of match + // conditions to allow for multiple matching criteria. The rule is considered a + // match if one the conditions are met. The conditions can be one of the + // following combination (Hostname), (Hostname & Ports) EXAMPLES: Hostname - + // ("*.abc.com"), ("xyz.abc.com") Hostname and Ports - ("abc.com" and "22"), + // ("abc.com" and "22,33") etc + EndpointMatchers []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher `json:"endpointMatchers,omitempty"` // Name: Identifier. Name of the resource. Name string `json:"name,omitempty"` // UpdateTime: Output only. Timestamp when the resource was last modified. @@ -2902,15 +2884,15 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ApplicationMatchFilter") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ApplicationMatchFilter") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -2920,138 +2902,54 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter: Match -// Criteria for Application Filtering. -type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter struct { - // MatchConditions: Required. Match conditions for AND logic. An array of match - // conditions to allow for multiple matching criteria. The rule is considered a - // match if all the conditions are met. The conditions can be one of the - // following combination (FQDN), (FQDN & PORTS), (IP_ADDRESS), (IP_ADDRESS & - // PORTS) EXAMPLES: FQDN - ("*.abc.com"), ("xyz.abc.com") FQDN and PORTS - - // ("abc.com" and "22"), ("abc.com" and "22,33)" etc IP_ADDRESS - - // ("10.20.30.40"), ("100.20.30.40") IP_ADDRESS and PORTS - ("10.20.30.40" and - // "4"), ("10.20.30.40" and "4,5") - MatchConditions []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition `json:"matchConditions,omitempty"` - // ForceSendFields is a list of field names (e.g. "MatchConditions") to +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher: EndpointMatcher +// contains the information of the endpoint that will match the application. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher struct { + // Hostname: Required. Hostname of the application. + Hostname string `json:"hostname,omitempty"` + // Ports: Optional. Ports of the application. + Ports []int64 `json:"ports,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hostname") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MatchConditions") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondit -// ion: Match condition for idenfying the application. -type GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition struct { - // Fqdn: Optional. FQDN of the application. - Fqdn string `json:"fqdn,omitempty"` - // IpAddress: Optional. IP Address of the application. - IpAddress string `json:"ipAddress,omitempty"` - // Ports: Optional. Ports of the application. - Ports []int64 `json:"ports,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fqdn") to unconditionally - // include in API requests. By default, fields with empty or default values are + // NullFields is a list of field names (e.g. "Hostname") to include in API + // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fqdn") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplicationMatchFilterMatchCondition +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaEndpointMatcher return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub: A Beyondcorp Hub resource -// information. +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub: The Hub message contains +// information pertaining to the regional data path deployments. type GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub struct { - // CreateTime: Output only. Timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - // DisplayName: Optional. An arbitrary user-provided name for the Hub. Cannot - // exceed 64 characters. - DisplayName string `json:"displayName,omitempty"` - // Name: Identifier. Name of the resource. - Name string `json:"name,omitempty"` - // NatGatewayConfig: Required. NAT gateway setup to ensure enough NAT IP + // NatGatewayConfig: Optional. NAT gateway setup to ensure enough NAT IP // addresses are available to handle the traffic needed to access the // applications. Allows to explicitly enable or disable the NAT in the Hub // along with the total IPs allocated to handle the capacity limits. - NatGatewayConfig *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig `json:"natGatewayConfig,omitempty"` - // State: Output only. The operational state of the Hub. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. This value is unused. - // "CREATING" - Hub is being created. - // "UPDATING" - Hub is being updated. - // "DELETING" - Hub is being deleted. - // "RUNNING" - Hub is running. - // "DOWN" - Hub is down and may be restored in the future. This happens when - // CCFE sends ProjectState = OFF. - // "ERROR" - Hub encountered an error and is in an indeterministic state. - State string `json:"state,omitempty"` - // UpdateTime: Output only. Timestamp when the resource was last modified. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig: Represents -// the NAT Gateway configuration. -type GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig struct { - // EnableNatGateway: Optional. Explicitly enable or disable the NAT Gateway. - // This is defaulted to false until NAT Gateway configuration is fully - // supported and any request with a disable option will be rejected. - EnableNatGateway bool `json:"enableNatGateway,omitempty"` - // NatIps: Output only. List of NAT IPs that will be used for establishing - // connection to the endpoints. - NatIps []string `json:"natIps,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableNatGateway") to + NatGatewayConfig *GoogleCloudBeyondcorpSecuritygatewaysV1alphaNatGatewayConfig `json:"natGatewayConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "NatGatewayConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableNatGateway") to include in + // NullFields is a list of field names (e.g. "NatGatewayConfig") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaHubNatGatewayConfig +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -3086,65 +2984,84 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse) Ma return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse: Message for -// response to listing Hubs. -type GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse struct { - // Hubs: A list of BeyondCorp Hub in the project. - Hubs []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub `json:"hubs,omitempty"` +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse: +// Message for response to listing SecurityGateways. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse struct { // NextPageToken: A token to retrieve the next page of results, or empty if // there are no more results in the list. NextPageToken string `json:"nextPageToken,omitempty"` + // SecurityGateways: A list of BeyondCorp SecurityGateway in the project. + SecurityGateways []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway `json:"securityGateways,omitempty"` // Unreachable: A list of 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. "Hubs") to unconditionally + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaNatGatewayConfig: Represents the +// NAT Gateway configuration. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaNatGatewayConfig struct { + // NatIps: Output only. List of NAT IPs that will be used for establishing + // connection to the endpoints. + NatIps []string `json:"natIps,omitempty"` + // ForceSendFields is a list of field names (e.g. "NatIps") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hubs") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "NatIps") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaNatGatewayConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaNatGatewayConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse: -// Message for response to listing SecurityGateways. -type GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse struct { - // NextPageToken: A token to retrieve the next page of results, or empty if - // there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - // SecurityGateways: A list of BeyondCorp SecurityGateway in the project. - SecurityGateways []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway `json:"securityGateways,omitempty"` - // Unreachable: A list of 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 +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaPeering: VPC Peering details. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaPeering struct { + // DnsZones: Optional. List of DNS zones for DNS peering with the customer VPC + // network. + DnsZones []string `json:"dnsZones,omitempty"` + // TargetVpcNetwork: Required. The name of the Target VPC network name in the + // format: `projects/{project}/global/networks/{network} + TargetVpcNetwork string `json:"targetVpcNetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. "DnsZones") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // NullFields is a list of field names (e.g. "DnsZones") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaListSecurityGatewaysResponse +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaPeering) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaPeering return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -3159,6 +3076,9 @@ type GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGateway struct { // ExternalIps: Output only. IP addresses that will be used for establishing // connection to the endpoints. ExternalIps []string `json:"externalIps,omitempty"` + // Hubs: Optional. Map of Hubs that represents regional data path deployment + // with GCP region as a key. + Hubs map[string]GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub `json:"hubs,omitempty"` // Name: Identifier. Name of the resource. Name string `json:"name,omitempty"` // State: Output only. The operational state of the SecurityGateway. @@ -3237,6 +3157,45 @@ func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaSecurityGatewayOperationMeta return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpSecuritygatewaysV1alphaSetPeeringRequest: Set Peering +// request for creating a VPC peering between Google network and customer +// networks. +type GoogleCloudBeyondcorpSecuritygatewaysV1alphaSetPeeringRequest struct { + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. For example, + // consider a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the server can + // check if original operation with the same request ID was received, and if + // so, will ignore the second request. This prevents clients from accidentally + // creating duplicate commitments. The request ID must be a valid UUID with the + // exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ValidateOnly: Optional. If set, validates request by executing a dry-run + // which would not alter the resource in any way. + ValidateOnly bool `json:"validateOnly,omitempty"` + // VpcPeerings: Required. List of Peering connection information. + VpcPeerings []*GoogleCloudBeyondcorpSecuritygatewaysV1alphaPeering `json:"vpcPeerings,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RequestId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudBeyondcorpSecuritygatewaysV1alphaSetPeeringRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSecuritygatewaysV1alphaSetPeeringRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { @@ -16370,9 +16329,9 @@ func (r *ProjectsLocationsGlobalSecurityGatewaysApplicationsService) Create(pare return c } -// ApplicationId sets the optional parameter "applicationId": User-settable Hub -// resource ID. * Must start with a letter. * Must contain between 4-63 -// characters from `/a-z-/`. * Must end with a number or letter. +// ApplicationId sets the optional parameter "applicationId": User-settable +// Application resource ID. * Must start with a letter. * Must contain between +// 4-63 characters from `/a-z-/`. * Must end with a number or letter. func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall) ApplicationId(applicationId string) *ProjectsLocationsGlobalSecurityGatewaysApplicationsCreateCall { c.urlParams_.Set("applicationId", applicationId) return c @@ -16705,448 +16664,92 @@ func (c *ProjectsLocationsGlobalSecurityGatewaysApplicationsTestIamPermissionsCa return ret, nil } -type ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall struct { - s *Service - parent string - googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInsightsConfiguredInsightCall struct { + s *Service + insight string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Hub in a given project and location. +// ConfiguredInsight: Gets the value for a selected particular insight based on +// the provided filters. Use the organization level path for fetching at org +// level and project level path for fetching the insight value specific to a +// particular project. // -// - parent: The resource name of the parent SecurityGateway using the form: -// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ -// id}`. -func (r *ProjectsLocationsGlobalSecurityGatewaysHubsService) Create(parent string, googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { - c := &ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudbeyondcorpsecuritygatewaysv1alphahub = googlecloudbeyondcorpsecuritygatewaysv1alphahub +// - insight: The resource name of the insight using the form: +// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ +// id}` +// `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. +func (r *ProjectsLocationsInsightsService) ConfiguredInsight(insight string) *ProjectsLocationsInsightsConfiguredInsightCall { + c := &ProjectsLocationsInsightsConfiguredInsightCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.insight = insight return c } -// HubId sets the optional parameter "hubId": User-settable Hub resource ID. * -// Must start with a letter. * Must contain between 4-63 characters from -// `/a-z-/`. * Must end with a number or letter. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) HubId(hubId string) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { - c.urlParams_.Set("hubId", hubId) +// Aggregation sets the optional parameter "aggregation": Required. Aggregation +// type. Available aggregation could be fetched by calling insight list and get +// APIs in `BASIC` view. +// +// Possible values: +// +// "AGGREGATION_UNSPECIFIED" - Unspecified. +// "HOURLY" - Insight should be aggregated at hourly level. +// "DAILY" - Insight should be aggregated at daily level. +// "WEEKLY" - Insight should be aggregated at weekly level. +// "MONTHLY" - Insight should be aggregated at monthly level. +// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date +// +// range passed in as the start and end time in the request. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Aggregation(aggregation string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("aggregation", aggregation) return c } -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore request if it has already been -// completed. The server will guarantee that for at least 60 minutes since the -// first request. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { - c.urlParams_.Set("requestId", requestId) +// CustomGroupingFieldFilter sets the optional parameter +// "customGrouping.fieldFilter": Filterable parameters to be added to the +// grouping clause. Available fields could be fetched by calling insight list +// and get APIs in `BASIC` view. `=` is the only comparison operator supported. +// `AND` is the only logical operator supported. Usage: +// field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only +// `AND` conditions are allowed. NOTE: Use the `filter_alias` from +// `Insight.Metadata.Field` message for the filtering the corresponding fields +// in this filter field. (These expressions are based on the filter language +// described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingFieldFilter(customGroupingFieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("customGrouping.fieldFilter", customGroupingFieldFilter) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// CustomGroupingGroupFields sets the optional parameter +// "customGrouping.groupFields": Required. Fields to be used for grouping. +// NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for +// declaring the fields to be grouped-by here. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingGroupFields(customGroupingGroupFields ...string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.SetMulti("customGrouping.groupFields", append([]string{}, customGroupingGroupFields...)) return c } -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall { - c.ctx_ = ctx +// EndTime sets the optional parameter "endTime": Required. Ending time for the +// duration for which insight is to be pulled. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) EndTime(endTime string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("endTime", endTime) return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphahub) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/hubs") - 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 "beyondcorp.projects.locations.global.securityGateways.hubs.create" call. -// 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 *ProjectsLocationsGlobalSecurityGatewaysHubsCreateCall) 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 -} - -type ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall struct { - s *Service - name string - googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single Hub. -// -// - name: Identifier. Name of the resource. -func (r *ProjectsLocationsGlobalSecurityGatewaysHubsService) Patch(name string, googlecloudbeyondcorpsecuritygatewaysv1alphahub *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { - c := &ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudbeyondcorpsecuritygatewaysv1alphahub = googlecloudbeyondcorpsecuritygatewaysv1alphahub - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. The server will guarantee that for at least 60 minutes after -// the first request. For example, consider a situation where you make an -// initial request and the request timed out. If you make the request again -// with the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second request. -// This prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mutable -// fields include: display_name. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { - 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 -// details. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphahub) - if err != nil { - return nil, err - } - 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("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 "beyondcorp.projects.locations.global.securityGateways.hubs.patch" call. -// 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 *ProjectsLocationsGlobalSecurityGatewaysHubsPatchCall) 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 -} - -type ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - 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 *ProjectsLocationsGlobalSecurityGatewaysHubsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall { - c := &ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "beyondcorp.projects.locations.global.securityGateways.hubs.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsGlobalSecurityGatewaysHubsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, 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 := &GoogleIamV1TestIamPermissionsResponse{ - 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 -} - -type ProjectsLocationsInsightsConfiguredInsightCall struct { - s *Service - insight string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ConfiguredInsight: Gets the value for a selected particular insight based on -// the provided filters. Use the organization level path for fetching at org -// level and project level path for fetching the insight value specific to a -// particular project. -// -// - insight: The resource name of the insight using the form: -// `organizations/{organization_id}/locations/{location_id}/insights/{insight_ -// id}` -// `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. -func (r *ProjectsLocationsInsightsService) ConfiguredInsight(insight string) *ProjectsLocationsInsightsConfiguredInsightCall { - c := &ProjectsLocationsInsightsConfiguredInsightCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.insight = insight - return c -} - -// Aggregation sets the optional parameter "aggregation": Required. Aggregation -// type. Available aggregation could be fetched by calling insight list and get -// APIs in `BASIC` view. -// -// Possible values: -// -// "AGGREGATION_UNSPECIFIED" - Unspecified. -// "HOURLY" - Insight should be aggregated at hourly level. -// "DAILY" - Insight should be aggregated at daily level. -// "WEEKLY" - Insight should be aggregated at weekly level. -// "MONTHLY" - Insight should be aggregated at monthly level. -// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom date -// -// range passed in as the start and end time in the request. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Aggregation(aggregation string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("aggregation", aggregation) - return c -} - -// CustomGroupingFieldFilter sets the optional parameter -// "customGrouping.fieldFilter": Filterable parameters to be added to the -// grouping clause. Available fields could be fetched by calling insight list -// and get APIs in `BASIC` view. `=` is the only comparison operator supported. -// `AND` is the only logical operator supported. Usage: -// field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only -// `AND` conditions are allowed. NOTE: Use the `filter_alias` from -// `Insight.Metadata.Field` message for the filtering the corresponding fields -// in this filter field. (These expressions are based on the filter language -// described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingFieldFilter(customGroupingFieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("customGrouping.fieldFilter", customGroupingFieldFilter) - return c -} - -// CustomGroupingGroupFields sets the optional parameter -// "customGrouping.groupFields": Required. Fields to be used for grouping. -// NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for -// declaring the fields to be grouped-by here. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingGroupFields(customGroupingGroupFields ...string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.SetMulti("customGrouping.groupFields", append([]string{}, customGroupingGroupFields...)) - return c -} - -// EndTime sets the optional parameter "endTime": Required. Ending time for the -// duration for which insight is to be pulled. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) EndTime(endTime string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("endTime", endTime) - return c -} - -// FieldFilter sets the optional parameter "fieldFilter": Other -// filterable/configurable parameters as applicable to the selected insight. -// Available fields could be fetched by calling insight list and get APIs in -// `BASIC` view. `=` is the only comparison operator supported. `AND` is the -// only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 -// AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: -// Use the `filter_alias` from `Insight.Metadata.Field` message for the -// filtering the corresponding fields in this filter field. (These expressions -// are based on the filter language described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsConfiguredInsightCall) FieldFilter(fieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("fieldFilter", fieldFilter) - return c +// FieldFilter sets the optional parameter "fieldFilter": Other +// filterable/configurable parameters as applicable to the selected insight. +// Available fields could be fetched by calling insight list and get APIs in +// `BASIC` view. `=` is the only comparison operator supported. `AND` is the +// only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 +// AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: +// Use the `filter_alias` from `Insight.Metadata.Field` message for the +// filtering the corresponding fields in this filter field. (These expressions +// are based on the filter language described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsConfiguredInsightCall) FieldFilter(fieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("fieldFilter", fieldFilter) + return c } // Group sets the optional parameter "group": Group id of the available @@ -19143,7 +18746,7 @@ func (c *ProjectsLocationsSecurityGatewaysPatchCall) RequestId(requestId string) } // UpdateMask sets the optional parameter "updateMask": Required. Mutable -// fields include: display_name, gateway_regions. +// fields include: display_name, hubs. func (c *ProjectsLocationsSecurityGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSecurityGatewaysPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -19246,157 +18849,48 @@ type ProjectsLocationsSecurityGatewaysSetIamPolicyCall struct { // 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 *ProjectsLocationsSecurityGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { - c := &ProjectsLocationsSecurityGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "beyondcorp.projects.locations.securityGateways.setIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.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 *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ - 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 -} - -type ProjectsLocationsSecurityGatewaysTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - 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 *ProjectsLocationsSecurityGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { - c := &ProjectsLocationsSecurityGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// See Resource names (https://cloud.google.com/apis/design/resource_names) +// for the appropriate value for this field. +func (r *ProjectsLocationsSecurityGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { + c := &ProjectsLocationsSecurityGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19409,13 +18903,13 @@ func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.testIamPermissions" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsSecurityGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19434,7 +18928,7 @@ func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19447,95 +18941,81 @@ func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsSecurityGatewaysApplicationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysSetPeeringCall struct { + s *Service + securityGateway string + googlecloudbeyondcorpsecuritygatewaysv1alphasetpeeringrequest *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSetPeeringRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single Application. +// SetPeering: This is a custom method to allow customers to create a peering +// connections between Google network and customer networks. This is enabled +// only for the allowlisted customers. // -// - name: Name of the resource. -func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Delete(name string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { - c := &ProjectsLocationsSecurityGatewaysApplicationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. The server will guarantee that for at least 60 minutes after -// the first request. For example, consider a situation where you make an -// initial request and the request times out. If you make the request again -// with the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second request. -// This prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, validates -// request by executing a dry-run which would not alter the resource in any -// way. -func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - securityGateway: BeyondCorp SecurityGateway name using the form: +// `projects/{project}/locations/{location}/securityGateways/{security_gateway +// }`. +func (r *ProjectsLocationsSecurityGatewaysService) SetPeering(securityGateway string, googlecloudbeyondcorpsecuritygatewaysv1alphasetpeeringrequest *GoogleCloudBeyondcorpSecuritygatewaysV1alphaSetPeeringRequest) *ProjectsLocationsSecurityGatewaysSetPeeringCall { + c := &ProjectsLocationsSecurityGatewaysSetPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.securityGateway = securityGateway + c.googlecloudbeyondcorpsecuritygatewaysv1alphasetpeeringrequest = googlecloudbeyondcorpsecuritygatewaysv1alphasetpeeringrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysSetPeeringCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysSetPeeringCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysSetPeeringCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysSetPeeringCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysSetPeeringCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsSecurityGatewaysSetPeeringCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpsecuritygatewaysv1alphasetpeeringrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+securityGateway}:setPeering") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "securityGateway": c.securityGateway, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.applications.delete" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.setPeering" call. // 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 *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSecurityGatewaysSetPeeringCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19567,85 +19047,84 @@ func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsSecurityGatewaysApplicationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single Application. +// 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. // -// - name: The resource name of the Application using the form: -// `projects/{project_id}/locations/global/securityGateway/{security_gateway_i -// d}/applications/{application_id}`. -func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Get(name string) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { - c := &ProjectsLocationsSecurityGatewaysApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsSecurityGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { + c := &ProjectsLocationsSecurityGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.applications.get" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication.ServerResponse.Heade -// r or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleIamV1TestIamPermissionsResponse.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 *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication, error) { +func (c *ProjectsLocationsSecurityGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19664,7 +19143,7 @@ func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19677,121 +19156,95 @@ func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsSecurityGatewaysApplicationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysApplicationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Applications in a given project and location. +// Delete: Deletes a single Application. // -// - parent: The parent location to which the resources belong. -// `projects/{project_id}/locations/global/securityGateways/{security_gateway_ -// id}`. -func (r *ProjectsLocationsSecurityGatewaysApplicationsService) List(parent string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { - c := &ProjectsLocationsSecurityGatewaysApplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter specifying constraints -// of a list operation. All fields in the Hub message are supported. For -// example, the following query will return the Hub with displayName -// "test-application" For more information, please refer to -// https://google.aip.dev/160. -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering of -// results. See Sorting order -// (https://cloud.google.com/apis/design/design_patterns#sorting_order) for -// more information. -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { - c.urlParams_.Set("orderBy", orderBy) +// - name: Name of the resource. +func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Delete(name string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": The maximum number of items -// to return. If not specified, a default value of 50 will be used by the -// service. Regardless of the page_size value, the response may include a -// partial list and a caller should only rely on response's next_page_token to -// determine if there are more instances left to be queried. -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysApplicationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } -// PageToken sets the optional parameter "pageToken": The next_page_token value -// returned from a previous ListHubsRequest, if any. -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// ValidateOnly sets the optional parameter "validateOnly": If set, validates +// request by executing a dry-run which would not alter the resource in any +// way. +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.applications.list" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse.ServerR -// esponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse, error) { +// *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 *ProjectsLocationsSecurityGatewaysApplicationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19810,7 +19263,7 @@ func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19823,99 +19276,68 @@ func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Do(opts ...googl return ret, nil } -// 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 *ProjectsLocationsSecurityGatewaysApplicationsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProjectsLocationsSecurityGatewaysHubsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSecurityGatewaysApplicationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single Hub. +// Get: Gets details of a single Application. // -// - name: Name of the resource. -func (r *ProjectsLocationsSecurityGatewaysHubsService) Delete(name string) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { - c := &ProjectsLocationsSecurityGatewaysHubsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Application using the form: +// `projects/{project_id}/locations/global/securityGateway/{security_gateway_i +// d}/applications/{application_id}`. +func (r *ProjectsLocationsSecurityGatewaysApplicationsService) Get(name string) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// RequestId sets the optional parameter "requestId": An optional request ID to -// identify requests. Specify a unique request ID so that if you must retry -// your request, the server will know to ignore the request if it has already -// been completed. The server will guarantee that for at least 60 minutes after -// the first request. For example, consider a situation where you make an -// initial request and the request times out. If you make the request again -// with the same request ID, the server can check if original operation with -// the same request ID was received, and if so, will ignore the second request. -// This prevents clients from accidentally creating duplicate commitments. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported (00000000-0000-0000-0000-000000000000). -func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) RequestId(requestId string) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, validates -// request by executing a dry-run which would not alter the resource in any -// way. -func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysHubsDeleteCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -19926,13 +19348,13 @@ func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.hubs.delete" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.get" call. // 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 +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication.ServerResponse.Heade +// r 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 *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19951,7 +19373,7 @@ func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaApplication{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19964,30 +19386,48 @@ func (c *ProjectsLocationsSecurityGatewaysHubsDeleteCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsSecurityGatewaysHubsGetCall struct { +type ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall struct { s *Service - name string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets details of a single Hub. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: The resource name of the Hub using the form: -// `projects/{project_id}/locations/global/securityGateway/{security_gateway_i -// d}/hubs/{hub_id}`. -func (r *ProjectsLocationsSecurityGatewaysHubsService) Get(name string) *ProjectsLocationsSecurityGatewaysHubsGetCall { - c := &ProjectsLocationsSecurityGatewaysHubsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsSecurityGatewaysApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall{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 *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysHubsGetCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19995,27 +19435,27 @@ func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Fields(s ...googleapi.Fie // IfNoneMatch sets an 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. -func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysHubsGetCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysHubsGetCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20023,7 +19463,7 @@ func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) 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, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20031,18 +19471,18 @@ func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.hubs.get" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub.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 *ProjectsLocationsSecurityGatewaysHubsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub, error) { +// *GoogleIamV1Policy.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 *ProjectsLocationsSecurityGatewaysApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20061,7 +19501,7 @@ func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaHub{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20074,7 +19514,7 @@ func (c *ProjectsLocationsSecurityGatewaysHubsGetCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsSecurityGatewaysHubsListCall struct { +type ProjectsLocationsSecurityGatewaysApplicationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -20083,22 +19523,23 @@ type ProjectsLocationsSecurityGatewaysHubsListCall struct { header_ http.Header } -// List: Lists Hubs in a given project and location. +// List: Lists Applications in a given project and location. // // - parent: The parent location to which the resources belong. // `projects/{project_id}/locations/global/securityGateways/{security_gateway_ // id}`. -func (r *ProjectsLocationsSecurityGatewaysHubsService) List(parent string) *ProjectsLocationsSecurityGatewaysHubsListCall { - c := &ProjectsLocationsSecurityGatewaysHubsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsSecurityGatewaysApplicationsService) List(parent string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": A filter specifying constraints -// of a list operation. All fields in the Hub message are supported. For -// example, the following query will return the Hub with displayName "test-hub" -// For more information, please refer to https://google.aip.dev/160. -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysHubsListCall { +// of a list operation. All fields in the Application message are supported. +// For example, the following query will return the Application with +// displayName "test-application" For more information, please refer to +// https://google.aip.dev/160. +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Filter(filter string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("filter", filter) return c } @@ -20107,7 +19548,7 @@ func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Filter(filter string) *P // results. See Sorting order // (https://cloud.google.com/apis/design/design_patterns#sorting_order) for // more information. -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysHubsListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) OrderBy(orderBy string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -20117,14 +19558,14 @@ func (c *ProjectsLocationsSecurityGatewaysHubsListCall) OrderBy(orderBy string) // service. Regardless of the page_size value, the response may include a // partial list and a caller should only rely on response's next_page_token to // determine if there are more instances left to be queried. -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysHubsListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) PageSize(pageSize int64) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The next_page_token value -// returned from a previous ListHubsRequest, if any. -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysHubsListCall { +// returned from a previous ListApplicationsRequest, if any. +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) PageToken(pageToken string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20132,7 +19573,7 @@ func (c *ProjectsLocationsSecurityGatewaysHubsListCall) PageToken(pageToken stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysHubsListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20140,27 +19581,27 @@ func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Fields(s ...googleapi.Fi // IfNoneMatch sets an 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. -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysHubsListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysHubsListCall { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Header() http.Header { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20168,7 +19609,7 @@ func (c *ProjectsLocationsSecurityGatewaysHubsListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/hubs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/applications") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20181,13 +19622,13 @@ func (c *ProjectsLocationsSecurityGatewaysHubsListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.securityGateways.hubs.list" call. +// Do executes the "beyondcorp.projects.locations.securityGateways.applications.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse.ServerResponse. -// Header or (if a response was returned at all) in +// *GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse.ServerR +// esponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse, error) { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20206,7 +19647,7 @@ func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse{ + ret := &GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20222,7 +19663,7 @@ func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Do(opts ...googleapi.Cal // 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 *ProjectsLocationsSecurityGatewaysHubsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListHubsResponse) error) error { +func (c *ProjectsLocationsSecurityGatewaysApplicationsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSecuritygatewaysV1alphaListApplicationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20239,3 +19680,109 @@ func (c *ProjectsLocationsSecurityGatewaysHubsListCall) Pages(ctx context.Contex c.PageToken(x.NextPageToken) } } + +type ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + 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 *ProjectsLocationsSecurityGatewaysApplicationsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall { + c := &ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "beyondcorp.projects.locations.securityGateways.applications.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.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 *ProjectsLocationsSecurityGatewaysApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + 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 +} diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index e9e70c49ec6..37efa8dcdbf 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -39,6 +39,11 @@ "endpointUrl": "https://bigquery.europe-west3.rep.googleapis.com/", "location": "europe-west3" }, + { + "description": "Regional Endpoint", + "endpointUrl": "https://bigquery.europe-west8.rep.googleapis.com/", + "location": "europe-west8" + }, { "description": "Regional Endpoint", "endpointUrl": "https://bigquery.europe-west9.rep.googleapis.com/", @@ -1935,7 +1940,7 @@ } } }, - "revision": "20240815", + "revision": "20240905", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -3269,12 +3274,12 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. The [tags](/bigquery/docs/tags) attached to this dataset. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"123456789012/environment\" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"Production\". See [Tag definitions](/iam/docs/tags-access-control#definitions) for more details.", + "description": "Optional. The [tags](https://cloud.google.com/bigquery/docs/tags) attached to this dataset. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example \"123456789012/environment\" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example \"Production\". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details.", "type": "object" }, "restrictions": { "$ref": "RestrictionConfig", - "description": "Optional. Output only. Restriction config for all tables and dataset. If set, restrict certain accesses on the dataset and all its tables based on the config. See [Data egress](/bigquery/docs/analytics-hub-introduction#data_egress) for more details.", + "description": "Optional. Output only. Restriction config for all tables and dataset. If set, restrict certain accesses on the dataset and all its tables based on the config. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details.", "readOnly": true }, "satisfiesPzi": { @@ -4516,7 +4521,7 @@ "type": "object" }, "HparamTuningTrial": { - "description": "Training info of a trial in [hyperparameter tuning](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models.", + "description": "Training info of a trial in [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models.", "id": "HparamTuningTrial", "properties": { "endTimeMs": { @@ -4614,6 +4619,7 @@ "NOT_SUPPORTED_IN_STANDARD_EDITION", "INDEX_SUPPRESSED_BY_FUNCTION_OPTION", "QUERY_CACHE_HIT", + "STALE_INDEX", "INTERNAL_ERROR", "OTHER_REASON" ], @@ -4636,6 +4642,7 @@ "Indicates that search indexes can not be used for search query with STANDARD edition.", "Indicates that an option in the search function that cannot make use of the index has been selected.", "Indicates that the query was cached, and thus the search index was not used.", + "The index cannot be used in the search query because it is stale.", "Indicates an internal error that causes the search index to be unused.", "Indicates that the reason search indexes cannot be used in the query is not covered by any of the other IndexUnusedReason options." ], @@ -4810,7 +4817,7 @@ }, "jobCreationReason": { "$ref": "JobCreationReason", - "description": "Output only. The reason why a Job was created. [Preview](/products/#product-launch-stages)", + "description": "Output only. The reason why a Job was created. [Preview](https://cloud.google.com/products/#product-launch-stages)", "readOnly": true }, "jobReference": { @@ -5370,7 +5377,7 @@ "type": "object" }, "JobCreationReason": { - "description": "Reason about why a Job was created from a [`jobs.query`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method when used with `JOB_CREATION_OPTIONAL` Job creation mode. For [`jobs.insert`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) method calls it will always be `REQUESTED`. [Preview](/products/#product-launch-stages)", + "description": "Reason about why a Job was created from a [`jobs.query`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query) method when used with `JOB_CREATION_OPTIONAL` Job creation mode. For [`jobs.insert`](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) method calls it will always be `REQUESTED`. [Preview](https://cloud.google.com/products/#product-launch-stages)", "id": "JobCreationReason", "properties": { "code": { @@ -5854,7 +5861,7 @@ "readOnly": true }, "statementType": { - "description": "Output only. The type of query statement, if valid. Possible values: * `SELECT`: [`SELECT`](/bigquery/docs/reference/standard-sql/query-syntax#select_list) statement. * `ASSERT`: [`ASSERT`](/bigquery/docs/reference/standard-sql/debugging-statements#assert) statement. * `INSERT`: [`INSERT`](/bigquery/docs/reference/standard-sql/dml-syntax#insert_statement) statement. * `UPDATE`: [`UPDATE`](/bigquery/docs/reference/standard-sql/query-syntax#update_statement) statement. * `DELETE`: [`DELETE`](/bigquery/docs/reference/standard-sql/data-manipulation-language) statement. * `MERGE`: [`MERGE`](/bigquery/docs/reference/standard-sql/data-manipulation-language) statement. * `CREATE_TABLE`: [`CREATE TABLE`](/bigquery/docs/reference/standard-sql/data-definition-language#create_table_statement) statement, without `AS SELECT`. * `CREATE_TABLE_AS_SELECT`: [`CREATE TABLE AS SELECT`](/bigquery/docs/reference/standard-sql/data-definition-language#query_statement) statement. * `CREATE_VIEW`: [`CREATE VIEW`](/bigquery/docs/reference/standard-sql/data-definition-language#create_view_statement) statement. * `CREATE_MODEL`: [`CREATE MODEL`](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create#create_model_statement) statement. * `CREATE_MATERIALIZED_VIEW`: [`CREATE MATERIALIZED VIEW`](/bigquery/docs/reference/standard-sql/data-definition-language#create_materialized_view_statement) statement. * `CREATE_FUNCTION`: [`CREATE FUNCTION`](/bigquery/docs/reference/standard-sql/data-definition-language#create_function_statement) statement. * `CREATE_TABLE_FUNCTION`: [`CREATE TABLE FUNCTION`](/bigquery/docs/reference/standard-sql/data-definition-language#create_table_function_statement) statement. * `CREATE_PROCEDURE`: [`CREATE PROCEDURE`](/bigquery/docs/reference/standard-sql/data-definition-language#create_procedure) statement. * `CREATE_ROW_ACCESS_POLICY`: [`CREATE ROW ACCESS POLICY`](/bigquery/docs/reference/standard-sql/data-definition-language#create_row_access_policy_statement) statement. * `CREATE_SCHEMA`: [`CREATE SCHEMA`](/bigquery/docs/reference/standard-sql/data-definition-language#create_schema_statement) statement. * `CREATE_SNAPSHOT_TABLE`: [`CREATE SNAPSHOT TABLE`](/bigquery/docs/reference/standard-sql/data-definition-language#create_snapshot_table_statement) statement. * `CREATE_SEARCH_INDEX`: [`CREATE SEARCH INDEX`](/bigquery/docs/reference/standard-sql/data-definition-language#create_search_index_statement) statement. * `DROP_TABLE`: [`DROP TABLE`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_statement) statement. * `DROP_EXTERNAL_TABLE`: [`DROP EXTERNAL TABLE`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_external_table_statement) statement. * `DROP_VIEW`: [`DROP VIEW`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_view_statement) statement. * `DROP_MODEL`: [`DROP MODEL`](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-drop-model) statement. * `DROP_MATERIALIZED_VIEW`: [`DROP MATERIALIZED VIEW`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_materialized_view_statement) statement. * `DROP_FUNCTION` : [`DROP FUNCTION`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_function_statement) statement. * `DROP_TABLE_FUNCTION` : [`DROP TABLE FUNCTION`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_function) statement. * `DROP_PROCEDURE`: [`DROP PROCEDURE`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_procedure_statement) statement. * `DROP_SEARCH_INDEX`: [`DROP SEARCH INDEX`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_search_index) statement. * `DROP_SCHEMA`: [`DROP SCHEMA`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_schema_statement) statement. * `DROP_SNAPSHOT_TABLE`: [`DROP SNAPSHOT TABLE`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_snapshot_table_statement) statement. * `DROP_ROW_ACCESS_POLICY`: [`DROP [ALL] ROW ACCESS POLICY|POLICIES`](/bigquery/docs/reference/standard-sql/data-definition-language#drop_row_access_policy_statement) statement. * `ALTER_TABLE`: [`ALTER TABLE`](/bigquery/docs/reference/standard-sql/data-definition-language#alter_table_set_options_statement) statement. * `ALTER_VIEW`: [`ALTER VIEW`](/bigquery/docs/reference/standard-sql/data-definition-language#alter_view_set_options_statement) statement. * `ALTER_MATERIALIZED_VIEW`: [`ALTER MATERIALIZED VIEW`](/bigquery/docs/reference/standard-sql/data-definition-language#alter_materialized_view_set_options_statement) statement. * `ALTER_SCHEMA`: [`ALTER SCHEMA`](/bigquery/docs/reference/standard-sql/data-definition-language#aalter_schema_set_options_statement) statement. * `SCRIPT`: [`SCRIPT`](/bigquery/docs/reference/standard-sql/procedural-language). * `TRUNCATE_TABLE`: [`TRUNCATE TABLE`](/bigquery/docs/reference/standard-sql/dml-syntax#truncate_table_statement) statement. * `CREATE_EXTERNAL_TABLE`: [`CREATE EXTERNAL TABLE`](/bigquery/docs/reference/standard-sql/data-definition-language#create_external_table_statement) statement. * `EXPORT_DATA`: [`EXPORT DATA`](/bigquery/docs/reference/standard-sql/other-statements#export_data_statement) statement. * `EXPORT_MODEL`: [`EXPORT MODEL`](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-export-model) statement. * `LOAD_DATA`: [`LOAD DATA`](/bigquery/docs/reference/standard-sql/other-statements#load_data_statement) statement. * `CALL`: [`CALL`](/bigquery/docs/reference/standard-sql/procedural-language#call) statement.", + "description": "Output only. The type of query statement, if valid. Possible values: * `SELECT`: [`SELECT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select_list) statement. * `ASSERT`: [`ASSERT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/debugging-statements#assert) statement. * `INSERT`: [`INSERT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#insert_statement) statement. * `UPDATE`: [`UPDATE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#update_statement) statement. * `DELETE`: [`DELETE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language) statement. * `MERGE`: [`MERGE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language) statement. * `CREATE_TABLE`: [`CREATE TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_table_statement) statement, without `AS SELECT`. * `CREATE_TABLE_AS_SELECT`: [`CREATE TABLE AS SELECT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#query_statement) statement. * `CREATE_VIEW`: [`CREATE VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_view_statement) statement. * `CREATE_MODEL`: [`CREATE MODEL`](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create#create_model_statement) statement. * `CREATE_MATERIALIZED_VIEW`: [`CREATE MATERIALIZED VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_materialized_view_statement) statement. * `CREATE_FUNCTION`: [`CREATE FUNCTION`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_function_statement) statement. * `CREATE_TABLE_FUNCTION`: [`CREATE TABLE FUNCTION`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_table_function_statement) statement. * `CREATE_PROCEDURE`: [`CREATE PROCEDURE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_procedure) statement. * `CREATE_ROW_ACCESS_POLICY`: [`CREATE ROW ACCESS POLICY`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_row_access_policy_statement) statement. * `CREATE_SCHEMA`: [`CREATE SCHEMA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_schema_statement) statement. * `CREATE_SNAPSHOT_TABLE`: [`CREATE SNAPSHOT TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_snapshot_table_statement) statement. * `CREATE_SEARCH_INDEX`: [`CREATE SEARCH INDEX`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_search_index_statement) statement. * `DROP_TABLE`: [`DROP TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_statement) statement. * `DROP_EXTERNAL_TABLE`: [`DROP EXTERNAL TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_external_table_statement) statement. * `DROP_VIEW`: [`DROP VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_view_statement) statement. * `DROP_MODEL`: [`DROP MODEL`](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-drop-model) statement. * `DROP_MATERIALIZED_VIEW`: [`DROP MATERIALIZED VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_materialized_view_statement) statement. * `DROP_FUNCTION` : [`DROP FUNCTION`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_function_statement) statement. * `DROP_TABLE_FUNCTION` : [`DROP TABLE FUNCTION`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_function) statement. * `DROP_PROCEDURE`: [`DROP PROCEDURE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_procedure_statement) statement. * `DROP_SEARCH_INDEX`: [`DROP SEARCH INDEX`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_search_index) statement. * `DROP_SCHEMA`: [`DROP SCHEMA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_schema_statement) statement. * `DROP_SNAPSHOT_TABLE`: [`DROP SNAPSHOT TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_snapshot_table_statement) statement. * `DROP_ROW_ACCESS_POLICY`: [`DROP [ALL] ROW ACCESS POLICY|POLICIES`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_row_access_policy_statement) statement. * `ALTER_TABLE`: [`ALTER TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_table_set_options_statement) statement. * `ALTER_VIEW`: [`ALTER VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_view_set_options_statement) statement. * `ALTER_MATERIALIZED_VIEW`: [`ALTER MATERIALIZED VIEW`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_materialized_view_set_options_statement) statement. * `ALTER_SCHEMA`: [`ALTER SCHEMA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#aalter_schema_set_options_statement) statement. * `SCRIPT`: [`SCRIPT`](https://cloud.google.com/bigquery/docs/reference/standard-sql/procedural-language). * `TRUNCATE_TABLE`: [`TRUNCATE TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#truncate_table_statement) statement. * `CREATE_EXTERNAL_TABLE`: [`CREATE EXTERNAL TABLE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_external_table_statement) statement. * `EXPORT_DATA`: [`EXPORT DATA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/other-statements#export_data_statement) statement. * `EXPORT_MODEL`: [`EXPORT MODEL`](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-export-model) statement. * `LOAD_DATA`: [`LOAD DATA`](https://cloud.google.com/bigquery/docs/reference/standard-sql/other-statements#load_data_statement) statement. * `CALL`: [`CALL`](https://cloud.google.com/bigquery/docs/reference/standard-sql/procedural-language#call) statement.", "readOnly": true, "type": "string" }, @@ -6370,7 +6377,7 @@ "id": "MlStatistics", "properties": { "hparamTrials": { - "description": "Output only. Trials of a [hyperparameter tuning job](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) sorted by trial_id.", + "description": "Output only. Trials of a [hyperparameter tuning job](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) sorted by trial_id.", "items": { "$ref": "HparamTuningTrial" }, @@ -6378,7 +6385,7 @@ "type": "array" }, "iterationResults": { - "description": "Results for all completed iterations. Empty for [hyperparameter tuning jobs](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview).", + "description": "Results for all completed iterations. Empty for [hyperparameter tuning jobs](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview).", "items": { "$ref": "IterationResult" }, @@ -6459,7 +6466,7 @@ "enumDescriptions": [ "Unspecified training type.", "Single training with fixed parameter space.", - "[Hyperparameter tuning training](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview)." + "[Hyperparameter tuning training](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview)." ], "readOnly": true, "type": "string" @@ -6483,7 +6490,7 @@ "type": "string" }, "defaultTrialId": { - "description": "Output only. The default trial_id to use in TVFs when the trial_id is not passed in. For single-objective [hyperparameter tuning](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, this is the best trial ID. For multi-objective [hyperparameter tuning](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, this is the smallest trial ID among all Pareto optimal trials.", + "description": "Output only. The default trial_id to use in TVFs when the trial_id is not passed in. For single-objective [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, this is the best trial ID. For multi-objective [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, this is the smallest trial ID among all Pareto optimal trials.", "format": "int64", "readOnly": true, "type": "string" @@ -6524,7 +6531,7 @@ "readOnly": true }, "hparamTrials": { - "description": "Output only. Trials of a [hyperparameter tuning](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) model sorted by trial_id.", + "description": "Output only. Trials of a [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) model sorted by trial_id.", "items": { "$ref": "HparamTuningTrial" }, @@ -6621,7 +6628,7 @@ "type": "string" }, "optimalTrialIds": { - "description": "Output only. For single-objective [hyperparameter tuning](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, it only contains the best trial. For multi-objective [hyperparameter tuning](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, it contains all Pareto optimal trials sorted by trial_id.", + "description": "Output only. For single-objective [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, it only contains the best trial. For multi-objective [hyperparameter tuning](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) models, it contains all Pareto optimal trials sorted by trial_id.", "items": { "format": "int64", "type": "string" @@ -6688,7 +6695,7 @@ "id": "ModelExtractOptions", "properties": { "trialId": { - "description": "The 1-based ID of the trial to be exported from a hyperparameter tuning model. If not specified, the trial with id = [Model](/bigquery/docs/reference/rest/v2/models#resource:-model).defaultTrialId is exported. This field is ignored for models not trained with hyperparameter tuning.", + "description": "The 1-based ID of the trial to be exported from a hyperparameter tuning model. If not specified, the trial with id = [Model](https://cloud.google.com/bigquery/docs/reference/rest/v2/models#resource:-model).defaultTrialId is exported. This field is ignored for models not trained with hyperparameter tuning.", "format": "int64", "type": "string" } @@ -7109,7 +7116,7 @@ "description": "Optional. Output format adjustments." }, "jobCreationMode": { - "description": "Optional. If not set, jobs are always required. If set, the query request will follow the behavior described JobCreationMode. [Preview](/products/#product-launch-stages)", + "description": "Optional. If not set, jobs are always required. If set, the query request will follow the behavior described JobCreationMode. [Preview](https://cloud.google.com/products/#product-launch-stages)", "enum": [ "JOB_CREATION_MODE_UNSPECIFIED", "JOB_CREATION_REQUIRED", @@ -7216,7 +7223,7 @@ }, "jobCreationReason": { "$ref": "JobCreationReason", - "description": "Optional. The reason why a Job was created. Only relevant when a job_reference is present in the response. If job_reference is not present it will always be unset. [Preview](/products/#product-launch-stages)" + "description": "Optional. The reason why a Job was created. Only relevant when a job_reference is present in the response. If job_reference is not present it will always be unset. [Preview](https://cloud.google.com/products/#product-launch-stages)" }, "jobReference": { "$ref": "JobReference", @@ -7238,7 +7245,7 @@ "type": "string" }, "queryId": { - "description": "Auto-generated ID for the query. [Preview](/products/#product-launch-stages)", + "description": "Auto-generated ID for the query. [Preview](https://cloud.google.com/products/#product-launch-stages)", "type": "string" }, "rows": { @@ -7502,7 +7509,7 @@ ], "enumDescriptions": [ "Should never be used.", - "Restrict data egress. See [Data egress](/bigquery/docs/analytics-hub-introduction#data_egress) for more details." + "Restrict data egress. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details." ], "readOnly": true, "type": "string" @@ -8266,7 +8273,7 @@ "type": "string" }, "locationUri": { - "description": "Optional. The physical location of the table (e.g. 'gs://spark-dataproc-data/pangea-data/case_sensitive/' or 'gs://spark-dataproc-data/pangea-data/*'). The maximum length is 2056 bytes.", + "description": "Optional. The physical location of the table (e.g. `gs://spark-dataproc-data/pangea-data/case_sensitive/` or `gs://spark-dataproc-data/pangea-data/*`). The maximum length is 2056 bytes.", "type": "string" }, "outputFormat": { @@ -8565,7 +8572,7 @@ }, "restrictions": { "$ref": "RestrictionConfig", - "description": "Optional. Output only. Restriction config for table. If set, restrict certain accesses on the table based on the config. See [Data egress](/bigquery/docs/analytics-hub-introduction#data_egress) for more details.", + "description": "Optional. Output only. Restriction config for table. If set, restrict certain accesses on the table based on the config. See [Data egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) for more details.", "readOnly": true }, "schema": { @@ -8604,7 +8611,7 @@ "description": "If specified, configures time-based partitioning for this table." }, "type": { - "description": "Output only. Describes the table type. The following values are supported: * `TABLE`: A normal BigQuery table. * `VIEW`: A virtual table defined by a SQL query. * `EXTERNAL`: A table that references data stored in an external storage system, such as Google Cloud Storage. * `MATERIALIZED_VIEW`: A precomputed view defined by a SQL query. * `SNAPSHOT`: An immutable BigQuery table that preserves the contents of a base table at a particular time. See additional information on [table snapshots](/bigquery/docs/table-snapshots-intro). The default value is `TABLE`.", + "description": "Output only. Describes the table type. The following values are supported: * `TABLE`: A normal BigQuery table. * `VIEW`: A virtual table defined by a SQL query. * `EXTERNAL`: A table that references data stored in an external storage system, such as Google Cloud Storage. * `MATERIALIZED_VIEW`: A precomputed view defined by a SQL query. * `SNAPSHOT`: An immutable BigQuery table that preserves the contents of a base table at a particular time. See additional information on [table snapshots](https://cloud.google.com/bigquery/docs/table-snapshots-intro). The default value is `TABLE`.", "readOnly": true, "type": "string" }, @@ -9035,7 +9042,7 @@ "description": "Metadata caching eligible table referenced in the query." }, "tableType": { - "description": "[Table type](/bigquery/docs/reference/rest/v2/tables#Table.FIELDS.type).", + "description": "[Table type](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#Table.FIELDS.type).", "type": "string" }, "unusedReason": { diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 82d41a7a90f..d4bd7e23e40 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -2078,18 +2078,21 @@ type Dataset struct { // value can be from 48 to 168 hours (2 to 7 days). The default value is 168 // hours if this is not set. MaxTimeTravelHours int64 `json:"maxTimeTravelHours,omitempty,string"` - // ResourceTags: Optional. The tags (/bigquery/docs/tags) attached to this - // dataset. Tag keys are globally unique. Tag key is expected to be in the - // namespaced format, for example "123456789012/environment" where 123456789012 - // is the ID of the parent organization or project resource for this tag key. - // Tag value is expected to be the short name, for example "Production". See - // Tag definitions (/iam/docs/tags-access-control#definitions) for more + // ResourceTags: Optional. The tags + // (https://cloud.google.com/bigquery/docs/tags) attached to this dataset. Tag + // keys are globally unique. Tag key is expected to be in the namespaced + // format, for example "123456789012/environment" where 123456789012 is the ID + // of the parent organization or project resource for this tag key. Tag value + // is expected to be the short name, for example "Production". See Tag + // definitions + // (https://cloud.google.com/iam/docs/tags-access-control#definitions) for more // details. ResourceTags map[string]string `json:"resourceTags,omitempty"` // Restrictions: Optional. Output only. Restriction config for all tables and // dataset. If set, restrict certain accesses on the dataset and all its tables // based on the config. See Data egress - // (/bigquery/docs/analytics-hub-introduction#data_egress) for more details. + // (https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) + // for more details. Restrictions *RestrictionConfig `json:"restrictions,omitempty"` // SatisfiesPzi: Output only. Reserved for future use. SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` @@ -3829,8 +3832,8 @@ func (s HparamSearchSpaces) MarshalJSON() ([]byte, error) { } // HparamTuningTrial: Training info of a trial in hyperparameter tuning -// (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie -// w) models. +// (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) +// models. type HparamTuningTrial struct { // EndTimeMs: Ending time of the trial. EndTimeMs int64 `json:"endTimeMs,omitempty,string"` @@ -3949,6 +3952,8 @@ type IndexUnusedReason struct { // search function that cannot make use of the index has been selected. // "QUERY_CACHE_HIT" - Indicates that the query was cached, and thus the // search index was not used. + // "STALE_INDEX" - The index cannot be used in the search query because it is + // stale. // "INTERNAL_ERROR" - Indicates an internal error that causes the search // index to be unused. // "OTHER_REASON" - Indicates that the reason search indexes cannot be used @@ -4190,7 +4195,7 @@ type Job struct { // Id: Output only. Opaque ID field of the job. Id string `json:"id,omitempty"` // JobCreationReason: Output only. The reason why a Job was created. Preview - // (/products/#product-launch-stages) + // (https://cloud.google.com/products/#product-launch-stages) JobCreationReason *JobCreationReason `json:"jobCreationReason,omitempty"` // JobReference: Optional. Reference describing the unique-per-user name of the // job. @@ -4894,7 +4899,7 @@ func (s JobConfigurationTableCopy) MarshalJSON() ([]byte, error) { // when used with `JOB_CREATION_OPTIONAL` Job creation mode. For `jobs.insert` // (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/insert) // method calls it will always be `REQUESTED`. Preview -// (/products/#product-launch-stages) +// (https://cloud.google.com/products/#product-launch-stages) type JobCreationReason struct { // Code: Output only. Specifies the high level reason why a Job was created. // @@ -5267,93 +5272,90 @@ type JobStatistics2 struct { SparkStatistics *SparkStatistics `json:"sparkStatistics,omitempty"` // StatementType: Output only. The type of query statement, if valid. Possible // values: * `SELECT`: `SELECT` - // (/bigquery/docs/reference/standard-sql/query-syntax#select_list) statement. - // * `ASSERT`: `ASSERT` - // (/bigquery/docs/reference/standard-sql/debugging-statements#assert) + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#select_list) + // statement. * `ASSERT`: `ASSERT` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/debugging-statements#assert) // statement. * `INSERT`: `INSERT` - // (/bigquery/docs/reference/standard-sql/dml-syntax#insert_statement) + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#insert_statement) // statement. * `UPDATE`: `UPDATE` - // (/bigquery/docs/reference/standard-sql/query-syntax#update_statement) + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#update_statement) // statement. * `DELETE`: `DELETE` - // (/bigquery/docs/reference/standard-sql/data-manipulation-language) + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language) // statement. * `MERGE`: `MERGE` - // (/bigquery/docs/reference/standard-sql/data-manipulation-language) + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-manipulation-language) // statement. * `CREATE_TABLE`: `CREATE TABLE` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_table_ - // statement) statement, without `AS SELECT`. * `CREATE_TABLE_AS_SELECT`: - // `CREATE TABLE AS SELECT` - // (/bigquery/docs/reference/standard-sql/data-definition-language#query_stateme - // nt) statement. * `CREATE_VIEW`: `CREATE VIEW` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_view_s - // tatement) statement. * `CREATE_MODEL`: `CREATE MODEL` - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create#create_mod - // el_statement) statement. * `CREATE_MATERIALIZED_VIEW`: `CREATE MATERIALIZED - // VIEW` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_materi - // alized_view_statement) statement. * `CREATE_FUNCTION`: `CREATE FUNCTION` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_functi - // on_statement) statement. * `CREATE_TABLE_FUNCTION`: `CREATE TABLE FUNCTION` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_table_ - // function_statement) statement. * `CREATE_PROCEDURE`: `CREATE PROCEDURE` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_proced - // ure) statement. * `CREATE_ROW_ACCESS_POLICY`: `CREATE ROW ACCESS POLICY` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_row_ac - // cess_policy_statement) statement. * `CREATE_SCHEMA`: `CREATE SCHEMA` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_schema - // _statement) statement. * `CREATE_SNAPSHOT_TABLE`: `CREATE SNAPSHOT TABLE` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_snapsh - // ot_table_statement) statement. * `CREATE_SEARCH_INDEX`: `CREATE SEARCH - // INDEX` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_search - // _index_statement) statement. * `DROP_TABLE`: `DROP TABLE` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_st - // atement) statement. * `DROP_EXTERNAL_TABLE`: `DROP EXTERNAL TABLE` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_external - // _table_statement) statement. * `DROP_VIEW`: `DROP VIEW` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_view_sta - // tement) statement. * `DROP_MODEL`: `DROP MODEL` - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-drop-model) + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_table_statement) + // statement, without `AS SELECT`. * `CREATE_TABLE_AS_SELECT`: `CREATE TABLE AS + // SELECT` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#query_statement) + // statement. * `CREATE_VIEW`: `CREATE VIEW` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_view_statement) + // statement. * `CREATE_MODEL`: `CREATE MODEL` + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create#create_model_statement) + // statement. * `CREATE_MATERIALIZED_VIEW`: `CREATE MATERIALIZED VIEW` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_materialized_view_statement) + // statement. * `CREATE_FUNCTION`: `CREATE FUNCTION` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_function_statement) + // statement. * `CREATE_TABLE_FUNCTION`: `CREATE TABLE FUNCTION` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_table_function_statement) + // statement. * `CREATE_PROCEDURE`: `CREATE PROCEDURE` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_procedure) + // statement. * `CREATE_ROW_ACCESS_POLICY`: `CREATE ROW ACCESS POLICY` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_row_access_policy_statement) + // statement. * `CREATE_SCHEMA`: `CREATE SCHEMA` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_schema_statement) + // statement. * `CREATE_SNAPSHOT_TABLE`: `CREATE SNAPSHOT TABLE` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_snapshot_table_statement) + // statement. * `CREATE_SEARCH_INDEX`: `CREATE SEARCH INDEX` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_search_index_statement) + // statement. * `DROP_TABLE`: `DROP TABLE` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_statement) + // statement. * `DROP_EXTERNAL_TABLE`: `DROP EXTERNAL TABLE` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_external_table_statement) + // statement. * `DROP_VIEW`: `DROP VIEW` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_view_statement) + // statement. * `DROP_MODEL`: `DROP MODEL` + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-drop-model) // statement. * `DROP_MATERIALIZED_VIEW`: `DROP MATERIALIZED VIEW` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_material - // ized_view_statement) statement. * `DROP_FUNCTION` : `DROP FUNCTION` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_function - // _statement) statement. * `DROP_TABLE_FUNCTION` : `DROP TABLE FUNCTION` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_fu - // nction) statement. * `DROP_PROCEDURE`: `DROP PROCEDURE` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_procedur - // e_statement) statement. * `DROP_SEARCH_INDEX`: `DROP SEARCH INDEX` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_search_i - // ndex) statement. * `DROP_SCHEMA`: `DROP SCHEMA` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_schema_s - // tatement) statement. * `DROP_SNAPSHOT_TABLE`: `DROP SNAPSHOT TABLE` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_snapshot - // _table_statement) statement. * `DROP_ROW_ACCESS_POLICY`: [`DROP ALL] ROW - // ACCESS POLICY|POLICIES` - // (/bigquery/docs/reference/standard-sql/data-definition-language#drop_row_acce - // ss_policy_statement) statement. * `ALTER_TABLE`: `ALTER TABLE` - // (/bigquery/docs/reference/standard-sql/data-definition-language#alter_table_s - // et_options_statement) statement. * `ALTER_VIEW`: `ALTER VIEW` - // (/bigquery/docs/reference/standard-sql/data-definition-language#alter_view_se - // t_options_statement) statement. * `ALTER_MATERIALIZED_VIEW`: `ALTER - // MATERIALIZED VIEW` - // (/bigquery/docs/reference/standard-sql/data-definition-language#alter_materia - // lized_view_set_options_statement) statement. * `ALTER_SCHEMA`: `ALTER - // SCHEMA` - // (/bigquery/docs/reference/standard-sql/data-definition-language#aalter_schema - // _set_options_statement) statement. * `SCRIPT`: `SCRIPT` - // (/bigquery/docs/reference/standard-sql/procedural-language). * - // `TRUNCATE_TABLE`: `TRUNCATE TABLE` - // (/bigquery/docs/reference/standard-sql/dml-syntax#truncate_table_statement) + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_materialized_view_statement) + // statement. * `DROP_FUNCTION` : `DROP FUNCTION` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_function_statement) + // statement. * `DROP_TABLE_FUNCTION` : `DROP TABLE FUNCTION` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_table_function) + // statement. * `DROP_PROCEDURE`: `DROP PROCEDURE` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_procedure_statement) + // statement. * `DROP_SEARCH_INDEX`: `DROP SEARCH INDEX` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_search_index) + // statement. * `DROP_SCHEMA`: `DROP SCHEMA` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_schema_statement) + // statement. * `DROP_SNAPSHOT_TABLE`: `DROP SNAPSHOT TABLE` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_snapshot_table_statement) + // statement. * `DROP_ROW_ACCESS_POLICY`: [`DROP ALL] ROW ACCESS + // POLICY|POLICIES` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#drop_row_access_policy_statement) + // statement. * `ALTER_TABLE`: `ALTER TABLE` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_table_set_options_statement) + // statement. * `ALTER_VIEW`: `ALTER VIEW` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_view_set_options_statement) + // statement. * `ALTER_MATERIALIZED_VIEW`: `ALTER MATERIALIZED VIEW` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_materialized_view_set_options_statement) + // statement. * `ALTER_SCHEMA`: `ALTER SCHEMA` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#aalter_schema_set_options_statement) + // statement. * `SCRIPT`: `SCRIPT` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/procedural-language). + // * `TRUNCATE_TABLE`: `TRUNCATE TABLE` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#truncate_table_statement) // statement. * `CREATE_EXTERNAL_TABLE`: `CREATE EXTERNAL TABLE` - // (/bigquery/docs/reference/standard-sql/data-definition-language#create_extern - // al_table_statement) statement. * `EXPORT_DATA`: `EXPORT DATA` - // (/bigquery/docs/reference/standard-sql/other-statements#export_data_statement - // ) statement. * `EXPORT_MODEL`: `EXPORT MODEL` - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-export-model) + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_external_table_statement) + // statement. * `EXPORT_DATA`: `EXPORT DATA` + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/other-statements#export_data_statement) + // statement. * `EXPORT_MODEL`: `EXPORT MODEL` + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-export-model) // statement. * `LOAD_DATA`: `LOAD DATA` - // (/bigquery/docs/reference/standard-sql/other-statements#load_data_statement) + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/other-statements#load_data_statement) // statement. * `CALL`: `CALL` - // (/bigquery/docs/reference/standard-sql/procedural-language#call) statement. + // (https://cloud.google.com/bigquery/docs/reference/standard-sql/procedural-language#call) + // statement. StatementType string `json:"statementType,omitempty"` // Timeline: Output only. Describes a timeline of job execution. Timeline []*QueryTimelineSample `json:"timeline,omitempty"` @@ -6009,13 +6011,12 @@ func (s MetadataCacheStatistics) MarshalJSON() ([]byte, error) { // MlStatistics: Job statistics specific to a BigQuery ML training job. type MlStatistics struct { // HparamTrials: Output only. Trials of a hyperparameter tuning job - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie - // w) sorted by trial_id. + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) + // sorted by trial_id. HparamTrials []*HparamTuningTrial `json:"hparamTrials,omitempty"` // IterationResults: Results for all completed iterations. Empty for // hyperparameter tuning jobs - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie - // w). + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview). IterationResults []*IterationResult `json:"iterationResults,omitempty"` // MaxIterations: Output only. Maximum number of iterations specified as // max_iterations in the 'CREATE MODEL' query. The actual number of iterations @@ -6057,8 +6058,8 @@ type MlStatistics struct { // "TRAINING_TYPE_UNSPECIFIED" - Unspecified training type. // "SINGLE_TRAINING" - Single training with fixed parameter space. // "HPARAM_TUNING" - [Hyperparameter tuning - // training](/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tunin - // g-overview). + // training](https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bi + // gqueryml-syntax-hp-tuning-overview). TrainingType string `json:"trainingType,omitempty"` // ForceSendFields is a list of field names (e.g. "HparamTrials") to // unconditionally include in API requests. By default, fields with empty or @@ -6086,11 +6087,10 @@ type Model struct { CreationTime int64 `json:"creationTime,omitempty,string"` // DefaultTrialId: Output only. The default trial_id to use in TVFs when the // trial_id is not passed in. For single-objective hyperparameter tuning - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie - // w) models, this is the best trial ID. For multi-objective hyperparameter - // tuning - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie - // w) models, this is the smallest trial ID among all Pareto optimal trials. + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) + // models, this is the best trial ID. For multi-objective hyperparameter tuning + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) + // models, this is the smallest trial ID among all Pareto optimal trials. DefaultTrialId int64 `json:"defaultTrialId,omitempty,string"` // Description: Optional. A user-friendly description of this model. Description string `json:"description,omitempty"` @@ -6117,8 +6117,8 @@ type Model struct { // model. HparamSearchSpaces *HparamSearchSpaces `json:"hparamSearchSpaces,omitempty"` // HparamTrials: Output only. Trials of a hyperparameter tuning - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie - // w) model sorted by trial_id. + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) + // model sorted by trial_id. HparamTrials []*HparamTuningTrial `json:"hparamTrials,omitempty"` // LabelColumns: Output only. Label columns that were used to train this model. // The output of the model will have a "predicted_" prefix to these columns. @@ -6169,11 +6169,11 @@ type Model struct { // clause along with statistics useful for ML analytic functions. ModelType string `json:"modelType,omitempty"` // OptimalTrialIds: Output only. For single-objective hyperparameter tuning - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie - // w) models, it only contains the best trial. For multi-objective - // hyperparameter tuning - // (/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overvie - // w) models, it contains all Pareto optimal trials sorted by trial_id. + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) + // models, it only contains the best trial. For multi-objective hyperparameter + // tuning + // (https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-hp-tuning-overview) + // models, it contains all Pareto optimal trials sorted by trial_id. OptimalTrialIds googleapi.Int64s `json:"optimalTrialIds,omitempty"` // RemoteModelInfo: Output only. Remote model info RemoteModelInfo *RemoteModelInfo `json:"remoteModelInfo,omitempty"` @@ -6256,9 +6256,9 @@ func (s ModelDefinitionModelOptions) MarshalJSON() ([]byte, error) { type ModelExtractOptions struct { // TrialId: The 1-based ID of the trial to be exported from a hyperparameter // tuning model. If not specified, the trial with id = Model - // (/bigquery/docs/reference/rest/v2/models#resource:-model).defaultTrialId is - // exported. This field is ignored for models not trained with hyperparameter - // tuning. + // (https://cloud.google.com/bigquery/docs/reference/rest/v2/models#resource:-model).defaultTrialId + // is exported. This field is ignored for models not trained with + // hyperparameter tuning. TrialId int64 `json:"trialId,omitempty,string"` // ForceSendFields is a list of field names (e.g. "TrialId") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -6900,7 +6900,7 @@ type QueryRequest struct { FormatOptions *DataFormatOptions `json:"formatOptions,omitempty"` // JobCreationMode: Optional. If not set, jobs are always required. If set, the // query request will follow the behavior described JobCreationMode. Preview - // (/products/#product-launch-stages) + // (https://cloud.google.com/products/#product-launch-stages) // // Possible values: // "JOB_CREATION_MODE_UNSPECIFIED" - If unspecified JOB_CREATION_REQUIRED is @@ -7029,7 +7029,8 @@ type QueryResponse struct { JobComplete bool `json:"jobComplete,omitempty"` // JobCreationReason: Optional. The reason why a Job was created. Only relevant // when a job_reference is present in the response. If job_reference is not - // present it will always be unset. Preview (/products/#product-launch-stages) + // present it will always be unset. Preview + // (https://cloud.google.com/products/#product-launch-stages) JobCreationReason *JobCreationReason `json:"jobCreationReason,omitempty"` // JobReference: Reference to the Job that was created to run the query. This // field will be present even if the original request timed out, in which case @@ -7052,7 +7053,7 @@ type QueryResponse struct { // (https://cloud.google.com/bigquery/docs/paging-results). PageToken string `json:"pageToken,omitempty"` // QueryId: Auto-generated ID for the query. Preview - // (/products/#product-launch-stages) + // (https://cloud.google.com/products/#product-launch-stages) QueryId string `json:"queryId,omitempty"` // Rows: An object with as many results as can be contained within the maximum // permitted reply size. To get any additional rows, you can call @@ -7419,8 +7420,8 @@ type RestrictionConfig struct { // Possible values: // "RESTRICTION_TYPE_UNSPECIFIED" - Should never be used. // "RESTRICTED_DATA_EGRESS" - Restrict data egress. See [Data - // egress](/bigquery/docs/analytics-hub-introduction#data_egress) for more - // details. + // egress](https://cloud.google.com/bigquery/docs/analytics-hub-introduction#dat + // a_egress) for more details. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Type") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -8346,8 +8347,8 @@ type StorageDescriptor struct { // maximum length is 128 characters. InputFormat string `json:"inputFormat,omitempty"` // LocationUri: Optional. The physical location of the table (e.g. - // 'gs://spark-dataproc-data/pangea-data/case_sensitive/' or - // 'gs://spark-dataproc-data/pangea-data/*'). The maximum length is 2056 bytes. + // `gs://spark-dataproc-data/pangea-data/case_sensitive/` or + // `gs://spark-dataproc-data/pangea-data/*`). The maximum length is 2056 bytes. LocationUri string `json:"locationUri,omitempty"` // OutputFormat: Optional. Specifies the fully qualified class name of the // OutputFormat (e.g. "org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"). The @@ -8610,7 +8611,8 @@ type Table struct { ResourceTags map[string]string `json:"resourceTags,omitempty"` // Restrictions: Optional. Output only. Restriction config for table. If set, // restrict certain accesses on the table based on the config. See Data egress - // (/bigquery/docs/analytics-hub-introduction#data_egress) for more details. + // (https://cloud.google.com/bigquery/docs/analytics-hub-introduction#data_egress) + // for more details. Restrictions *RestrictionConfig `json:"restrictions,omitempty"` // Schema: Optional. Describes the schema of this table. Schema *TableSchema `json:"schema,omitempty"` @@ -8640,8 +8642,8 @@ type Table struct { // `MATERIALIZED_VIEW`: A precomputed view defined by a SQL query. * // `SNAPSHOT`: An immutable BigQuery table that preserves the contents of a // base table at a particular time. See additional information on table - // snapshots (/bigquery/docs/table-snapshots-intro). The default value is - // `TABLE`. + // snapshots (https://cloud.google.com/bigquery/docs/table-snapshots-intro). + // The default value is `TABLE`. Type string `json:"type,omitempty"` // View: Optional. The view definition. View *ViewDefinition `json:"view,omitempty"` @@ -9266,7 +9268,7 @@ type TableMetadataCacheUsage struct { // TableReference: Metadata caching eligible table referenced in the query. TableReference *TableReference `json:"tableReference,omitempty"` // TableType: Table type - // (/bigquery/docs/reference/rest/v2/tables#Table.FIELDS.type). + // (https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#Table.FIELDS.type). TableType string `json:"tableType,omitempty"` // UnusedReason: Reason for not using metadata caching for the table. // diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index e417ffd1821..be0d67e7811 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -2194,7 +2194,7 @@ } } }, - "revision": "20240824", + "revision": "20240904", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2375,6 +2375,20 @@ "description": "A backup of a Cloud Bigtable table.", "id": "Backup", "properties": { + "backupType": { + "description": "Indicates the backup type of the backup.", + "enum": [ + "BACKUP_TYPE_UNSPECIFIED", + "STANDARD", + "HOT" + ], + "enumDescriptions": [ + "Not specified.", + "The default type for Cloud Bigtable managed backups. Supported for backups created in both HDD and SSD instances. Requires optimization when restored to a table in an SSD instance.", + "A backup type with faster restore to SSD performance. Only supported for backups created in SSD instances. A new SSD table restored from a hot backup reaches production performance more quickly than a standard backup." + ], + "type": "string" + }, "encryptionInfo": { "$ref": "EncryptionInfo", "description": "Output only. The encryption information for the backup.", @@ -2391,6 +2405,11 @@ "format": "google-datetime", "type": "string" }, + "hotToStandardTime": { + "description": "The time at which the hot backup will be converted to a standard backup. Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the hot backup to a standard backup. This value must be greater than the backup creation time by: - At least 24 hours This field only applies for hot backups. When creating or updating a standard backup, attempting to set this field will fail the request.", + "format": "google-datetime", + "type": "string" + }, "name": { "description": "A globally unique identifier for the backup which cannot be changed. Values are of the form `projects/{project}/instances/{instance}/clusters/{cluster}/ backups/_a-zA-Z0-9*` The final segment of the name must be between 1 and 50 characters in length. The backup is stored in the cluster identified by the prefix of the backup name of the form `projects/{project}/instances/{instance}/clusters/{cluster}`.", "type": "string" @@ -3775,6 +3794,10 @@ "type": "string" }, "type": "array" + }, + "rowAffinity": { + "$ref": "RowAffinity", + "description": "Row affinity sticky routing based on the row key of the request. Requests that span multiple rows are routed non-deterministically." } }, "type": "object" @@ -4007,6 +4030,12 @@ }, "type": "object" }, + "RowAffinity": { + "description": "If enabled, the AFE will route the request based on the row key of the request, rather than randomly. Instead, each row key will be assigned to a cluster, and will stick to that cluster. If clusters are added or removed, then this may affect which row keys stick to which clusters. To avoid this, users can specify a group cluster.", + "id": "RowAffinity", + "properties": {}, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index 8904b414bb4..3b162fa8e0d 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -591,6 +591,18 @@ func (s AutoscalingTargets) MarshalJSON() ([]byte, error) { // Backup: A backup of a Cloud Bigtable table. type Backup struct { + // BackupType: Indicates the backup type of the backup. + // + // Possible values: + // "BACKUP_TYPE_UNSPECIFIED" - Not specified. + // "STANDARD" - The default type for Cloud Bigtable managed backups. + // Supported for backups created in both HDD and SSD instances. Requires + // optimization when restored to a table in an SSD instance. + // "HOT" - A backup type with faster restore to SSD performance. Only + // supported for backups created in SSD instances. A new SSD table restored + // from a hot backup reaches production performance more quickly than a + // standard backup. + BackupType string `json:"backupType,omitempty"` // EncryptionInfo: Output only. The encryption information for the backup. EncryptionInfo *EncryptionInfo `json:"encryptionInfo,omitempty"` // EndTime: Output only. `end_time` is the time that the backup was finished. @@ -601,6 +613,13 @@ type Backup struct { // backup creation time by: - At least 6 hours - At most 90 days Once the // `expire_time` has passed, Cloud Bigtable will delete the backup. ExpireTime string `json:"expireTime,omitempty"` + // HotToStandardTime: The time at which the hot backup will be converted to a + // standard backup. Once the `hot_to_standard_time` has passed, Cloud Bigtable + // will convert the hot backup to a standard backup. This value must be greater + // than the backup creation time by: - At least 24 hours This field only + // applies for hot backups. When creating or updating a standard backup, + // attempting to set this field will fail the request. + HotToStandardTime string `json:"hotToStandardTime,omitempty"` // Name: A globally unique identifier for the backup which cannot be changed. // Values are of the form // `projects/{project}/instances/{instance}/clusters/{cluster}/ @@ -634,15 +653,15 @@ type Backup struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EncryptionInfo") to + // ForceSendFields is a list of field names (e.g. "BackupType") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EncryptionInfo") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "BackupType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -2736,6 +2755,9 @@ type MultiClusterRoutingUseAny struct { // will be tried in order of distance. If left empty, all clusters are // eligible. ClusterIds []string `json:"clusterIds,omitempty"` + // RowAffinity: Row affinity sticky routing based on the row key of the + // request. Requests that span multiple rows are routed non-deterministically. + RowAffinity *RowAffinity `json:"rowAffinity,omitempty"` // ForceSendFields is a list of field names (e.g. "ClusterIds") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3127,6 +3149,14 @@ func (s RestoreTableRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RowAffinity: If enabled, the AFE will route the request based on the row key +// of the request, rather than randomly. Instead, each row key will be assigned +// to a cluster, and will stick to that cluster. If clusters are added or +// removed, then this may affect which row keys stick to which clusters. To +// avoid this, users can specify a group cluster. +type RowAffinity struct { +} + // SetIamPolicyRequest: Request message for `SetIamPolicy` method. type SetIamPolicyRequest struct { // Policy: REQUIRED: The complete policy to be applied to the `resource`. The diff --git a/calendar/v3/calendar-api.json b/calendar/v3/calendar-api.json index e2347a96bf4..775d6f311a1 100644 --- a/calendar/v3/calendar-api.json +++ b/calendar/v3/calendar-api.json @@ -1090,6 +1090,7 @@ "eventTypes": { "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types.", "enum": [ + "birthday", "default", "focusTime", "fromGmail", @@ -1097,6 +1098,7 @@ "workingLocation" ], "enumDescriptions": [ + "Special all-day events with an annual recurrence.", "Regular events.", "Focus time events.", "Events from Gmail.", @@ -1219,7 +1221,7 @@ "supportsSubscription": true }, "move": { - "description": "Moves an event to another calendar, i.e. changes an event's organizer. Note that only default events can be moved; outOfOffice, focusTime, workingLocation and fromGmail events cannot be moved.", + "description": "Moves an event to another calendar, i.e. changes an event's organizer. Note that only default events can be moved; birthday, focusTime, fromGmail, outOfOffice and workingLocation events cannot be moved.", "httpMethod": "POST", "id": "calendar.events.move", "parameterOrder": [ @@ -1507,6 +1509,7 @@ "eventTypes": { "description": "Event types to return. Optional. This parameter can be repeated multiple times to return events of different types. If unset, returns all event types.", "enum": [ + "birthday", "default", "focusTime", "fromGmail", @@ -1514,6 +1517,7 @@ "workingLocation" ], "enumDescriptions": [ + "Special all-day events with an annual recurrence.", "Regular events.", "Focus time events.", "Events from Gmail.", @@ -1763,7 +1767,7 @@ } } }, - "revision": "20240705", + "revision": "20240906", "rootUrl": "https://www.googleapis.com/", "schemas": { "Acl": { @@ -2420,7 +2424,7 @@ }, "eventType": { "default": "default", - "description": "Specific type of the event. This cannot be modified after the event is created. Possible values are: \n- \"default\" - A regular event or not further specified. \n- \"outOfOffice\" - An out-of-office event. \n- \"focusTime\" - A focus-time event. \n- \"workingLocation\" - A working location event. \n- \"fromGmail\" - An event from Gmail. This type of event cannot be created.", + "description": "Specific type of the event. This cannot be modified after the event is created. Possible values are: \n- \"birthday\" - A special all-day event with an annual recurrence. \n- \"default\" - A regular event or not further specified. \n- \"focusTime\" - A focus-time event. \n- \"fromGmail\" - An event from Gmail. This type of event cannot be created. \n- \"outOfOffice\" - An out-of-office event. \n- \"workingLocation\" - A working location event.", "type": "string" }, "extendedProperties": { diff --git a/calendar/v3/calendar-gen.go b/calendar/v3/calendar-gen.go index ba46119fcf6..18ceb776a5d 100644 --- a/calendar/v3/calendar-gen.go +++ b/calendar/v3/calendar-gen.go @@ -1117,11 +1117,13 @@ type Event struct { Etag string `json:"etag,omitempty"` // EventType: Specific type of the event. This cannot be modified after the // event is created. Possible values are: + // - "birthday" - A special all-day event with an annual recurrence. // - "default" - A regular event or not further specified. - // - "outOfOffice" - An out-of-office event. // - "focusTime" - A focus-time event. - // - "workingLocation" - A working location event. // - "fromGmail" - An event from Gmail. This type of event cannot be created. + // + // - "outOfOffice" - An out-of-office event. + // - "workingLocation" - A working location event. EventType string `json:"eventType,omitempty"` // ExtendedProperties: Extended properties of the event. ExtendedProperties *EventExtendedProperties `json:"extendedProperties,omitempty"` @@ -5287,6 +5289,7 @@ func (c *EventsListCall) AlwaysIncludeEmail(alwaysIncludeEmail bool) *EventsList // // Possible values: // +// "birthday" - Special all-day events with an annual recurrence. // "default" - Regular events. // "focusTime" - Focus time events. // "fromGmail" - Events from Gmail. @@ -5606,8 +5609,8 @@ type EventsMoveCall struct { } // Move: Moves an event to another calendar, i.e. changes an event's organizer. -// Note that only default events can be moved; outOfOffice, focusTime, -// workingLocation and fromGmail events cannot be moved. +// Note that only default events can be moved; birthday, focusTime, fromGmail, +// outOfOffice and workingLocation events cannot be moved. // // - calendarId: Calendar identifier of the source calendar where the event // currently is on. @@ -6238,6 +6241,7 @@ func (c *EventsWatchCall) AlwaysIncludeEmail(alwaysIncludeEmail bool) *EventsWat // // Possible values: // +// "birthday" - Special all-day events with an annual recurrence. // "default" - Regular events. // "focusTime" - Focus time events. // "fromGmail" - Events from Gmail. diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index e878fae1c5f..5f736389728 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -17,6 +17,18 @@ "https://www.googleapis.com/auth/chat.admin.spaces.readonly": { "description": "View display name, description, and other metadata for all Google Chat conversations owned by your organization" }, + "https://www.googleapis.com/auth/chat.app.delete": { + "description": "On their own behalf, apps in Google Chat can delete conversations and spaces and remove access to associated files" + }, + "https://www.googleapis.com/auth/chat.app.memberships": { + "description": "On their own behalf, apps in Google Chat can see, add, update, and remove members from conversations and spaces" + }, + "https://www.googleapis.com/auth/chat.app.spaces": { + "description": "On their own behalf, apps in Google Chat can create conversations and spaces and see or update their metadata (including history settings and access settings)" + }, + "https://www.googleapis.com/auth/chat.app.spaces.create": { + "description": "On their own behalf, apps in Google Chat can create conversations and spaces" + }, "https://www.googleapis.com/auth/chat.bot": { "description": "Private Service: https://www.googleapis.com/auth/chat.bot" }, @@ -278,7 +290,7 @@ ] }, "create": { - "description": "Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", + "description": "Creates a space with no members. Can be used to create a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. If you're a member of the [Developer Preview program](https://developers.google.com/workspace/preview), you can create a group chat in import mode using `spaceType.GROUP_CHAT`. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).", "flatPath": "v1/spaces", "httpMethod": "POST", "id": "chat.spaces.create", @@ -298,6 +310,8 @@ "$ref": "Space" }, "scopes": [ + "https://www.googleapis.com/auth/chat.app.spaces", + "https://www.googleapis.com/auth/chat.app.spaces.create", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.spaces", "https://www.googleapis.com/auth/chat.spaces.create" @@ -320,7 +334,7 @@ "type": "string" }, "useAdminAccess": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.delete` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).", + "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.delete` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).", "location": "query", "type": "boolean" } @@ -331,6 +345,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/chat.admin.delete", + "https://www.googleapis.com/auth/chat.app.delete", "https://www.googleapis.com/auth/chat.delete", "https://www.googleapis.com/auth/chat.import" ] @@ -375,7 +390,7 @@ "type": "string" }, "useAdminAccess": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).", + "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).", "location": "query", "type": "boolean" } @@ -387,6 +402,7 @@ "scopes": [ "https://www.googleapis.com/auth/chat.admin.spaces", "https://www.googleapis.com/auth/chat.admin.spaces.readonly", + "https://www.googleapis.com/auth/chat.app.spaces", "https://www.googleapis.com/auth/chat.bot", "https://www.googleapis.com/auth/chat.spaces", "https://www.googleapis.com/auth/chat.spaces.readonly" @@ -449,7 +465,7 @@ "type": "string" }, "useAdminAccess": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Some `FieldMask` values are not supported using admin access. For details, see the description of `update_mask`.", + "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.spaces` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Some `FieldMask` values are not supported using admin access. For details, see the description of `update_mask`.", "location": "query", "type": "boolean" } @@ -463,12 +479,13 @@ }, "scopes": [ "https://www.googleapis.com/auth/chat.admin.spaces", + "https://www.googleapis.com/auth/chat.app.spaces", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.spaces" ] }, "search": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). Returns a list of spaces based on a user's search. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). The user must be an administrator for the Google Workspace organization. In the request, set `use_admin_access` to `true`.", + "description": "Returns a list of spaces in a Google Workspace organization based on an administrator's search. Requires [user authentication with administrator privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges). In the request, set `use_admin_access` to `true`.", "flatPath": "v1/spaces:search", "httpMethod": "GET", "id": "chat.spaces.search", @@ -550,7 +567,7 @@ "type": "string" }, "useAdminAccess": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Creating app memberships or creating memberships for users outside the administrator's Google Workspace organization isn't supported using admin access.", + "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Creating app memberships or creating memberships for users outside the administrator's Google Workspace organization isn't supported using admin access.", "location": "query", "type": "boolean" } @@ -564,6 +581,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/chat.admin.memberships", + "https://www.googleapis.com/auth/chat.app.memberships", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.memberships", "https://www.googleapis.com/auth/chat.memberships.app" @@ -586,7 +604,7 @@ "type": "string" }, "useAdminAccess": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Deleting app memberships in a space isn't supported using admin access.", + "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Deleting app memberships in a space isn't supported using admin access.", "location": "query", "type": "boolean" } @@ -597,6 +615,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/chat.admin.memberships", + "https://www.googleapis.com/auth/chat.app.memberships", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.memberships", "https://www.googleapis.com/auth/chat.memberships.app" @@ -619,7 +638,7 @@ "type": "string" }, "useAdminAccess": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Getting app memberships in a space isn't supported when using admin access.", + "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` [OAuth 2.0 scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Getting app memberships in a space isn't supported when using admin access.", "location": "query", "type": "boolean" } @@ -646,7 +665,7 @@ ], "parameters": { "filter": { - "description": "Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer Preview: You can also filter for `member.type` using the `!=` operator. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. Either `member.type = \"HUMAN\"` or `member.type != \"BOT\"` is required when `use_admin_access` is set to true. Other member type filters will be rejected. For example, the following queries are valid: ``` role = \"ROLE_MANAGER\" OR role = \"ROLE_MEMBER\" member.type = \"HUMAN\" AND role = \"ROLE_MANAGER\" member.type != \"BOT\" ``` The following queries are invalid: ``` member.type = \"HUMAN\" AND member.type = \"BOT\" role = \"ROLE_MANAGER\" AND role = \"ROLE_MEMBER\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", + "description": "Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also filter for `member.type` using the `!=` operator. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. Either `member.type = \"HUMAN\"` or `member.type != \"BOT\"` is required when `use_admin_access` is set to true. Other member type filters will be rejected. For example, the following queries are valid: ``` role = \"ROLE_MANAGER\" OR role = \"ROLE_MEMBER\" member.type = \"HUMAN\" AND role = \"ROLE_MANAGER\" member.type != \"BOT\" ``` The following queries are invalid: ``` member.type = \"HUMAN\" AND member.type = \"BOT\" role = \"ROLE_MANAGER\" AND role = \"ROLE_MEMBER\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.", "location": "query", "type": "string" }, @@ -679,7 +698,7 @@ "type": "boolean" }, "useAdminAccess": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.memberships.readonly` or `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Listing app memberships in a space isn't supported when using admin access.", + "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires either the `chat.admin.memberships.readonly` or `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). Listing app memberships in a space isn't supported when using admin access.", "location": "query", "type": "boolean" } @@ -720,7 +739,7 @@ "type": "string" }, "useAdminAccess": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).", + "description": "When `true`, the method runs using the user's Google Workspace administrator privileges. The calling user must be a Google Workspace administrator with the [manage chat and spaces conversations privilege](https://support.google.com/a/answer/13369245). Requires the `chat.admin.memberships` [OAuth 2.0 scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).", "location": "query", "type": "boolean" } @@ -734,6 +753,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/chat.admin.memberships", + "https://www.googleapis.com/auth/chat.app.memberships", "https://www.googleapis.com/auth/chat.import", "https://www.googleapis.com/auth/chat.memberships" ] @@ -1324,7 +1344,7 @@ } } }, - "revision": "20240829", + "revision": "20240912", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessSettings": { @@ -1737,7 +1757,7 @@ "type": "object" }, "ChatSpaceLinkData": { - "description": "Data for Chat space links. [Developer Preview](https://developers.google.com/workspace/preview).", + "description": "Data for Chat space links.", "id": "ChatSpaceLinkData", "properties": { "message": { @@ -2321,7 +2341,7 @@ "description": "When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):" }, "sectionDividerStyle": { - "description": "The divider style between sections.", + "description": "The divider style between the header, sections and footer.", "enum": [ "DIVIDER_STYLE_UNSPECIFIED", "SOLID_DIVIDER", @@ -2470,7 +2490,7 @@ "type": "object" }, "GoogleAppsCardV1Columns": { - "description": "The `Columns` widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see [Display cards and dialogs in columns](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_cards_and_dialogs_in_columns). The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns. Columns are displayed side-by-side. You can customize the width of each column using the `HorizontalSizeStyle` field. If the user's screen width is too narrow, the second column wraps below the first: * On web, the second column wraps if the screen width is less than or equal to 480 pixels. * On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt. * On Android devices, the second column wraps if the screen width is less than or equal to 320 dp. To include more than 2 columns, or to use rows, use the `Grid` widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):", + "description": "The `Columns` widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see [Display cards and dialogs in columns](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_cards_and_dialogs_in_columns). The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns. Columns are displayed side-by-side. You can customize the width of each column using the `HorizontalSizeStyle` field. If the user's screen width is too narrow, the second column wraps below the first: * On web, the second column wraps if the screen width is less than or equal to 480 pixels. * On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt. * On Android devices, the second column wraps if the screen width is less than or equal to 320 dp. To include more than two columns, or to use rows, use the `Grid` widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): The add-on UIs that support columns include: * The dialog displayed when users open the add-on from an email draft. * The dialog displayed when users open the add-on from the **Add attachment** menu in a Google Calendar event.", "id": "GoogleAppsCardV1Columns", "properties": { "columnItems": { @@ -3674,7 +3694,7 @@ "type": "object" }, "MembershipCount": { - "description": "[Developer Preview](https://developers.google.com/workspace/preview). Represents the count of memberships of a space, grouped into categories.", + "description": "Represents the count of memberships of a space, grouped into categories.", "id": "MembershipCount", "properties": { "joinedDirectHumanUserCount": { @@ -3835,7 +3855,7 @@ }, "privateMessageViewer": { "$ref": "User", - "description": "Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. Link previews and attachments aren't supported for private messages. Only Chat apps can send private messages. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) to send a message, the message can't be private and must omit this field. For details, see [Send a message privately](https://developers.google.com/workspace/chat/create-messages#private)." + "description": "Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. To include this field in your request, you must call the Chat API using [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and omit the following: * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) * [Accessory widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) For details, see [Send a message privately](https://developers.google.com/workspace/chat/create-messages#private)." }, "quotedMessageMetadata": { "$ref": "QuotedMessageMetadata", @@ -4067,7 +4087,7 @@ "properties": { "chatSpaceLinkData": { "$ref": "ChatSpaceLinkData", - "description": "Data for a chat space link. [Developer Preview](https://developers.google.com/workspace/preview)." + "description": "Data for a chat space link." }, "driveLinkData": { "$ref": "DriveLinkData", @@ -4083,7 +4103,7 @@ "enumDescriptions": [ "Default value for the enum. Don't use.", "A Google Drive rich link type.", - "A Chat space rich link type. For example, a space smart chip. [Developer Preview](https://developers.google.com/workspace/preview)." + "A Chat space rich link type. For example, a space smart chip." ], "type": "string" }, @@ -4240,7 +4260,7 @@ "type": "string" }, "displayName": { - "description": "The space's display name. Required when [creating a space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters.", + "description": "The space's display name. Required when [creating a space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) with a `spaceType` of `SPACE`. If you receive the error message `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters.", "type": "string" }, "externalUserAllowed": { @@ -4252,14 +4272,14 @@ "type": "boolean" }, "lastActiveTime": { - "description": "Output only. Timestamp of the last message in the space. [Developer Preview](https://developers.google.com/workspace/preview).", + "description": "Output only. Timestamp of the last message in the space.", "format": "google-datetime", "readOnly": true, "type": "string" }, "membershipCount": { "$ref": "MembershipCount", - "description": "Output only. The count of joined memberships grouped by member type. Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or `GROUP_CHAT`. [Developer Preview](https://developers.google.com/workspace/preview).", + "description": "Output only. The count of joined memberships grouped by member type. Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or `GROUP_CHAT`.", "readOnly": true }, "name": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index c54c87690a2..620ebfe36f1 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -119,6 +119,22 @@ const ( // conversations owned by your organization ChatAdminSpacesReadonlyScope = "https://www.googleapis.com/auth/chat.admin.spaces.readonly" + // On their own behalf, apps in Google Chat can delete conversations and spaces + // and remove access to associated files + ChatAppDeleteScope = "https://www.googleapis.com/auth/chat.app.delete" + + // On their own behalf, apps in Google Chat can see, add, update, and remove + // members from conversations and spaces + ChatAppMembershipsScope = "https://www.googleapis.com/auth/chat.app.memberships" + + // On their own behalf, apps in Google Chat can create conversations and spaces + // and see or update their metadata (including history settings and access + // settings) + ChatAppSpacesScope = "https://www.googleapis.com/auth/chat.app.spaces" + + // On their own behalf, apps in Google Chat can create conversations and spaces + ChatAppSpacesCreateScope = "https://www.googleapis.com/auth/chat.app.spaces.create" + // Private Service: https://www.googleapis.com/auth/chat.bot ChatBotScope = "https://www.googleapis.com/auth/chat.bot" @@ -183,6 +199,10 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err "https://www.googleapis.com/auth/chat.admin.memberships.readonly", "https://www.googleapis.com/auth/chat.admin.spaces", "https://www.googleapis.com/auth/chat.admin.spaces.readonly", + "https://www.googleapis.com/auth/chat.app.delete", + "https://www.googleapis.com/auth/chat.app.memberships", + "https://www.googleapis.com/auth/chat.app.spaces", + "https://www.googleapis.com/auth/chat.app.spaces.create", "https://www.googleapis.com/auth/chat.bot", "https://www.googleapis.com/auth/chat.delete", "https://www.googleapis.com/auth/chat.import", @@ -968,8 +988,7 @@ func (s ChatClientDataSourceMarkup) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ChatSpaceLinkData: Data for Chat space links. Developer Preview -// (https://developers.google.com/workspace/preview). +// ChatSpaceLinkData: Data for Chat space links. type ChatSpaceLinkData struct { // Message: The message of the linked Chat space resource. Format: // `spaces/{space}/messages/{message}` @@ -1917,7 +1936,8 @@ type GoogleAppsCardV1Card struct { // homepage cards and the contextual cards. Google Workspace Add-ons // (https://developers.google.com/workspace/add-ons): PeekCardHeader *GoogleAppsCardV1CardHeader `json:"peekCardHeader,omitempty"` - // SectionDividerStyle: The divider style between sections. + // SectionDividerStyle: The divider style between the header, sections and + // footer. // // Possible values: // "DIVIDER_STYLE_UNSPECIFIED" - Don't use. Unspecified. @@ -2129,9 +2149,12 @@ func (s GoogleAppsCardV1Column) MarshalJSON() ([]byte, error) { // second column wraps if the screen width is less than or equal to 480 pixels. // * On iOS devices, the second column wraps if the screen width is less than // or equal to 300 pt. * On Android devices, the second column wraps if the -// screen width is less than or equal to 320 dp. To include more than 2 +// screen width is less than or equal to 320 dp. To include more than two // columns, or to use rows, use the `Grid` widget. Google Workspace Add-ons and -// Chat apps (https://developers.google.com/workspace/extend): +// Chat apps (https://developers.google.com/workspace/extend): The add-on UIs +// that support columns include: * The dialog displayed when users open the +// add-on from an email draft. * The dialog displayed when users open the +// add-on from the **Add attachment** menu in a Google Calendar event. type GoogleAppsCardV1Columns struct { // ColumnItems: An array of columns. You can include up to 2 columns in a card // or dialog. @@ -3871,9 +3894,8 @@ func (s MembershipBatchUpdatedEventData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MembershipCount: Developer Preview -// (https://developers.google.com/workspace/preview). Represents the count of -// memberships of a space, grouped into categories. +// MembershipCount: Represents the count of memberships of a space, grouped +// into categories. type MembershipCount struct { // JoinedDirectHumanUserCount: Count of human users that have directly joined // the space, not counting users joined by having membership in a joined group. @@ -4066,11 +4088,14 @@ type Message struct { Name string `json:"name,omitempty"` // PrivateMessageViewer: Immutable. Input for creating a message, otherwise // output only. The user that can view the message. When set, the message is - // private and only visible to the specified user and the Chat app. Link - // previews and attachments aren't supported for private messages. Only Chat - // apps can send private messages. If your Chat app authenticates as a user - // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - // to send a message, the message can't be private and must omit this field. + // private and only visible to the specified user and the Chat app. To include + // this field in your request, you must call the Chat API using app + // authentication + // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + // and omit the following: * Attachments + // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) + // * Accessory widgets + // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) // For details, see Send a message privately // (https://developers.google.com/workspace/chat/create-messages#private). PrivateMessageViewer *User `json:"privateMessageViewer,omitempty"` @@ -4467,8 +4492,7 @@ func (s ReactionDeletedEventData) MarshalJSON() ([]byte, error) { // RichLinkMetadata: A rich link to a resource. type RichLinkMetadata struct { - // ChatSpaceLinkData: Data for a chat space link. Developer Preview - // (https://developers.google.com/workspace/preview). + // ChatSpaceLinkData: Data for a chat space link. ChatSpaceLinkData *ChatSpaceLinkData `json:"chatSpaceLinkData,omitempty"` // DriveLinkData: Data for a drive link. DriveLinkData *DriveLinkData `json:"driveLinkData,omitempty"` @@ -4478,7 +4502,7 @@ type RichLinkMetadata struct { // "RICH_LINK_TYPE_UNSPECIFIED" - Default value for the enum. Don't use. // "DRIVE_FILE" - A Google Drive rich link type. // "CHAT_SPACE" - A Chat space rich link type. For example, a space smart - // chip. [Developer Preview](https://developers.google.com/workspace/preview). + // chip. RichLinkType string `json:"richLinkType,omitempty"` // Uri: The URI of this link. Uri string `json:"uri,omitempty"` @@ -4726,12 +4750,12 @@ type Space struct { // `GROUP_CHAT` or `SPACE`. CreateTime string `json:"createTime,omitempty"` // DisplayName: The space's display name. Required when creating a space - // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create). - // If you receive the error message `ALREADY_EXISTS` when creating a space or - // updating the `displayName`, try a different `displayName`. An existing space - // within the Google Workspace organization might already use this display - // name. For direct messages, this field might be empty. Supports up to 128 - // characters. + // (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) + // with a `spaceType` of `SPACE`. If you receive the error message + // `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a + // different `displayName`. An existing space within the Google Workspace + // organization might already use this display name. For direct messages, this + // field might be empty. Supports up to 128 characters. DisplayName string `json:"displayName,omitempty"` // ExternalUserAllowed: Immutable. Whether this space permits any Google Chat // user as a member. Input when creating a space in a Google Workspace @@ -4745,12 +4769,10 @@ type Space struct { // they aren't visible to users until the import is complete. ImportMode bool `json:"importMode,omitempty"` // LastActiveTime: Output only. Timestamp of the last message in the space. - // Developer Preview (https://developers.google.com/workspace/preview). LastActiveTime string `json:"lastActiveTime,omitempty"` // MembershipCount: Output only. The count of joined memberships grouped by // member type. Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or - // `GROUP_CHAT`. Developer Preview - // (https://developers.google.com/workspace/preview). + // `GROUP_CHAT`. MembershipCount *MembershipCount `json:"membershipCount,omitempty"` // Name: Resource name of the space. Format: `spaces/{space}` Where `{space}` // represents the system-assigned ID for the space. You can obtain the space ID @@ -5912,12 +5934,15 @@ type SpacesCreateCall struct { header_ http.Header } -// Create: Creates a named space. Spaces grouped by topics aren't supported. -// For an example, see Create a space -// (https://developers.google.com/workspace/chat/create-spaces). If you receive -// the error message `ALREADY_EXISTS` when creating a space, try a different -// `displayName`. An existing space within the Google Workspace organization -// might already use this display name. Requires user authentication +// Create: Creates a space with no members. Can be used to create a named +// space. Spaces grouped by topics aren't supported. For an example, see Create +// a space (https://developers.google.com/workspace/chat/create-spaces). If you +// receive the error message `ALREADY_EXISTS` when creating a space, try a +// different `displayName`. An existing space within the Google Workspace +// organization might already use this display name. If you're a member of the +// Developer Preview program (https://developers.google.com/workspace/preview), +// you can create a group chat in import mode using `spaceType.GROUP_CHAT`. +// Requires user authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). func (r *SpacesService) Create(space *Space) *SpacesCreateCall { c := &SpacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -6037,11 +6062,10 @@ func (r *SpacesService) Delete(name string) *SpacesDeleteCall { return c } -// UseAdminAccess sets the optional parameter "useAdminAccess": Developer -// Preview (https://developers.google.com/workspace/preview). When `true`, the -// method runs using the user's Google Workspace administrator privileges. The -// calling user must be a Google Workspace administrator with the manage chat -// and spaces conversations privilege +// UseAdminAccess sets the optional parameter "useAdminAccess": When `true`, +// the method runs using the user's Google Workspace administrator privileges. +// The calling user must be a Google Workspace administrator with the manage +// chat and spaces conversations privilege // (https://support.google.com/a/answer/13369245). Requires the // `chat.admin.delete` OAuth 2.0 scope // (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). @@ -6284,11 +6308,10 @@ func (r *SpacesService) Get(name string) *SpacesGetCall { return c } -// UseAdminAccess sets the optional parameter "useAdminAccess": Developer -// Preview (https://developers.google.com/workspace/preview). When `true`, the -// method runs using the user's Google Workspace administrator privileges. The -// calling user must be a Google Workspace administrator with the manage chat -// and spaces conversations privilege +// UseAdminAccess sets the optional parameter "useAdminAccess": When `true`, +// the method runs using the user's Google Workspace administrator privileges. +// The calling user must be a Google Workspace administrator with the manage +// chat and spaces conversations privilege // (https://support.google.com/a/answer/13369245). Requires the // `chat.admin.spaces` or `chat.admin.spaces.readonly` OAuth 2.0 scopes // (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). @@ -6631,11 +6654,10 @@ func (c *SpacesPatchCall) UpdateMask(updateMask string) *SpacesPatchCall { return c } -// UseAdminAccess sets the optional parameter "useAdminAccess": Developer -// Preview (https://developers.google.com/workspace/preview). When `true`, the -// method runs using the user's Google Workspace administrator privileges. The -// calling user must be a Google Workspace administrator with the manage chat -// and spaces conversations privilege +// UseAdminAccess sets the optional parameter "useAdminAccess": When `true`, +// the method runs using the user's Google Workspace administrator privileges. +// The calling user must be a Google Workspace administrator with the manage +// chat and spaces conversations privilege // (https://support.google.com/a/answer/13369245). Requires the // `chat.admin.spaces` OAuth 2.0 scope // (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). @@ -6736,12 +6758,11 @@ type SpacesSearchCall struct { header_ http.Header } -// Search: Developer Preview (https://developers.google.com/workspace/preview). -// Returns a list of spaces based on a user's search. Requires user -// authentication -// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). -// The user must be an administrator for the Google Workspace organization. In -// the request, set `use_admin_access` to `true`. +// Search: Returns a list of spaces in a Google Workspace organization based on +// an administrator's search. Requires user authentication with administrator +// privileges +// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges). +// In the request, set `use_admin_access` to `true`. func (r *SpacesService) Search() *SpacesSearchCall { c := &SpacesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -7112,11 +7133,10 @@ func (r *SpacesMembersService) Create(parent string, membership *Membership) *Sp return c } -// UseAdminAccess sets the optional parameter "useAdminAccess": Developer -// Preview (https://developers.google.com/workspace/preview). When `true`, the -// method runs using the user's Google Workspace administrator privileges. The -// calling user must be a Google Workspace administrator with the manage chat -// and spaces conversations privilege +// UseAdminAccess sets the optional parameter "useAdminAccess": When `true`, +// the method runs using the user's Google Workspace administrator privileges. +// The calling user must be a Google Workspace administrator with the manage +// chat and spaces conversations privilege // (https://support.google.com/a/answer/13369245). Requires the // `chat.admin.memberships` OAuth 2.0 scope // (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). @@ -7240,11 +7260,10 @@ func (r *SpacesMembersService) Delete(name string) *SpacesMembersDeleteCall { return c } -// UseAdminAccess sets the optional parameter "useAdminAccess": Developer -// Preview (https://developers.google.com/workspace/preview). When `true`, the -// method runs using the user's Google Workspace administrator privileges. The -// calling user must be a Google Workspace administrator with the manage chat -// and spaces conversations privilege +// UseAdminAccess sets the optional parameter "useAdminAccess": When `true`, +// the method runs using the user's Google Workspace administrator privileges. +// The calling user must be a Google Workspace administrator with the manage +// chat and spaces conversations privilege // (https://support.google.com/a/answer/13369245). Requires the // `chat.admin.memberships` OAuth 2.0 scope // (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). @@ -7367,11 +7386,10 @@ func (r *SpacesMembersService) Get(name string) *SpacesMembersGetCall { return c } -// UseAdminAccess sets the optional parameter "useAdminAccess": Developer -// Preview (https://developers.google.com/workspace/preview). When `true`, the -// method runs using the user's Google Workspace administrator privileges. The -// calling user must be a Google Workspace administrator with the manage chat -// and spaces conversations privilege +// UseAdminAccess sets the optional parameter "useAdminAccess": When `true`, +// the method runs using the user's Google Workspace administrator privileges. +// The calling user must be a Google Workspace administrator with the manage +// chat and spaces conversations privilege // (https://support.google.com/a/answer/13369245). Requires the // `chat.admin.memberships` or `chat.admin.memberships.readonly` OAuth 2.0 // scopes @@ -7511,14 +7529,14 @@ func (r *SpacesMembersService) List(parent string) *SpacesMembersListCall { // and type (`member.type` // (https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). // To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter -// by type, set `member.type` to `HUMAN` or `BOT`. Developer Preview: You can -// also filter for `member.type` using the `!=` operator. To filter by both -// role and type, use the `AND` operator. To filter by either role or type, use -// the `OR` operator. Either `member.type = "HUMAN" or `member.type != "BOT" -// is required when `use_admin_access` is set to true. Other member type -// filters will be rejected. For example, the following queries are valid: ``` -// role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" member.type = "HUMAN" AND role -// = "ROLE_MANAGER" member.type != "BOT" ``` The following queries are invalid: +// by type, set `member.type` to `HUMAN` or `BOT`. You can also filter for +// `member.type` using the `!=` operator. To filter by both role and type, use +// the `AND` operator. To filter by either role or type, use the `OR` operator. +// Either `member.type = "HUMAN" or `member.type != "BOT" is required when +// `use_admin_access` is set to true. Other member type filters will be +// rejected. For example, the following queries are valid: ``` role = +// "ROLE_MANAGER" OR role = "ROLE_MEMBER" member.type = "HUMAN" AND role = +// "ROLE_MANAGER" member.type != "BOT" ``` The following queries are invalid: // ``` member.type = "HUMAN" AND member.type = "BOT" role = "ROLE_MANAGER" AND // role = "ROLE_MEMBER" ``` Invalid queries are rejected by the server with an // `INVALID_ARGUMENT` error. @@ -7567,11 +7585,10 @@ func (c *SpacesMembersListCall) ShowInvited(showInvited bool) *SpacesMembersList return c } -// UseAdminAccess sets the optional parameter "useAdminAccess": Developer -// Preview (https://developers.google.com/workspace/preview). When `true`, the -// method runs using the user's Google Workspace administrator privileges. The -// calling user must be a Google Workspace administrator with the manage chat -// and spaces conversations privilege +// UseAdminAccess sets the optional parameter "useAdminAccess": When `true`, +// the method runs using the user's Google Workspace administrator privileges. +// The calling user must be a Google Workspace administrator with the manage +// chat and spaces conversations privilege // (https://support.google.com/a/answer/13369245). Requires either the // `chat.admin.memberships.readonly` or `chat.admin.memberships` OAuth 2.0 // scope @@ -7724,11 +7741,10 @@ func (c *SpacesMembersPatchCall) UpdateMask(updateMask string) *SpacesMembersPat return c } -// UseAdminAccess sets the optional parameter "useAdminAccess": Developer -// Preview (https://developers.google.com/workspace/preview). When `true`, the -// method runs using the user's Google Workspace administrator privileges. The -// calling user must be a Google Workspace administrator with the manage chat -// and spaces conversations privilege +// UseAdminAccess sets the optional parameter "useAdminAccess": When `true`, +// the method runs using the user's Google Workspace administrator privileges. +// The calling user must be a Google Workspace administrator with the manage +// chat and spaces conversations privilege // (https://support.google.com/a/answer/13369245). Requires the // `chat.admin.memberships` OAuth 2.0 scope // (https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). diff --git a/chromeuxreport/v1/chromeuxreport-api.json b/chromeuxreport/v1/chromeuxreport-api.json index 4645cdbd1d1..6cf2a248d49 100644 --- a/chromeuxreport/v1/chromeuxreport-api.json +++ b/chromeuxreport/v1/chromeuxreport-api.json @@ -131,7 +131,7 @@ } } }, - "revision": "20240102", + "revision": "20240916", "rootUrl": "https://chromeuxreport.googleapis.com/", "schemas": { "Bin": { @@ -140,8 +140,7 @@ "properties": { "density": { "description": "The proportion of users that experienced this bin's value for the given metric.", - "format": "double", - "type": "number" + "type": "any" }, "end": { "description": "End is the end of the data bin. If end is not populated, then the bin has no end and is valid from start to +inf.", diff --git a/chromeuxreport/v1/chromeuxreport-gen.go b/chromeuxreport/v1/chromeuxreport-gen.go index 2d989fa46fd..c373a9f4f4a 100644 --- a/chromeuxreport/v1/chromeuxreport-gen.go +++ b/chromeuxreport/v1/chromeuxreport-gen.go @@ -162,7 +162,7 @@ type RecordsService struct { type Bin struct { // Density: The proportion of users that experienced this bin's value for the // given metric. - Density float64 `json:"density,omitempty"` + Density interface{} `json:"density,omitempty"` // End: End is the end of the data bin. If end is not populated, then the bin // has no end and is valid from start to +inf. End interface{} `json:"end,omitempty"` @@ -186,20 +186,6 @@ func (s Bin) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *Bin) UnmarshalJSON(data []byte) error { - type NoMethod Bin - var s1 struct { - Density gensupport.JSONFloat64 `json:"density"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Density = float64(s1.Density) - return nil -} - // CollectionPeriod: The collection period is a date range which includes the // `first` and `last` day. type CollectionPeriod struct { diff --git a/civicinfo/v2/civicinfo-api.json b/civicinfo/v2/civicinfo-api.json index 9ee61279934..651fcd9b373 100644 --- a/civicinfo/v2/civicinfo-api.json +++ b/civicinfo/v2/civicinfo-api.json @@ -97,6 +97,23 @@ "resources": { "divisions": { "methods": { + "queryDivisionByAddress": { + "description": "Lookup OCDIDs and names for divisions related to an address.", + "flatPath": "civicinfo/v2/divisionsByAddress", + "httpMethod": "GET", + "id": "civicinfo.divisions.queryDivisionByAddress", + "parameterOrder": [], + "parameters": { + "address": { + "location": "query", + "type": "string" + } + }, + "path": "civicinfo/v2/divisionsByAddress", + "response": { + "$ref": "DivisionByAddressResponse" + } + }, "search": { "description": "Searches for political divisions by their natural name or OCD ID.", "flatPath": "civicinfo/v2/divisions", @@ -362,7 +379,7 @@ } } }, - "revision": "20240611", + "revision": "20240910", "rootUrl": "https://civicinfo.googleapis.com/", "schemas": { "AdministrationRegion": { @@ -696,6 +713,22 @@ }, "type": "object" }, + "DivisionByAddressResponse": { + "id": "DivisionByAddressResponse", + "properties": { + "divisions": { + "additionalProperties": { + "$ref": "GeographicDivision" + }, + "type": "object" + }, + "normalizedInput": { + "$ref": "SimpleAddressType", + "description": "The normalized version of the requested address." + } + }, + "type": "object" + }, "DivisionSearchResponse": { "description": "The result of a division search query.", "id": "DivisionSearchResponse", diff --git a/civicinfo/v2/civicinfo-gen.go b/civicinfo/v2/civicinfo-gen.go index 6b85a80855a..36f28720112 100644 --- a/civicinfo/v2/civicinfo-gen.go +++ b/civicinfo/v2/civicinfo-gen.go @@ -458,6 +458,31 @@ func (s Contest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type DivisionByAddressResponse struct { + Divisions map[string]GeographicDivision `json:"divisions,omitempty"` + // NormalizedInput: The normalized version of the requested address. + NormalizedInput *SimpleAddressType `json:"normalizedInput,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Divisions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Divisions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DivisionByAddressResponse) MarshalJSON() ([]byte, error) { + type NoMethod DivisionByAddressResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DivisionSearchResponse: The result of a division search query. type DivisionSearchResponse struct { // Kind: Identifies what kind of resource this is. Value: the fixed string @@ -1112,6 +1137,114 @@ func (s VoterInfoResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type DivisionsQueryDivisionByAddressCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// QueryDivisionByAddress: Lookup OCDIDs and names for divisions related to an +// address. +func (r *DivisionsService) QueryDivisionByAddress() *DivisionsQueryDivisionByAddressCall { + c := &DivisionsQueryDivisionByAddressCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Address sets the optional parameter "address": +func (c *DivisionsQueryDivisionByAddressCall) Address(address string) *DivisionsQueryDivisionByAddressCall { + c.urlParams_.Set("address", address) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DivisionsQueryDivisionByAddressCall) Fields(s ...googleapi.Field) *DivisionsQueryDivisionByAddressCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *DivisionsQueryDivisionByAddressCall) IfNoneMatch(entityTag string) *DivisionsQueryDivisionByAddressCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DivisionsQueryDivisionByAddressCall) Context(ctx context.Context) *DivisionsQueryDivisionByAddressCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DivisionsQueryDivisionByAddressCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DivisionsQueryDivisionByAddressCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "civicinfo/v2/divisionsByAddress") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "civicinfo.divisions.queryDivisionByAddress" call. +// Any non-2xx status code is an error. Response headers are in either +// *DivisionByAddressResponse.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 *DivisionsQueryDivisionByAddressCall) Do(opts ...googleapi.CallOption) (*DivisionByAddressResponse, 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 := &DivisionByAddressResponse{ + 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 +} + type DivisionsSearchCall struct { s *Service urlParams_ gensupport.URLParams diff --git a/classroom/v1/classroom-api.json b/classroom/v1/classroom-api.json index 11cdbe40fb8..319e2e8829f 100644 --- a/classroom/v1/classroom-api.json +++ b/classroom/v1/classroom-api.json @@ -575,14 +575,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -751,14 +751,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -795,14 +795,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -836,14 +836,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -870,7 +870,7 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" @@ -888,7 +888,7 @@ }, "postId": { "deprecated": true, - "description": "Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead.", + "description": "Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -1072,14 +1072,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -1250,14 +1250,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -1294,14 +1294,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -1335,14 +1335,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -1369,7 +1369,7 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" @@ -1387,7 +1387,7 @@ }, "postId": { "deprecated": true, - "description": "Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead.", + "description": "Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -1475,14 +1475,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" }, @@ -1526,14 +1526,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" }, @@ -2032,14 +2032,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -2184,14 +2184,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -2228,14 +2228,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -2269,14 +2269,14 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" }, "postId": { "deprecated": true, - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -2303,7 +2303,7 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.", "location": "path", "required": true, "type": "string" @@ -2321,7 +2321,7 @@ }, "postId": { "deprecated": true, - "description": "Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead.", + "description": "Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use `item_id` instead.", "location": "query", "type": "string" } @@ -2413,12 +2413,12 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "query", "type": "string" }, "postId": { - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "path", "required": true, "type": "string" @@ -2455,12 +2455,12 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which to create the attachment. This field is required, but is not marked as such while we are migrating from post_id.", "location": "query", "type": "string" }, "postId": { - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "path", "required": true, "type": "string" @@ -2498,12 +2498,12 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "query", "type": "string" }, "postId": { - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "path", "required": true, "type": "string" @@ -2538,12 +2538,12 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "query", "type": "string" }, "postId": { - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "path", "required": true, "type": "string" @@ -2571,7 +2571,7 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` whose attachments should be enumerated. This field is required, but is not marked as such while we are migrating from post_id.", "location": "query", "type": "string" }, @@ -2587,7 +2587,7 @@ "type": "string" }, "postId": { - "description": "Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use item_id instead.", + "description": "Optional. Identifier of the post under the course whose attachments to enumerate. Deprecated, use `item_id` instead.", "location": "path", "required": true, "type": "string" @@ -2676,12 +2676,12 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "query", "type": "string" }, "postId": { - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "path", "required": true, "type": "string" @@ -2726,12 +2726,12 @@ "type": "string" }, "itemId": { - "description": "Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", + "description": "Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.", "location": "query", "type": "string" }, "postId": { - "description": "Optional. Deprecated, use item_id instead.", + "description": "Optional. Deprecated, use `item_id` instead.", "location": "path", "required": true, "type": "string" @@ -3695,7 +3695,7 @@ } } }, - "revision": "20240713", + "revision": "20240911", "rootUrl": "https://classroom.googleapis.com/", "schemas": { "AddOnAttachment": { @@ -3727,7 +3727,7 @@ "type": "string" }, "itemId": { - "description": "Immutable. Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached. Unique per course.", + "description": "Immutable. Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. Unique per course.", "type": "string" }, "maxPoints": { @@ -3737,20 +3737,20 @@ }, "postId": { "deprecated": true, - "description": "Immutable. Deprecated, use item_id instead.", + "description": "Immutable. Deprecated, use `item_id` instead.", "type": "string" }, "studentViewUri": { "$ref": "EmbedUri", - "description": "Required. URI to show the student view of the attachment. The URI will be opened in an iframe with the `courseId`, `postId`, and `attachmentId` query parameters set." + "description": "Required. URI to show the student view of the attachment. The URI will be opened in an iframe with the `courseId`, `itemId`, `itemType`, and `attachmentId` query parameters set." }, "studentWorkReviewUri": { "$ref": "EmbedUri", - "description": "URI for the teacher to see student work on the attachment, if applicable. The URI will be opened in an iframe with the `courseId`, `postId`, `attachmentId`, and `submissionId` query parameters set. This is the same `submissionId` returned by google.classroom.AddOns.GetAddOnContext when a student views the attachment. If the URI is omitted or removed, `max_points` will also be discarded." + "description": "URI for the teacher to see student work on the attachment, if applicable. The URI will be opened in an iframe with the `courseId`, `itemId`, `itemType`, `attachmentId`, and `submissionId` query parameters set. This is the same `submissionId` returned in the [`AddOnContext.studentContext`](//devsite.google.com/classroom/reference/rest/v1/AddOnContext#StudentContext) field when a student views the attachment. If the URI is omitted or removed, `max_points` will also be discarded." }, "teacherViewUri": { "$ref": "EmbedUri", - "description": "Required. URI to show the teacher view of the attachment. The URI will be opened in an iframe with the `courseId`, `postId`, and `attachmentId` query parameters set." + "description": "Required. URI to show the teacher view of the attachment. The URI will be opened in an iframe with the `courseId`, `itemId`, `itemType`, and `attachmentId` query parameters set." }, "title": { "description": "Required. Title of this attachment. The title must be between 1 and 1000 characters.", @@ -3800,12 +3800,12 @@ "type": "string" }, "itemId": { - "description": "Immutable. Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached.", + "description": "Immutable. Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached.", "type": "string" }, "postId": { "deprecated": true, - "description": "Immutable. Deprecated, use item_id instead.", + "description": "Immutable. Deprecated, use `item_id` instead.", "type": "string" }, "studentContext": { @@ -3978,12 +3978,12 @@ "type": "string" }, "itemId": { - "description": "Immutable. Identifier of the announcement, courseWork, or courseWorkMaterial under which the attachment is attached.", + "description": "Immutable. Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached.", "type": "string" }, "postId": { "deprecated": true, - "description": "Immutable. Deprecated, use item_id instead.", + "description": "Immutable. Deprecated, use `item_id` instead.", "type": "string" } }, diff --git a/classroom/v1/classroom-gen.go b/classroom/v1/classroom-gen.go index 39382a1f488..57cd7ebcc25 100644 --- a/classroom/v1/classroom-gen.go +++ b/classroom/v1/classroom-gen.go @@ -514,8 +514,8 @@ type AddOnAttachment struct { // Id: Immutable. Classroom-assigned identifier for this attachment, unique per // post. Id string `json:"id,omitempty"` - // ItemId: Immutable. Identifier of the announcement, courseWork, or - // courseWorkMaterial under which the attachment is attached. Unique per + // ItemId: Immutable. Identifier of the `Announcement`, `CourseWork`, or + // `CourseWorkMaterial` under which the attachment is attached. Unique per // course. ItemId string `json:"itemId,omitempty"` // MaxPoints: Maximum grade for this attachment. Can only be set if @@ -524,22 +524,24 @@ type AddOnAttachment struct { // integer value. When set to zero, the attachment will not support grade // passback. MaxPoints float64 `json:"maxPoints,omitempty"` - // PostId: Immutable. Deprecated, use item_id instead. + // PostId: Immutable. Deprecated, use `item_id` instead. PostId string `json:"postId,omitempty"` // StudentViewUri: Required. URI to show the student view of the attachment. - // The URI will be opened in an iframe with the `courseId`, `postId`, and - // `attachmentId` query parameters set. + // The URI will be opened in an iframe with the `courseId`, `itemId`, + // `itemType`, and `attachmentId` query parameters set. StudentViewUri *EmbedUri `json:"studentViewUri,omitempty"` // StudentWorkReviewUri: URI for the teacher to see student work on the // attachment, if applicable. The URI will be opened in an iframe with the - // `courseId`, `postId`, `attachmentId`, and `submissionId` query parameters - // set. This is the same `submissionId` returned by - // google.classroom.AddOns.GetAddOnContext when a student views the attachment. - // If the URI is omitted or removed, `max_points` will also be discarded. + // `courseId`, `itemId`, `itemType`, `attachmentId`, and `submissionId` query + // parameters set. This is the same `submissionId` returned in the + // `AddOnContext.studentContext` + // (//devsite.google.com/classroom/reference/rest/v1/AddOnContext#StudentContext + // ) field when a student views the attachment. If the URI is omitted or + // removed, `max_points` will also be discarded. StudentWorkReviewUri *EmbedUri `json:"studentWorkReviewUri,omitempty"` // TeacherViewUri: Required. URI to show the teacher view of the attachment. - // The URI will be opened in an iframe with the `courseId`, `postId`, and - // `attachmentId` query parameters set. + // The URI will be opened in an iframe with the `courseId`, `itemId`, + // `itemType`, and `attachmentId` query parameters set. TeacherViewUri *EmbedUri `json:"teacherViewUri,omitempty"` // Title: Required. Title of this attachment. The title must be between 1 and // 1000 characters. @@ -636,10 +638,10 @@ func (s *AddOnAttachmentStudentSubmission) UnmarshalJSON(data []byte) error { type AddOnContext struct { // CourseId: Immutable. Identifier of the course. CourseId string `json:"courseId,omitempty"` - // ItemId: Immutable. Identifier of the announcement, courseWork, or - // courseWorkMaterial under which the attachment is attached. + // ItemId: Immutable. Identifier of the `Announcement`, `CourseWork`, or + // `CourseWorkMaterial` under which the attachment is attached. ItemId string `json:"itemId,omitempty"` - // PostId: Immutable. Deprecated, use item_id instead. + // PostId: Immutable. Deprecated, use `item_id` instead. PostId string `json:"postId,omitempty"` // StudentContext: Add-on context corresponding to the requesting user's role // as a student. Its presence implies that the requesting user is a student in @@ -860,10 +862,10 @@ type CopyHistory struct { AttachmentId string `json:"attachmentId,omitempty"` // CourseId: Immutable. Identifier of the course. CourseId string `json:"courseId,omitempty"` - // ItemId: Immutable. Identifier of the announcement, courseWork, or - // courseWorkMaterial under which the attachment is attached. + // ItemId: Immutable. Identifier of the `Announcement`, `CourseWork`, or + // `CourseWorkMaterial` under which the attachment is attached. ItemId string `json:"itemId,omitempty"` - // PostId: Immutable. Deprecated, use item_id instead. + // PostId: Immutable. Deprecated, use `item_id` instead. PostId string `json:"postId,omitempty"` // ForceSendFields is a list of field names (e.g. "AttachmentId") to // unconditionally include in API requests. By default, fields with empty or @@ -4456,9 +4458,9 @@ type CoursesAnnouncementsGetAddOnContextCall struct { // `NOT_FOUND` if one of the identified resources does not exist. // // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesAnnouncementsService) GetAddOnContext(courseId string, itemId string) *CoursesAnnouncementsGetAddOnContextCall { c := &CoursesAnnouncementsGetAddOnContextCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -4486,7 +4488,7 @@ func (c *CoursesAnnouncementsGetAddOnContextCall) AttachmentId(attachmentId stri return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesAnnouncementsGetAddOnContextCall) PostId(postId string) *CoursesAnnouncementsGetAddOnContextCall { c.urlParams_.Set("postId", postId) @@ -5026,9 +5028,9 @@ type CoursesAnnouncementsAddOnAttachmentsCreateCall struct { // identified resources does not exist. // // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which to create the attachment. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which to create the attachment. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesAnnouncementsAddOnAttachmentsService) Create(courseId string, itemId string, addonattachment *AddOnAttachment) *CoursesAnnouncementsAddOnAttachmentsCreateCall { c := &CoursesAnnouncementsAddOnAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -5049,7 +5051,7 @@ func (c *CoursesAnnouncementsAddOnAttachmentsCreateCall) AddOnToken(addOnToken s return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesAnnouncementsAddOnAttachmentsCreateCall) PostId(postId string) *CoursesAnnouncementsAddOnAttachmentsCreateCall { c.urlParams_.Set("postId", postId) @@ -5158,9 +5160,9 @@ type CoursesAnnouncementsAddOnAttachmentsDeleteCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesAnnouncementsAddOnAttachmentsService) Delete(courseId string, itemId string, attachmentId string) *CoursesAnnouncementsAddOnAttachmentsDeleteCall { c := &CoursesAnnouncementsAddOnAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -5169,7 +5171,7 @@ func (r *CoursesAnnouncementsAddOnAttachmentsService) Delete(courseId string, it return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesAnnouncementsAddOnAttachmentsDeleteCall) PostId(postId string) *CoursesAnnouncementsAddOnAttachmentsDeleteCall { c.urlParams_.Set("postId", postId) @@ -5275,9 +5277,9 @@ type CoursesAnnouncementsAddOnAttachmentsGetCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesAnnouncementsAddOnAttachmentsService) Get(courseId string, itemId string, attachmentId string) *CoursesAnnouncementsAddOnAttachmentsGetCall { c := &CoursesAnnouncementsAddOnAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -5286,7 +5288,7 @@ func (r *CoursesAnnouncementsAddOnAttachmentsService) Get(courseId string, itemI return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesAnnouncementsAddOnAttachmentsGetCall) PostId(postId string) *CoursesAnnouncementsAddOnAttachmentsGetCall { c.urlParams_.Set("postId", postId) @@ -5403,9 +5405,9 @@ type CoursesAnnouncementsAddOnAttachmentsListCall struct { // not exist. // // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// whose attachments should be enumerated. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` whose attachments should be enumerated. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesAnnouncementsAddOnAttachmentsService) List(courseId string, itemId string) *CoursesAnnouncementsAddOnAttachmentsListCall { c := &CoursesAnnouncementsAddOnAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -5432,7 +5434,8 @@ func (c *CoursesAnnouncementsAddOnAttachmentsListCall) PageToken(pageToken strin } // PostId sets the optional parameter "postId": Identifier of the post under -// the course whose attachments to enumerate. Deprecated, use item_id instead. +// the course whose attachments to enumerate. Deprecated, use `item_id` +// instead. func (c *CoursesAnnouncementsAddOnAttachmentsListCall) PostId(postId string) *CoursesAnnouncementsAddOnAttachmentsListCall { c.urlParams_.Set("postId", postId) return c @@ -6043,9 +6046,9 @@ type CoursesCourseWorkGetAddOnContextCall struct { // `NOT_FOUND` if one of the identified resources does not exist. // // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkService) GetAddOnContext(courseId string, itemId string) *CoursesCourseWorkGetAddOnContextCall { c := &CoursesCourseWorkGetAddOnContextCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -6073,7 +6076,7 @@ func (c *CoursesCourseWorkGetAddOnContextCall) AttachmentId(attachmentId string) return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkGetAddOnContextCall) PostId(postId string) *CoursesCourseWorkGetAddOnContextCall { c.urlParams_.Set("postId", postId) @@ -6623,9 +6626,9 @@ type CoursesCourseWorkAddOnAttachmentsCreateCall struct { // identified resources does not exist. // // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which to create the attachment. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which to create the attachment. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkAddOnAttachmentsService) Create(courseId string, itemId string, addonattachment *AddOnAttachment) *CoursesCourseWorkAddOnAttachmentsCreateCall { c := &CoursesCourseWorkAddOnAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -6646,7 +6649,7 @@ func (c *CoursesCourseWorkAddOnAttachmentsCreateCall) AddOnToken(addOnToken stri return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkAddOnAttachmentsCreateCall) PostId(postId string) *CoursesCourseWorkAddOnAttachmentsCreateCall { c.urlParams_.Set("postId", postId) @@ -6755,9 +6758,9 @@ type CoursesCourseWorkAddOnAttachmentsDeleteCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkAddOnAttachmentsService) Delete(courseId string, itemId string, attachmentId string) *CoursesCourseWorkAddOnAttachmentsDeleteCall { c := &CoursesCourseWorkAddOnAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -6766,7 +6769,7 @@ func (r *CoursesCourseWorkAddOnAttachmentsService) Delete(courseId string, itemI return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkAddOnAttachmentsDeleteCall) PostId(postId string) *CoursesCourseWorkAddOnAttachmentsDeleteCall { c.urlParams_.Set("postId", postId) @@ -6872,9 +6875,9 @@ type CoursesCourseWorkAddOnAttachmentsGetCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkAddOnAttachmentsService) Get(courseId string, itemId string, attachmentId string) *CoursesCourseWorkAddOnAttachmentsGetCall { c := &CoursesCourseWorkAddOnAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -6883,7 +6886,7 @@ func (r *CoursesCourseWorkAddOnAttachmentsService) Get(courseId string, itemId s return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkAddOnAttachmentsGetCall) PostId(postId string) *CoursesCourseWorkAddOnAttachmentsGetCall { c.urlParams_.Set("postId", postId) @@ -7000,9 +7003,9 @@ type CoursesCourseWorkAddOnAttachmentsListCall struct { // not exist. // // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// whose attachments should be enumerated. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` whose attachments should be enumerated. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkAddOnAttachmentsService) List(courseId string, itemId string) *CoursesCourseWorkAddOnAttachmentsListCall { c := &CoursesCourseWorkAddOnAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -7029,7 +7032,8 @@ func (c *CoursesCourseWorkAddOnAttachmentsListCall) PageToken(pageToken string) } // PostId sets the optional parameter "postId": Identifier of the post under -// the course whose attachments to enumerate. Deprecated, use item_id instead. +// the course whose attachments to enumerate. Deprecated, use `item_id` +// instead. func (c *CoursesCourseWorkAddOnAttachmentsListCall) PostId(postId string) *CoursesCourseWorkAddOnAttachmentsListCall { c.urlParams_.Set("postId", postId) return c @@ -7301,9 +7305,9 @@ type CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. // - submissionId: Identifier of the student’s submission. func (r *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsService) Get(courseId string, itemId string, attachmentId string, submissionId string) *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall { c := &CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -7314,7 +7318,7 @@ func (r *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsService) Get(courseI return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall) PostId(postId string) *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsGetCall { c.urlParams_.Set("postId", postId) @@ -7435,9 +7439,9 @@ type CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. // - submissionId: Identifier of the student's submission. func (r *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsService) Patch(courseId string, itemId string, attachmentId string, submissionId string, addonattachmentstudentsubmission *AddOnAttachmentStudentSubmission) *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall { c := &CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -7449,7 +7453,7 @@ func (r *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsService) Patch(cours return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall) PostId(postId string) *CoursesCourseWorkAddOnAttachmentsStudentSubmissionsPatchCall { c.urlParams_.Set("postId", postId) @@ -8858,9 +8862,9 @@ type CoursesCourseWorkMaterialsGetAddOnContextCall struct { // `NOT_FOUND` if one of the identified resources does not exist. // // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkMaterialsService) GetAddOnContext(courseId string, itemId string) *CoursesCourseWorkMaterialsGetAddOnContextCall { c := &CoursesCourseWorkMaterialsGetAddOnContextCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -8888,7 +8892,7 @@ func (c *CoursesCourseWorkMaterialsGetAddOnContextCall) AttachmentId(attachmentI return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkMaterialsGetAddOnContextCall) PostId(postId string) *CoursesCourseWorkMaterialsGetAddOnContextCall { c.urlParams_.Set("postId", postId) @@ -9338,9 +9342,9 @@ type CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall struct { // identified resources does not exist. // // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which to create the attachment. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which to create the attachment. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkMaterialsAddOnAttachmentsService) Create(courseId string, itemId string, addonattachment *AddOnAttachment) *CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall { c := &CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -9361,7 +9365,7 @@ func (c *CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall) AddOnToken(addOnT return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall) PostId(postId string) *CoursesCourseWorkMaterialsAddOnAttachmentsCreateCall { c.urlParams_.Set("postId", postId) @@ -9470,9 +9474,9 @@ type CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkMaterialsAddOnAttachmentsService) Delete(courseId string, itemId string, attachmentId string) *CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall { c := &CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -9481,7 +9485,7 @@ func (r *CoursesCourseWorkMaterialsAddOnAttachmentsService) Delete(courseId stri return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall) PostId(postId string) *CoursesCourseWorkMaterialsAddOnAttachmentsDeleteCall { c.urlParams_.Set("postId", postId) @@ -9587,9 +9591,9 @@ type CoursesCourseWorkMaterialsAddOnAttachmentsGetCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// under which the attachment is attached. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` under which the attachment is attached. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkMaterialsAddOnAttachmentsService) Get(courseId string, itemId string, attachmentId string) *CoursesCourseWorkMaterialsAddOnAttachmentsGetCall { c := &CoursesCourseWorkMaterialsAddOnAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -9598,7 +9602,7 @@ func (r *CoursesCourseWorkMaterialsAddOnAttachmentsService) Get(courseId string, return c } -// PostId sets the optional parameter "postId": Deprecated, use item_id +// PostId sets the optional parameter "postId": Deprecated, use `item_id` // instead. func (c *CoursesCourseWorkMaterialsAddOnAttachmentsGetCall) PostId(postId string) *CoursesCourseWorkMaterialsAddOnAttachmentsGetCall { c.urlParams_.Set("postId", postId) @@ -9715,9 +9719,9 @@ type CoursesCourseWorkMaterialsAddOnAttachmentsListCall struct { // not exist. // // - courseId: Identifier of the course. -// - itemId: Identifier of the announcement, courseWork, or courseWorkMaterial -// whose attachments should be enumerated. This field is required, but is not -// marked as such while we are migrating from post_id. +// - itemId: Identifier of the `Announcement`, `CourseWork`, or +// `CourseWorkMaterial` whose attachments should be enumerated. This field is +// required, but is not marked as such while we are migrating from post_id. func (r *CoursesCourseWorkMaterialsAddOnAttachmentsService) List(courseId string, itemId string) *CoursesCourseWorkMaterialsAddOnAttachmentsListCall { c := &CoursesCourseWorkMaterialsAddOnAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -9744,7 +9748,8 @@ func (c *CoursesCourseWorkMaterialsAddOnAttachmentsListCall) PageToken(pageToken } // PostId sets the optional parameter "postId": Identifier of the post under -// the course whose attachments to enumerate. Deprecated, use item_id instead. +// the course whose attachments to enumerate. Deprecated, use `item_id` +// instead. func (c *CoursesCourseWorkMaterialsAddOnAttachmentsListCall) PostId(postId string) *CoursesCourseWorkMaterialsAddOnAttachmentsListCall { c.urlParams_.Set("postId", postId) return c @@ -10017,7 +10022,7 @@ type CoursesPostsGetAddOnContextCall struct { // `NOT_FOUND` if one of the identified resources does not exist. // // - courseId: Identifier of the course. -// - postId: Optional. Deprecated, use item_id instead. +// - postId: Optional. Deprecated, use `item_id` instead. func (r *CoursesPostsService) GetAddOnContext(courseId string, postId string) *CoursesPostsGetAddOnContextCall { c := &CoursesPostsGetAddOnContextCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -10045,10 +10050,10 @@ func (c *CoursesPostsGetAddOnContextCall) AttachmentId(attachmentId string) *Cou return c } -// ItemId sets the optional parameter "itemId": Identifier of the announcement, -// courseWork, or courseWorkMaterial under which the attachment is attached. -// This field is required, but is not marked as such while we are migrating -// from post_id. +// ItemId sets the optional parameter "itemId": Identifier of the +// `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the +// attachment is attached. This field is required, but is not marked as such +// while we are migrating from post_id. func (c *CoursesPostsGetAddOnContextCall) ItemId(itemId string) *CoursesPostsGetAddOnContextCall { c.urlParams_.Set("itemId", itemId) return c @@ -10161,7 +10166,7 @@ type CoursesPostsAddOnAttachmentsCreateCall struct { // identified resources does not exist. // // - courseId: Identifier of the course. -// - postId: Optional. Deprecated, use item_id instead. +// - postId: Optional. Deprecated, use `item_id` instead. func (r *CoursesPostsAddOnAttachmentsService) Create(courseId string, postId string, addonattachment *AddOnAttachment) *CoursesPostsAddOnAttachmentsCreateCall { c := &CoursesPostsAddOnAttachmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -10182,10 +10187,10 @@ func (c *CoursesPostsAddOnAttachmentsCreateCall) AddOnToken(addOnToken string) * return c } -// ItemId sets the optional parameter "itemId": Identifier of the announcement, -// courseWork, or courseWorkMaterial under which to create the attachment. This -// field is required, but is not marked as such while we are migrating from -// post_id. +// ItemId sets the optional parameter "itemId": Identifier of the +// `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which to create +// the attachment. This field is required, but is not marked as such while we +// are migrating from post_id. func (c *CoursesPostsAddOnAttachmentsCreateCall) ItemId(itemId string) *CoursesPostsAddOnAttachmentsCreateCall { c.urlParams_.Set("itemId", itemId) return c @@ -10293,7 +10298,7 @@ type CoursesPostsAddOnAttachmentsDeleteCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - postId: Optional. Deprecated, use item_id instead. +// - postId: Optional. Deprecated, use `item_id` instead. func (r *CoursesPostsAddOnAttachmentsService) Delete(courseId string, postId string, attachmentId string) *CoursesPostsAddOnAttachmentsDeleteCall { c := &CoursesPostsAddOnAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -10302,10 +10307,10 @@ func (r *CoursesPostsAddOnAttachmentsService) Delete(courseId string, postId str return c } -// ItemId sets the optional parameter "itemId": Identifier of the announcement, -// courseWork, or courseWorkMaterial under which the attachment is attached. -// This field is required, but is not marked as such while we are migrating -// from post_id. +// ItemId sets the optional parameter "itemId": Identifier of the +// `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the +// attachment is attached. This field is required, but is not marked as such +// while we are migrating from post_id. func (c *CoursesPostsAddOnAttachmentsDeleteCall) ItemId(itemId string) *CoursesPostsAddOnAttachmentsDeleteCall { c.urlParams_.Set("itemId", itemId) return c @@ -10410,7 +10415,7 @@ type CoursesPostsAddOnAttachmentsGetCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - postId: Optional. Deprecated, use item_id instead. +// - postId: Optional. Deprecated, use `item_id` instead. func (r *CoursesPostsAddOnAttachmentsService) Get(courseId string, postId string, attachmentId string) *CoursesPostsAddOnAttachmentsGetCall { c := &CoursesPostsAddOnAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -10419,10 +10424,10 @@ func (r *CoursesPostsAddOnAttachmentsService) Get(courseId string, postId string return c } -// ItemId sets the optional parameter "itemId": Identifier of the announcement, -// courseWork, or courseWorkMaterial under which the attachment is attached. -// This field is required, but is not marked as such while we are migrating -// from post_id. +// ItemId sets the optional parameter "itemId": Identifier of the +// `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the +// attachment is attached. This field is required, but is not marked as such +// while we are migrating from post_id. func (c *CoursesPostsAddOnAttachmentsGetCall) ItemId(itemId string) *CoursesPostsAddOnAttachmentsGetCall { c.urlParams_.Set("itemId", itemId) return c @@ -10539,7 +10544,7 @@ type CoursesPostsAddOnAttachmentsListCall struct { // // - courseId: Identifier of the course. // - postId: Optional. Identifier of the post under the course whose -// attachments to enumerate. Deprecated, use item_id instead. +// attachments to enumerate. Deprecated, use `item_id` instead. func (r *CoursesPostsAddOnAttachmentsService) List(courseId string, postId string) *CoursesPostsAddOnAttachmentsListCall { c := &CoursesPostsAddOnAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.courseId = courseId @@ -10547,10 +10552,10 @@ func (r *CoursesPostsAddOnAttachmentsService) List(courseId string, postId strin return c } -// ItemId sets the optional parameter "itemId": Identifier of the announcement, -// courseWork, or courseWorkMaterial whose attachments should be enumerated. -// This field is required, but is not marked as such while we are migrating -// from post_id. +// ItemId sets the optional parameter "itemId": Identifier of the +// `Announcement`, `CourseWork`, or `CourseWorkMaterial` whose attachments +// should be enumerated. This field is required, but is not marked as such +// while we are migrating from post_id. func (c *CoursesPostsAddOnAttachmentsListCall) ItemId(itemId string) *CoursesPostsAddOnAttachmentsListCall { c.urlParams_.Set("itemId", itemId) return c @@ -10840,7 +10845,7 @@ type CoursesPostsAddOnAttachmentsStudentSubmissionsGetCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - postId: Optional. Deprecated, use item_id instead. +// - postId: Optional. Deprecated, use `item_id` instead. // - submissionId: Identifier of the student’s submission. func (r *CoursesPostsAddOnAttachmentsStudentSubmissionsService) Get(courseId string, postId string, attachmentId string, submissionId string) *CoursesPostsAddOnAttachmentsStudentSubmissionsGetCall { c := &CoursesPostsAddOnAttachmentsStudentSubmissionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -10851,10 +10856,10 @@ func (r *CoursesPostsAddOnAttachmentsStudentSubmissionsService) Get(courseId str return c } -// ItemId sets the optional parameter "itemId": Identifier of the announcement, -// courseWork, or courseWorkMaterial under which the attachment is attached. -// This field is required, but is not marked as such while we are migrating -// from post_id. +// ItemId sets the optional parameter "itemId": Identifier of the +// `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the +// attachment is attached. This field is required, but is not marked as such +// while we are migrating from post_id. func (c *CoursesPostsAddOnAttachmentsStudentSubmissionsGetCall) ItemId(itemId string) *CoursesPostsAddOnAttachmentsStudentSubmissionsGetCall { c.urlParams_.Set("itemId", itemId) return c @@ -10974,7 +10979,7 @@ type CoursesPostsAddOnAttachmentsStudentSubmissionsPatchCall struct { // // - attachmentId: Identifier of the attachment. // - courseId: Identifier of the course. -// - postId: Optional. Deprecated, use item_id instead. +// - postId: Optional. Deprecated, use `item_id` instead. // - submissionId: Identifier of the student's submission. func (r *CoursesPostsAddOnAttachmentsStudentSubmissionsService) Patch(courseId string, postId string, attachmentId string, submissionId string, addonattachmentstudentsubmission *AddOnAttachmentStudentSubmission) *CoursesPostsAddOnAttachmentsStudentSubmissionsPatchCall { c := &CoursesPostsAddOnAttachmentsStudentSubmissionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -10986,10 +10991,10 @@ func (r *CoursesPostsAddOnAttachmentsStudentSubmissionsService) Patch(courseId s return c } -// ItemId sets the optional parameter "itemId": Identifier of the announcement, -// courseWork, or courseWorkMaterial under which the attachment is attached. -// This field is required, but is not marked as such while we are migrating -// from post_id. +// ItemId sets the optional parameter "itemId": Identifier of the +// `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the +// attachment is attached. This field is required, but is not marked as such +// while we are migrating from post_id. func (c *CoursesPostsAddOnAttachmentsStudentSubmissionsPatchCall) ItemId(itemId string) *CoursesPostsAddOnAttachmentsStudentSubmissionsPatchCall { c.urlParams_.Set("itemId", itemId) return c diff --git a/cloudbilling/v1beta/cloudbilling-api.json b/cloudbilling/v1beta/cloudbilling-api.json index a2f91b84f98..df4005438d6 100644 --- a/cloudbilling/v1beta/cloudbilling-api.json +++ b/cloudbilling/v1beta/cloudbilling-api.json @@ -761,7 +761,7 @@ } } }, - "revision": "20240531", + "revision": "20240906", "rootUrl": "https://cloudbilling.googleapis.com/", "schemas": { "CacheFillRegions": { @@ -961,7 +961,7 @@ "type": "object" }, "CloudStorageEgressWorkload": { - "description": "Specification of a network type. Network data transfer within Google Cloud applies when you move or copy data from one Cloud Storage bucket to another or when another Google Cloud service accesses data in your Cloud Storage bucket.This includes the network data transfer within Google Cloud and the general network usage.", + "description": "Specification of a network type. Network data transfer within Google Cloud applies when you move or copy data from one Cloud Storage bucket to another or when another Google Cloud service accesses data in your Cloud Storage bucket.This includes the network data transfer within Google Cloud and the general network usage. * If transferring data between two regions, the source and destination fields are set to different values. For example: `source_continent` = \"SOURCE_CONTINENT_ASIA_PACIFIC\", `destination_continent` = \"SOURCE_CONTINENT_SOUTH_AMERICA\". * If transferring data within one region, the source and destination fields are set to the same value. For example: `source_continent` = \"SOURCE_CONTINENT_ASIA_PACIFIC\", `destination_continent` = \"SOURCE_CONTINENT_ASIA_PACIFIC\". Some examples for the Network data transfer traffic type on the pricing page. * Data moves between different locations on the same continent. `source_continent` = \"SOURCE_CONTINENT_ASIA_PACIFIC\", `destination_continent` = \"SOURCE_CONTINENT_ASIA_PACIFIC\". * Data moves between different continents and neither is Australia. `source_continent` = \"SOURCE_CONTINENT_NORTH_AMERICA\", `destination_continent` = \"SOURCE_CONTINENT_ASIA_PACIFIC\". * Data moves between different continents and one is Australia. `source_continent` = \"SOURCE_CONTINENT_NORTH_AMERICA\", `destination_continent` = \"SOURCE_CONTINENT_AUSTRALIA\".", "id": "CloudStorageEgressWorkload", "properties": { "destinationContinent": { diff --git a/cloudbilling/v1beta/cloudbilling-gen.go b/cloudbilling/v1beta/cloudbilling-gen.go index 492ba2c8c8e..4ef31c61438 100644 --- a/cloudbilling/v1beta/cloudbilling-gen.go +++ b/cloudbilling/v1beta/cloudbilling-gen.go @@ -525,7 +525,23 @@ func (s CloudInterconnectWorkload) MarshalJSON() ([]byte, error) { // transfer within Google Cloud applies when you move or copy data from one // Cloud Storage bucket to another or when another Google Cloud service // accesses data in your Cloud Storage bucket.This includes the network data -// transfer within Google Cloud and the general network usage. +// transfer within Google Cloud and the general network usage. * If +// transferring data between two regions, the source and destination fields are +// set to different values. For example: `source_continent` = +// "SOURCE_CONTINENT_ASIA_PACIFIC", `destination_continent` = +// "SOURCE_CONTINENT_SOUTH_AMERICA". * If transferring data within one region, +// the source and destination fields are set to the same value. For example: +// `source_continent` = "SOURCE_CONTINENT_ASIA_PACIFIC", +// `destination_continent` = "SOURCE_CONTINENT_ASIA_PACIFIC". Some examples for +// the Network data transfer traffic type on the pricing page. * Data moves +// between different locations on the same continent. `source_continent` = +// "SOURCE_CONTINENT_ASIA_PACIFIC", `destination_continent` = +// "SOURCE_CONTINENT_ASIA_PACIFIC". * Data moves between different continents +// and neither is Australia. `source_continent` = +// "SOURCE_CONTINENT_NORTH_AMERICA", `destination_continent` = +// "SOURCE_CONTINENT_ASIA_PACIFIC". * Data moves between different continents +// and one is Australia. `source_continent` = "SOURCE_CONTINENT_NORTH_AMERICA", +// `destination_continent` = "SOURCE_CONTINENT_AUSTRALIA". type CloudStorageEgressWorkload struct { // DestinationContinent: Where the data is sent to. // diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 42de6a301c2..380f9e24a7f 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -154,11 +154,6 @@ "required": true, "type": "string" }, - "integrator": { - "description": "Optional. Resource name of the integrator.", - "location": "query", - "type": "string" - }, "pageSize": { "description": "Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, returns at most 100 service accounts. The maximum value is 1000; the server will coerce values above 1000.", "format": "int32", @@ -1971,121 +1966,6 @@ } } }, - "integrators": { - "methods": { - "listSubscribers": { - "description": "Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: A list of service email addresses.", - "flatPath": "v1/integrators/{integratorsId}:listSubscribers", - "httpMethod": "GET", - "id": "cloudchannel.integrators.listSubscribers", - "parameterOrder": [ - "integrator" - ], - "parameters": { - "account": { - "description": "Optional. Resource name of the account.", - "location": "query", - "type": "string" - }, - "integrator": { - "description": "Optional. Resource name of the integrator.", - "location": "path", - "pattern": "^integrators/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, returns at most 100 service accounts. The maximum value is 1000; the server will coerce values above 1000.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A page token, received from a previous `ListSubscribers` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscribers` must match the call that provided the page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+integrator}:listSubscribers", - "response": { - "$ref": "GoogleCloudChannelV1ListSubscribersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/apps.order" - ] - }, - "register": { - "description": "Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this Channel Services account. After you create a subscriber, you get the events through SubscriberEvent Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The topic name with the registered service email address.", - "flatPath": "v1/integrators/{integratorsId}:register", - "httpMethod": "POST", - "id": "cloudchannel.integrators.register", - "parameterOrder": [ - "integrator" - ], - "parameters": { - "account": { - "description": "Optional. Resource name of the account.", - "location": "query", - "type": "string" - }, - "integrator": { - "description": "Optional. Resource name of the integrator.", - "location": "path", - "pattern": "^integrators/[^/]+$", - "required": true, - "type": "string" - }, - "serviceAccount": { - "description": "Required. Service account that provides subscriber access to the registered topic.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+integrator}:register", - "response": { - "$ref": "GoogleCloudChannelV1RegisterSubscriberResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/apps.order" - ] - }, - "unregister": { - "description": "Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no service accounts left with subscriber privileges, this deletes the topic. You can call ListSubscribers to check for these accounts. Possible error codes: * PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The topic name that unregistered the service email address. Returns a success response if the service email address wasn't registered with the topic.", - "flatPath": "v1/integrators/{integratorsId}:unregister", - "httpMethod": "POST", - "id": "cloudchannel.integrators.unregister", - "parameterOrder": [ - "integrator" - ], - "parameters": { - "account": { - "description": "Optional. Resource name of the account.", - "location": "query", - "type": "string" - }, - "integrator": { - "description": "Optional. Resource name of the integrator.", - "location": "path", - "pattern": "^integrators/[^/]+$", - "required": true, - "type": "string" - }, - "serviceAccount": { - "description": "Required. Service account to unregister from subscriber access to the topic.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+integrator}:unregister", - "response": { - "$ref": "GoogleCloudChannelV1UnregisterSubscriberResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/apps.order" - ] - } - } - }, "operations": { "methods": { "cancel": { @@ -2303,7 +2183,7 @@ } } }, - "revision": "20240828", + "revision": "20240913", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -2579,11 +2459,11 @@ "id": "GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest", "properties": { "domain": { - "description": "Required. Domain to fetch for Cloud Identity account customers, including domained and domainless.", + "description": "Required. Domain to fetch for Cloud Identity account customers, including domain and team customers. For team customers, please use the domain for their emails.", "type": "string" }, "primaryAdminEmail": { - "description": "Optional. Primary admin email to fetch for Cloud Identity account domainless customer.", + "description": "Optional. Primary admin email to fetch for Cloud Identity account team customer.", "type": "string" } }, @@ -3450,7 +3330,7 @@ "type": "boolean" }, "primaryAdminEmail": { - "description": "Optional. Customer's primary admin email.", + "description": "Required. Customer's primary admin email.", "type": "string" } }, @@ -4363,10 +4243,6 @@ "description": "Request Message for RegisterSubscriber.", "id": "GoogleCloudChannelV1RegisterSubscriberRequest", "properties": { - "integrator": { - "description": "Optional. Resource name of the integrator.", - "type": "string" - }, "serviceAccount": { "description": "Required. Service account that provides subscriber access to the registered topic.", "type": "string" @@ -4941,10 +4817,6 @@ "description": "Request Message for UnregisterSubscriber.", "id": "GoogleCloudChannelV1UnregisterSubscriberRequest", "properties": { - "integrator": { - "description": "Optional. Resource name of the integrator.", - "type": "string" - }, "serviceAccount": { "description": "Required. Service account to unregister from subscriber access to the topic.", "type": "string" diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index 28cd03a11fe..2d380633e3c 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -144,7 +144,6 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Accounts = NewAccountsService(s) - s.Integrators = NewIntegratorsService(s) s.Operations = NewOperationsService(s) s.Products = NewProductsService(s) return s, nil @@ -157,8 +156,6 @@ type Service struct { Accounts *AccountsService - Integrators *IntegratorsService - Operations *OperationsService Products *ProductsService @@ -312,15 +309,6 @@ type AccountsSkuGroupsBillableSkusService struct { s *Service } -func NewIntegratorsService(s *Service) *IntegratorsService { - rs := &IntegratorsService{s: s} - return rs -} - -type IntegratorsService struct { - s *Service -} - func NewOperationsService(s *Service) *OperationsService { rs := &OperationsService{s: s} return rs @@ -754,10 +742,11 @@ func (s GoogleCloudChannelV1ChannelPartnerRepricingConfig) MarshalJSON() ([]byte // for CloudChannelService.CheckCloudIdentityAccountsExist. type GoogleCloudChannelV1CheckCloudIdentityAccountsExistRequest struct { // Domain: Required. Domain to fetch for Cloud Identity account customers, - // including domained and domainless. + // including domain and team customers. For team customers, please use the + // domain for their emails. Domain string `json:"domain,omitempty"` // PrimaryAdminEmail: Optional. Primary admin email to fetch for Cloud Identity - // account domainless customer. + // account team customer. PrimaryAdminEmail string `json:"primaryAdminEmail,omitempty"` // ForceSendFields is a list of field names (e.g. "Domain") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -1682,7 +1671,7 @@ type GoogleCloudChannelV1ImportCustomerRequest struct { // found. This must be set to true if there is an existing customer with a // conflicting region code or domain. OverwriteIfExists bool `json:"overwriteIfExists,omitempty"` - // PrimaryAdminEmail: Optional. Customer's primary admin email. + // PrimaryAdminEmail: Required. Customer's primary admin email. PrimaryAdminEmail string `json:"primaryAdminEmail,omitempty"` // ForceSendFields is a list of field names (e.g. "AuthToken") to // unconditionally include in API requests. By default, fields with empty or @@ -2925,20 +2914,18 @@ func (s GoogleCloudChannelV1QueryEligibleBillingAccountsResponse) MarshalJSON() // GoogleCloudChannelV1RegisterSubscriberRequest: Request Message for // RegisterSubscriber. type GoogleCloudChannelV1RegisterSubscriberRequest struct { - // Integrator: Optional. Resource name of the integrator. - Integrator string `json:"integrator,omitempty"` // ServiceAccount: Required. Service account that provides subscriber access to // the registered topic. ServiceAccount string `json:"serviceAccount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Integrator") to + // ForceSendFields is a list of field names (e.g. "ServiceAccount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Integrator") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ServiceAccount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -3806,20 +3793,18 @@ func (s GoogleCloudChannelV1TrialSettings) MarshalJSON() ([]byte, error) { // GoogleCloudChannelV1UnregisterSubscriberRequest: Request Message for // UnregisterSubscriber. type GoogleCloudChannelV1UnregisterSubscriberRequest struct { - // Integrator: Optional. Resource name of the integrator. - Integrator string `json:"integrator,omitempty"` // ServiceAccount: Required. Service account to unregister from subscriber // access to the topic. ServiceAccount string `json:"serviceAccount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Integrator") to + // ForceSendFields is a list of field names (e.g. "ServiceAccount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Integrator") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ServiceAccount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -5341,13 +5326,6 @@ func (r *AccountsService) ListSubscribers(account string) *AccountsListSubscribe return c } -// Integrator sets the optional parameter "integrator": Resource name of the -// integrator. -func (c *AccountsListSubscribersCall) Integrator(integrator string) *AccountsListSubscribersCall { - c.urlParams_.Set("integrator", integrator) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number of // service accounts to return. The service may return fewer than this value. If // unspecified, returns at most 100 service accounts. The maximum value is @@ -12470,407 +12448,6 @@ func (c *AccountsSkuGroupsBillableSkusListCall) Pages(ctx context.Context, f fun } } -type IntegratorsListSubscribersCall struct { - s *Service - integrator string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListSubscribers: Lists service accounts with subscriber privileges on the -// Cloud Pub/Sub topic created for this Channel Services account. Possible -// error codes: * PERMISSION_DENIED: The reseller account making the request -// and the provided reseller account are different, or the impersonated user is -// not a super admin. * INVALID_ARGUMENT: Required request parameters are -// missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * -// INTERNAL: Any non-user error related to a technical issue in the backend. -// Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a -// technical issue in the backend. Contact Cloud Channel support. Return value: -// A list of service email addresses. -// -// - integrator: Optional. Resource name of the integrator. -func (r *IntegratorsService) ListSubscribers(integrator string) *IntegratorsListSubscribersCall { - c := &IntegratorsListSubscribersCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.integrator = integrator - return c -} - -// Account sets the optional parameter "account": Resource name of the account. -func (c *IntegratorsListSubscribersCall) Account(account string) *IntegratorsListSubscribersCall { - c.urlParams_.Set("account", account) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// service accounts to return. The service may return fewer than this value. If -// unspecified, returns at most 100 service accounts. The maximum value is -// 1000; the server will coerce values above 1000. -func (c *IntegratorsListSubscribersCall) PageSize(pageSize int64) *IntegratorsListSubscribersCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSubscribers` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListSubscribers` must match the call that provided the page token. -func (c *IntegratorsListSubscribersCall) PageToken(pageToken string) *IntegratorsListSubscribersCall { - 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 -// details. -func (c *IntegratorsListSubscribersCall) Fields(s ...googleapi.Field) *IntegratorsListSubscribersCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an 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. -func (c *IntegratorsListSubscribersCall) IfNoneMatch(entityTag string) *IntegratorsListSubscribersCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *IntegratorsListSubscribersCall) Context(ctx context.Context) *IntegratorsListSubscribersCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *IntegratorsListSubscribersCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *IntegratorsListSubscribersCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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/{+integrator}:listSubscribers") - 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{ - "integrator": c.integrator, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudchannel.integrators.listSubscribers" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudChannelV1ListSubscribersResponse.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 *IntegratorsListSubscribersCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1ListSubscribersResponse, 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 := &GoogleCloudChannelV1ListSubscribersResponse{ - 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 -} - -// 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 *IntegratorsListSubscribersCall) Pages(ctx context.Context, f func(*GoogleCloudChannelV1ListSubscribersResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 IntegratorsRegisterCall struct { - s *Service - integrator string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Register: Registers a service account with subscriber privileges on the -// Cloud Pub/Sub topic for this Channel Services account. After you create a -// subscriber, you get the events through SubscriberEvent Possible error codes: -// * PERMISSION_DENIED: The reseller account making the request and the -// provided reseller account are different, or the impersonated user is not a -// super admin. * INVALID_ARGUMENT: Required request parameters are missing or -// invalid. * INTERNAL: Any non-user error related to a technical issue in the -// backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error -// related to a technical issue in the backend. Contact Cloud Channel support. -// Return value: The topic name with the registered service email address. -// -// - integrator: Optional. Resource name of the integrator. -func (r *IntegratorsService) Register(integrator string) *IntegratorsRegisterCall { - c := &IntegratorsRegisterCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.integrator = integrator - return c -} - -// Account sets the optional parameter "account": Resource name of the account. -func (c *IntegratorsRegisterCall) Account(account string) *IntegratorsRegisterCall { - c.urlParams_.Set("account", account) - return c -} - -// ServiceAccount sets the optional parameter "serviceAccount": Required. -// Service account that provides subscriber access to the registered topic. -func (c *IntegratorsRegisterCall) ServiceAccount(serviceAccount string) *IntegratorsRegisterCall { - c.urlParams_.Set("serviceAccount", serviceAccount) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *IntegratorsRegisterCall) Fields(s ...googleapi.Field) *IntegratorsRegisterCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *IntegratorsRegisterCall) Context(ctx context.Context) *IntegratorsRegisterCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *IntegratorsRegisterCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *IntegratorsRegisterCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+integrator}:register") - 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{ - "integrator": c.integrator, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudchannel.integrators.register" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudChannelV1RegisterSubscriberResponse.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 *IntegratorsRegisterCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1RegisterSubscriberResponse, 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 := &GoogleCloudChannelV1RegisterSubscriberResponse{ - 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 -} - -type IntegratorsUnregisterCall struct { - s *Service - integrator string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Unregister: Unregisters a service account with subscriber privileges on the -// Cloud Pub/Sub topic created for this Channel Services account. If there are -// no service accounts left with subscriber privileges, this deletes the topic. -// You can call ListSubscribers to check for these accounts. Possible error -// codes: * PERMISSION_DENIED: The reseller account making the request and the -// provided reseller account are different, or the impersonated user is not a -// super admin. * INVALID_ARGUMENT: Required request parameters are missing or -// invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any -// non-user error related to a technical issue in the backend. Contact Cloud -// Channel support. * UNKNOWN: Any non-user error related to a technical issue -// in the backend. Contact Cloud Channel support. Return value: The topic name -// that unregistered the service email address. Returns a success response if -// the service email address wasn't registered with the topic. -// -// - integrator: Optional. Resource name of the integrator. -func (r *IntegratorsService) Unregister(integrator string) *IntegratorsUnregisterCall { - c := &IntegratorsUnregisterCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.integrator = integrator - return c -} - -// Account sets the optional parameter "account": Resource name of the account. -func (c *IntegratorsUnregisterCall) Account(account string) *IntegratorsUnregisterCall { - c.urlParams_.Set("account", account) - return c -} - -// ServiceAccount sets the optional parameter "serviceAccount": Required. -// Service account to unregister from subscriber access to the topic. -func (c *IntegratorsUnregisterCall) ServiceAccount(serviceAccount string) *IntegratorsUnregisterCall { - c.urlParams_.Set("serviceAccount", serviceAccount) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *IntegratorsUnregisterCall) Fields(s ...googleapi.Field) *IntegratorsUnregisterCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *IntegratorsUnregisterCall) Context(ctx context.Context) *IntegratorsUnregisterCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *IntegratorsUnregisterCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *IntegratorsUnregisterCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+integrator}:unregister") - 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{ - "integrator": c.integrator, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "cloudchannel.integrators.unregister" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudChannelV1UnregisterSubscriberResponse.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 *IntegratorsUnregisterCall) Do(opts ...googleapi.CallOption) (*GoogleCloudChannelV1UnregisterSubscriberResponse, 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 := &GoogleCloudChannelV1UnregisterSubscriberResponse{ - 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 -} - type OperationsCancelCall struct { s *Service name string diff --git a/cloudcontrolspartner/v1/cloudcontrolspartner-api.json b/cloudcontrolspartner/v1/cloudcontrolspartner-api.json index 0b3c7c3eecb..4bf7ac73f0d 100644 --- a/cloudcontrolspartner/v1/cloudcontrolspartner-api.json +++ b/cloudcontrolspartner/v1/cloudcontrolspartner-api.json @@ -484,7 +484,7 @@ } } }, - "revision": "20240814", + "revision": "20240904", "rootUrl": "https://cloudcontrolspartner.googleapis.com/", "schemas": { "AccessApprovalRequest": { @@ -598,7 +598,7 @@ "readOnly": true }, "displayName": { - "description": "The customer organization's display name. E.g. \"Google\".", + "description": "Required. Display name for the customer", "type": "string" }, "isOnboarded": { diff --git a/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go b/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go index bb697624ea9..0b3fdd87741 100644 --- a/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go +++ b/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go @@ -360,7 +360,7 @@ type Customer struct { // CustomerOnboardingState: Output only. Container for customer onboarding // steps CustomerOnboardingState *CustomerOnboardingState `json:"customerOnboardingState,omitempty"` - // DisplayName: The customer organization's display name. E.g. "Google". + // DisplayName: Required. Display name for the customer DisplayName string `json:"displayName,omitempty"` // IsOnboarded: Output only. Indicates whether a customer is fully onboarded IsOnboarded bool `json:"isOnboarded,omitempty"` diff --git a/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json b/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json index b4041f398f9..f923949d306 100644 --- a/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json +++ b/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json @@ -484,7 +484,7 @@ } } }, - "revision": "20240814", + "revision": "20240904", "rootUrl": "https://cloudcontrolspartner.googleapis.com/", "schemas": { "AccessApprovalRequest": { @@ -598,7 +598,7 @@ "readOnly": true }, "displayName": { - "description": "The customer organization's display name. E.g. \"Google\".", + "description": "Required. Display name for the customer", "type": "string" }, "isOnboarded": { diff --git a/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go b/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go index 6bceb50671e..dad889bbf9d 100644 --- a/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go +++ b/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go @@ -360,7 +360,7 @@ type Customer struct { // CustomerOnboardingState: Output only. Container for customer onboarding // steps CustomerOnboardingState *CustomerOnboardingState `json:"customerOnboardingState,omitempty"` - // DisplayName: The customer organization's display name. E.g. "Google". + // DisplayName: Required. Display name for the customer DisplayName string `json:"displayName,omitempty"` // IsOnboarded: Output only. Indicates whether a customer is fully onboarded IsOnboarded bool `json:"isOnboarded,omitempty"` diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index fb1cb80c53e..29d91e9f814 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -552,7 +552,7 @@ } } }, - "revision": "20240725", + "revision": "20240905", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -987,621 +987,6 @@ }, "type": "object" }, - "GoogleCloudFunctionsV2LocationMetadata": { - "description": "Extra GCF specific location information.", - "id": "GoogleCloudFunctionsV2LocationMetadata", - "properties": { - "environments": { - "description": "The Cloud Function environments this location supports.", - "items": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "GEN_1", - "GEN_2" - ], - "enumDescriptions": [ - "Unspecified", - "Gen 1", - "Gen 2" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudFunctionsV2OperationMetadata", - "properties": { - "apiVersion": { - "description": "API version used to start the operation.", - "type": "string" - }, - "buildName": { - "description": "The build name of the function for create and update operations.", - "type": "string" - }, - "cancelRequested": { - "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATIONTYPE_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION", - "REDIRECT_FUNCTION_UPGRADE_TRAFFIC", - "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC", - "SETUP_FUNCTION_UPGRADE_CONFIG", - "ABORT_FUNCTION_UPGRADE", - "COMMIT_FUNCTION_UPGRADE" - ], - "enumDescriptions": [ - "Unspecified", - "CreateFunction", - "UpdateFunction", - "DeleteFunction", - "RedirectFunctionUpgradeTraffic", - "RollbackFunctionUpgradeTraffic", - "SetupFunctionUpgradeConfig", - "AbortFunctionUpgrade", - "CommitFunctionUpgrade" - ], - "type": "string" - }, - "requestResource": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "sourceToken": { - "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", - "type": "string" - }, - "stages": { - "description": "Mechanism for reporting in-progress stages", - "items": { - "$ref": "GoogleCloudFunctionsV2Stage" - }, - "type": "array" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Server-defined resource path for the target of the operation.", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2Stage": { - "description": "Each Stage of the deployment process", - "id": "GoogleCloudFunctionsV2Stage", - "properties": { - "message": { - "description": "Message describing the Stage", - "type": "string" - }, - "name": { - "description": "Name of the Stage. This will be unique for each Stage.", - "enum": [ - "NAME_UNSPECIFIED", - "ARTIFACT_REGISTRY", - "BUILD", - "SERVICE", - "TRIGGER", - "SERVICE_ROLLBACK", - "TRIGGER_ROLLBACK" - ], - "enumDescriptions": [ - "Not specified. Invalid name.", - "Artifact Regsitry Stage", - "Build Stage", - "Service Stage", - "Trigger Stage", - "Service Rollback Stage", - "Trigger Rollback Stage" - ], - "type": "string" - }, - "resource": { - "description": "Resource of the Stage", - "type": "string" - }, - "resourceUri": { - "description": "Link to the current Stage resource", - "type": "string" - }, - "state": { - "description": "Current state of the Stage", - "enum": [ - "STATE_UNSPECIFIED", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETE" - ], - "enumDescriptions": [ - "Not specified. Invalid state.", - "Stage has not started.", - "Stage is in progress.", - "Stage has completed." - ], - "type": "string" - }, - "stateMessages": { - "description": "State messages from the current Stage.", - "items": { - "$ref": "GoogleCloudFunctionsV2StateMessage" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2StateMessage": { - "description": "Informational messages about the state of the Cloud Function or Operation.", - "id": "GoogleCloudFunctionsV2StateMessage", - "properties": { - "message": { - "description": "The message.", - "type": "string" - }, - "severity": { - "description": "Severity of the state message.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Not specified. Invalid severity.", - "ERROR-level severity.", - "WARNING-level severity.", - "INFO-level severity." - ], - "type": "string" - }, - "type": { - "description": "One-word CamelCase type of the state message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaLocationMetadata": { - "description": "Extra GCF specific location information.", - "id": "GoogleCloudFunctionsV2alphaLocationMetadata", - "properties": { - "environments": { - "description": "The Cloud Function environments this location supports.", - "items": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "GEN_1", - "GEN_2" - ], - "enumDescriptions": [ - "Unspecified", - "Gen 1", - "Gen 2" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudFunctionsV2alphaOperationMetadata", - "properties": { - "apiVersion": { - "description": "API version used to start the operation.", - "type": "string" - }, - "buildName": { - "description": "The build name of the function for create and update operations.", - "type": "string" - }, - "cancelRequested": { - "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATIONTYPE_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION", - "REDIRECT_FUNCTION_UPGRADE_TRAFFIC", - "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC", - "SETUP_FUNCTION_UPGRADE_CONFIG", - "ABORT_FUNCTION_UPGRADE", - "COMMIT_FUNCTION_UPGRADE" - ], - "enumDescriptions": [ - "Unspecified", - "CreateFunction", - "UpdateFunction", - "DeleteFunction", - "RedirectFunctionUpgradeTraffic", - "RollbackFunctionUpgradeTraffic", - "SetupFunctionUpgradeConfig", - "AbortFunctionUpgrade", - "CommitFunctionUpgrade" - ], - "type": "string" - }, - "requestResource": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "sourceToken": { - "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", - "type": "string" - }, - "stages": { - "description": "Mechanism for reporting in-progress stages", - "items": { - "$ref": "GoogleCloudFunctionsV2alphaStage" - }, - "type": "array" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Server-defined resource path for the target of the operation.", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaStage": { - "description": "Each Stage of the deployment process", - "id": "GoogleCloudFunctionsV2alphaStage", - "properties": { - "message": { - "description": "Message describing the Stage", - "type": "string" - }, - "name": { - "description": "Name of the Stage. This will be unique for each Stage.", - "enum": [ - "NAME_UNSPECIFIED", - "ARTIFACT_REGISTRY", - "BUILD", - "SERVICE", - "TRIGGER", - "SERVICE_ROLLBACK", - "TRIGGER_ROLLBACK" - ], - "enumDescriptions": [ - "Not specified. Invalid name.", - "Artifact Regsitry Stage", - "Build Stage", - "Service Stage", - "Trigger Stage", - "Service Rollback Stage", - "Trigger Rollback Stage" - ], - "type": "string" - }, - "resource": { - "description": "Resource of the Stage", - "type": "string" - }, - "resourceUri": { - "description": "Link to the current Stage resource", - "type": "string" - }, - "state": { - "description": "Current state of the Stage", - "enum": [ - "STATE_UNSPECIFIED", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETE" - ], - "enumDescriptions": [ - "Not specified. Invalid state.", - "Stage has not started.", - "Stage is in progress.", - "Stage has completed." - ], - "type": "string" - }, - "stateMessages": { - "description": "State messages from the current Stage.", - "items": { - "$ref": "GoogleCloudFunctionsV2alphaStateMessage" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaStateMessage": { - "description": "Informational messages about the state of the Cloud Function or Operation.", - "id": "GoogleCloudFunctionsV2alphaStateMessage", - "properties": { - "message": { - "description": "The message.", - "type": "string" - }, - "severity": { - "description": "Severity of the state message.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Not specified. Invalid severity.", - "ERROR-level severity.", - "WARNING-level severity.", - "INFO-level severity." - ], - "type": "string" - }, - "type": { - "description": "One-word CamelCase type of the state message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaLocationMetadata": { - "description": "Extra GCF specific location information.", - "id": "GoogleCloudFunctionsV2betaLocationMetadata", - "properties": { - "environments": { - "description": "The Cloud Function environments this location supports.", - "items": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "GEN_1", - "GEN_2" - ], - "enumDescriptions": [ - "Unspecified", - "Gen 1", - "Gen 2" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudFunctionsV2betaOperationMetadata", - "properties": { - "apiVersion": { - "description": "API version used to start the operation.", - "type": "string" - }, - "buildName": { - "description": "The build name of the function for create and update operations.", - "type": "string" - }, - "cancelRequested": { - "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATIONTYPE_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION", - "REDIRECT_FUNCTION_UPGRADE_TRAFFIC", - "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC", - "SETUP_FUNCTION_UPGRADE_CONFIG", - "ABORT_FUNCTION_UPGRADE", - "COMMIT_FUNCTION_UPGRADE" - ], - "enumDescriptions": [ - "Unspecified", - "CreateFunction", - "UpdateFunction", - "DeleteFunction", - "RedirectFunctionUpgradeTraffic", - "RollbackFunctionUpgradeTraffic", - "SetupFunctionUpgradeConfig", - "AbortFunctionUpgrade", - "CommitFunctionUpgrade" - ], - "type": "string" - }, - "requestResource": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "sourceToken": { - "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", - "type": "string" - }, - "stages": { - "description": "Mechanism for reporting in-progress stages", - "items": { - "$ref": "GoogleCloudFunctionsV2betaStage" - }, - "type": "array" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Server-defined resource path for the target of the operation.", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaStage": { - "description": "Each Stage of the deployment process", - "id": "GoogleCloudFunctionsV2betaStage", - "properties": { - "message": { - "description": "Message describing the Stage", - "type": "string" - }, - "name": { - "description": "Name of the Stage. This will be unique for each Stage.", - "enum": [ - "NAME_UNSPECIFIED", - "ARTIFACT_REGISTRY", - "BUILD", - "SERVICE", - "TRIGGER", - "SERVICE_ROLLBACK", - "TRIGGER_ROLLBACK" - ], - "enumDescriptions": [ - "Not specified. Invalid name.", - "Artifact Regsitry Stage", - "Build Stage", - "Service Stage", - "Trigger Stage", - "Service Rollback Stage", - "Trigger Rollback Stage" - ], - "type": "string" - }, - "resource": { - "description": "Resource of the Stage", - "type": "string" - }, - "resourceUri": { - "description": "Link to the current Stage resource", - "type": "string" - }, - "state": { - "description": "Current state of the Stage", - "enum": [ - "STATE_UNSPECIFIED", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETE" - ], - "enumDescriptions": [ - "Not specified. Invalid state.", - "Stage has not started.", - "Stage is in progress.", - "Stage has completed." - ], - "type": "string" - }, - "stateMessages": { - "description": "State messages from the current Stage.", - "items": { - "$ref": "GoogleCloudFunctionsV2betaStateMessage" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaStateMessage": { - "description": "Informational messages about the state of the Cloud Function or Operation.", - "id": "GoogleCloudFunctionsV2betaStateMessage", - "properties": { - "message": { - "description": "The message.", - "type": "string" - }, - "severity": { - "description": "Severity of the state message.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Not specified. Invalid severity.", - "ERROR-level severity.", - "WARNING-level severity.", - "INFO-level severity." - ], - "type": "string" - }, - "type": { - "description": "One-word CamelCase type of the state message.", - "type": "string" - } - }, - "type": "object" - }, "HttpsTrigger": { "description": "Describes HttpsTrigger, could be used to connect web hooks to function.", "id": "HttpsTrigger", diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index a4c3d131d94..1cc377c3abc 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -874,510 +874,6 @@ func (s GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2LocationMetadata: Extra GCF specific location -// information. -type GoogleCloudFunctionsV2LocationMetadata struct { - // Environments: The Cloud Function environments this location supports. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Unspecified - // "GEN_1" - Gen 1 - // "GEN_2" - Gen 2 - Environments []string `json:"environments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2LocationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2LocationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2OperationMetadata: Represents the metadata of the -// long-running operation. -type GoogleCloudFunctionsV2OperationMetadata struct { - // ApiVersion: API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // BuildName: The build name of the function for create and update operations. - BuildName string `json:"buildName,omitempty"` - // CancelRequested: Identifies whether the user has requested cancellation of - // the operation. Operations that have successfully been cancelled have - // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // OperationType: The operation type. - // - // Possible values: - // "OPERATIONTYPE_UNSPECIFIED" - Unspecified - // "CREATE_FUNCTION" - CreateFunction - // "UPDATE_FUNCTION" - UpdateFunction - // "DELETE_FUNCTION" - DeleteFunction - // "REDIRECT_FUNCTION_UPGRADE_TRAFFIC" - RedirectFunctionUpgradeTraffic - // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC" - RollbackFunctionUpgradeTraffic - // "SETUP_FUNCTION_UPGRADE_CONFIG" - SetupFunctionUpgradeConfig - // "ABORT_FUNCTION_UPGRADE" - AbortFunctionUpgrade - // "COMMIT_FUNCTION_UPGRADE" - CommitFunctionUpgrade - OperationType string `json:"operationType,omitempty"` - // RequestResource: The original request that started the operation. - RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` - // SourceToken: An identifier for Firebase function sources. Disclaimer: This - // field is only supported for Firebase function deployments. - SourceToken string `json:"sourceToken,omitempty"` - // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2Stage `json:"stages,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Server-defined resource path for the target of the operation. - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2Stage: Each Stage of the deployment process -type GoogleCloudFunctionsV2Stage struct { - // Message: Message describing the Stage - Message string `json:"message,omitempty"` - // Name: Name of the Stage. This will be unique for each Stage. - // - // Possible values: - // "NAME_UNSPECIFIED" - Not specified. Invalid name. - // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage - // "BUILD" - Build Stage - // "SERVICE" - Service Stage - // "TRIGGER" - Trigger Stage - // "SERVICE_ROLLBACK" - Service Rollback Stage - // "TRIGGER_ROLLBACK" - Trigger Rollback Stage - Name string `json:"name,omitempty"` - // Resource: Resource of the Stage - Resource string `json:"resource,omitempty"` - // ResourceUri: Link to the current Stage resource - ResourceUri string `json:"resourceUri,omitempty"` - // State: Current state of the Stage - // - // Possible values: - // "STATE_UNSPECIFIED" - Not specified. Invalid state. - // "NOT_STARTED" - Stage has not started. - // "IN_PROGRESS" - Stage is in progress. - // "COMPLETE" - Stage has completed. - State string `json:"state,omitempty"` - // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2StateMessage `json:"stateMessages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2Stage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2Stage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2StateMessage: Informational messages about the state -// of the Cloud Function or Operation. -type GoogleCloudFunctionsV2StateMessage struct { - // Message: The message. - Message string `json:"message,omitempty"` - // Severity: Severity of the state message. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. - // "ERROR" - ERROR-level severity. - // "WARNING" - WARNING-level severity. - // "INFO" - INFO-level severity. - Severity string `json:"severity,omitempty"` - // Type: One-word CamelCase type of the state message. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2StateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2StateMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaLocationMetadata: Extra GCF specific location -// information. -type GoogleCloudFunctionsV2alphaLocationMetadata struct { - // Environments: The Cloud Function environments this location supports. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Unspecified - // "GEN_1" - Gen 1 - // "GEN_2" - Gen 2 - Environments []string `json:"environments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaLocationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaLocationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata of the -// long-running operation. -type GoogleCloudFunctionsV2alphaOperationMetadata struct { - // ApiVersion: API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // BuildName: The build name of the function for create and update operations. - BuildName string `json:"buildName,omitempty"` - // CancelRequested: Identifies whether the user has requested cancellation of - // the operation. Operations that have successfully been cancelled have - // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // OperationType: The operation type. - // - // Possible values: - // "OPERATIONTYPE_UNSPECIFIED" - Unspecified - // "CREATE_FUNCTION" - CreateFunction - // "UPDATE_FUNCTION" - UpdateFunction - // "DELETE_FUNCTION" - DeleteFunction - // "REDIRECT_FUNCTION_UPGRADE_TRAFFIC" - RedirectFunctionUpgradeTraffic - // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC" - RollbackFunctionUpgradeTraffic - // "SETUP_FUNCTION_UPGRADE_CONFIG" - SetupFunctionUpgradeConfig - // "ABORT_FUNCTION_UPGRADE" - AbortFunctionUpgrade - // "COMMIT_FUNCTION_UPGRADE" - CommitFunctionUpgrade - OperationType string `json:"operationType,omitempty"` - // RequestResource: The original request that started the operation. - RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` - // SourceToken: An identifier for Firebase function sources. Disclaimer: This - // field is only supported for Firebase function deployments. - SourceToken string `json:"sourceToken,omitempty"` - // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2alphaStage `json:"stages,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Server-defined resource path for the target of the operation. - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaStage: Each Stage of the deployment process -type GoogleCloudFunctionsV2alphaStage struct { - // Message: Message describing the Stage - Message string `json:"message,omitempty"` - // Name: Name of the Stage. This will be unique for each Stage. - // - // Possible values: - // "NAME_UNSPECIFIED" - Not specified. Invalid name. - // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage - // "BUILD" - Build Stage - // "SERVICE" - Service Stage - // "TRIGGER" - Trigger Stage - // "SERVICE_ROLLBACK" - Service Rollback Stage - // "TRIGGER_ROLLBACK" - Trigger Rollback Stage - Name string `json:"name,omitempty"` - // Resource: Resource of the Stage - Resource string `json:"resource,omitempty"` - // ResourceUri: Link to the current Stage resource - ResourceUri string `json:"resourceUri,omitempty"` - // State: Current state of the Stage - // - // Possible values: - // "STATE_UNSPECIFIED" - Not specified. Invalid state. - // "NOT_STARTED" - Stage has not started. - // "IN_PROGRESS" - Stage is in progress. - // "COMPLETE" - Stage has completed. - State string `json:"state,omitempty"` - // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2alphaStateMessage `json:"stateMessages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaStage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaStage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaStateMessage: Informational messages about the -// state of the Cloud Function or Operation. -type GoogleCloudFunctionsV2alphaStateMessage struct { - // Message: The message. - Message string `json:"message,omitempty"` - // Severity: Severity of the state message. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. - // "ERROR" - ERROR-level severity. - // "WARNING" - WARNING-level severity. - // "INFO" - INFO-level severity. - Severity string `json:"severity,omitempty"` - // Type: One-word CamelCase type of the state message. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaStateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaStateMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaLocationMetadata: Extra GCF specific location -// information. -type GoogleCloudFunctionsV2betaLocationMetadata struct { - // Environments: The Cloud Function environments this location supports. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Unspecified - // "GEN_1" - Gen 1 - // "GEN_2" - Gen 2 - Environments []string `json:"environments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaLocationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaLocationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaOperationMetadata: Represents the metadata of the -// long-running operation. -type GoogleCloudFunctionsV2betaOperationMetadata struct { - // ApiVersion: API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // BuildName: The build name of the function for create and update operations. - BuildName string `json:"buildName,omitempty"` - // CancelRequested: Identifies whether the user has requested cancellation of - // the operation. Operations that have successfully been cancelled have - // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // OperationType: The operation type. - // - // Possible values: - // "OPERATIONTYPE_UNSPECIFIED" - Unspecified - // "CREATE_FUNCTION" - CreateFunction - // "UPDATE_FUNCTION" - UpdateFunction - // "DELETE_FUNCTION" - DeleteFunction - // "REDIRECT_FUNCTION_UPGRADE_TRAFFIC" - RedirectFunctionUpgradeTraffic - // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC" - RollbackFunctionUpgradeTraffic - // "SETUP_FUNCTION_UPGRADE_CONFIG" - SetupFunctionUpgradeConfig - // "ABORT_FUNCTION_UPGRADE" - AbortFunctionUpgrade - // "COMMIT_FUNCTION_UPGRADE" - CommitFunctionUpgrade - OperationType string `json:"operationType,omitempty"` - // RequestResource: The original request that started the operation. - RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` - // SourceToken: An identifier for Firebase function sources. Disclaimer: This - // field is only supported for Firebase function deployments. - SourceToken string `json:"sourceToken,omitempty"` - // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2betaStage `json:"stages,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Server-defined resource path for the target of the operation. - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaStage: Each Stage of the deployment process -type GoogleCloudFunctionsV2betaStage struct { - // Message: Message describing the Stage - Message string `json:"message,omitempty"` - // Name: Name of the Stage. This will be unique for each Stage. - // - // Possible values: - // "NAME_UNSPECIFIED" - Not specified. Invalid name. - // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage - // "BUILD" - Build Stage - // "SERVICE" - Service Stage - // "TRIGGER" - Trigger Stage - // "SERVICE_ROLLBACK" - Service Rollback Stage - // "TRIGGER_ROLLBACK" - Trigger Rollback Stage - Name string `json:"name,omitempty"` - // Resource: Resource of the Stage - Resource string `json:"resource,omitempty"` - // ResourceUri: Link to the current Stage resource - ResourceUri string `json:"resourceUri,omitempty"` - // State: Current state of the Stage - // - // Possible values: - // "STATE_UNSPECIFIED" - Not specified. Invalid state. - // "NOT_STARTED" - Stage has not started. - // "IN_PROGRESS" - Stage is in progress. - // "COMPLETE" - Stage has completed. - State string `json:"state,omitempty"` - // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2betaStateMessage `json:"stateMessages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaStage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaStage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaStateMessage: Informational messages about the -// state of the Cloud Function or Operation. -type GoogleCloudFunctionsV2betaStateMessage struct { - // Message: The message. - Message string `json:"message,omitempty"` - // Severity: Severity of the state message. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. - // "ERROR" - ERROR-level severity. - // "WARNING" - WARNING-level severity. - // "INFO" - INFO-level severity. - Severity string `json:"severity,omitempty"` - // Type: One-word CamelCase type of the state message. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaStateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaStateMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // HttpsTrigger: Describes HttpsTrigger, could be used to connect web hooks to // function. type HttpsTrigger struct { diff --git a/cloudfunctions/v2/cloudfunctions-api.json b/cloudfunctions/v2/cloudfunctions-api.json index 2c36be3c1be..154b292ab8c 100644 --- a/cloudfunctions/v2/cloudfunctions-api.json +++ b/cloudfunctions/v2/cloudfunctions-api.json @@ -716,7 +716,7 @@ } } }, - "revision": "20240822", + "revision": "20240905", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -1370,416 +1370,6 @@ }, "type": "object" }, - "GoogleCloudFunctionsV2alphaLocationMetadata": { - "description": "Extra GCF specific location information.", - "id": "GoogleCloudFunctionsV2alphaLocationMetadata", - "properties": { - "environments": { - "description": "The Cloud Function environments this location supports.", - "items": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "GEN_1", - "GEN_2" - ], - "enumDescriptions": [ - "Unspecified", - "Gen 1", - "Gen 2" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudFunctionsV2alphaOperationMetadata", - "properties": { - "apiVersion": { - "description": "API version used to start the operation.", - "type": "string" - }, - "buildName": { - "description": "The build name of the function for create and update operations.", - "type": "string" - }, - "cancelRequested": { - "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATIONTYPE_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION", - "REDIRECT_FUNCTION_UPGRADE_TRAFFIC", - "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC", - "SETUP_FUNCTION_UPGRADE_CONFIG", - "ABORT_FUNCTION_UPGRADE", - "COMMIT_FUNCTION_UPGRADE" - ], - "enumDescriptions": [ - "Unspecified", - "CreateFunction", - "UpdateFunction", - "DeleteFunction", - "RedirectFunctionUpgradeTraffic", - "RollbackFunctionUpgradeTraffic", - "SetupFunctionUpgradeConfig", - "AbortFunctionUpgrade", - "CommitFunctionUpgrade" - ], - "type": "string" - }, - "requestResource": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "sourceToken": { - "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", - "type": "string" - }, - "stages": { - "description": "Mechanism for reporting in-progress stages", - "items": { - "$ref": "GoogleCloudFunctionsV2alphaStage" - }, - "type": "array" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Server-defined resource path for the target of the operation.", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaStage": { - "description": "Each Stage of the deployment process", - "id": "GoogleCloudFunctionsV2alphaStage", - "properties": { - "message": { - "description": "Message describing the Stage", - "type": "string" - }, - "name": { - "description": "Name of the Stage. This will be unique for each Stage.", - "enum": [ - "NAME_UNSPECIFIED", - "ARTIFACT_REGISTRY", - "BUILD", - "SERVICE", - "TRIGGER", - "SERVICE_ROLLBACK", - "TRIGGER_ROLLBACK" - ], - "enumDescriptions": [ - "Not specified. Invalid name.", - "Artifact Regsitry Stage", - "Build Stage", - "Service Stage", - "Trigger Stage", - "Service Rollback Stage", - "Trigger Rollback Stage" - ], - "type": "string" - }, - "resource": { - "description": "Resource of the Stage", - "type": "string" - }, - "resourceUri": { - "description": "Link to the current Stage resource", - "type": "string" - }, - "state": { - "description": "Current state of the Stage", - "enum": [ - "STATE_UNSPECIFIED", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETE" - ], - "enumDescriptions": [ - "Not specified. Invalid state.", - "Stage has not started.", - "Stage is in progress.", - "Stage has completed." - ], - "type": "string" - }, - "stateMessages": { - "description": "State messages from the current Stage.", - "items": { - "$ref": "GoogleCloudFunctionsV2alphaStateMessage" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaStateMessage": { - "description": "Informational messages about the state of the Cloud Function or Operation.", - "id": "GoogleCloudFunctionsV2alphaStateMessage", - "properties": { - "message": { - "description": "The message.", - "type": "string" - }, - "severity": { - "description": "Severity of the state message.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Not specified. Invalid severity.", - "ERROR-level severity.", - "WARNING-level severity.", - "INFO-level severity." - ], - "type": "string" - }, - "type": { - "description": "One-word CamelCase type of the state message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaLocationMetadata": { - "description": "Extra GCF specific location information.", - "id": "GoogleCloudFunctionsV2betaLocationMetadata", - "properties": { - "environments": { - "description": "The Cloud Function environments this location supports.", - "items": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "GEN_1", - "GEN_2" - ], - "enumDescriptions": [ - "Unspecified", - "Gen 1", - "Gen 2" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudFunctionsV2betaOperationMetadata", - "properties": { - "apiVersion": { - "description": "API version used to start the operation.", - "type": "string" - }, - "buildName": { - "description": "The build name of the function for create and update operations.", - "type": "string" - }, - "cancelRequested": { - "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATIONTYPE_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION", - "REDIRECT_FUNCTION_UPGRADE_TRAFFIC", - "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC", - "SETUP_FUNCTION_UPGRADE_CONFIG", - "ABORT_FUNCTION_UPGRADE", - "COMMIT_FUNCTION_UPGRADE" - ], - "enumDescriptions": [ - "Unspecified", - "CreateFunction", - "UpdateFunction", - "DeleteFunction", - "RedirectFunctionUpgradeTraffic", - "RollbackFunctionUpgradeTraffic", - "SetupFunctionUpgradeConfig", - "AbortFunctionUpgrade", - "CommitFunctionUpgrade" - ], - "type": "string" - }, - "requestResource": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "sourceToken": { - "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", - "type": "string" - }, - "stages": { - "description": "Mechanism for reporting in-progress stages", - "items": { - "$ref": "GoogleCloudFunctionsV2betaStage" - }, - "type": "array" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Server-defined resource path for the target of the operation.", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaStage": { - "description": "Each Stage of the deployment process", - "id": "GoogleCloudFunctionsV2betaStage", - "properties": { - "message": { - "description": "Message describing the Stage", - "type": "string" - }, - "name": { - "description": "Name of the Stage. This will be unique for each Stage.", - "enum": [ - "NAME_UNSPECIFIED", - "ARTIFACT_REGISTRY", - "BUILD", - "SERVICE", - "TRIGGER", - "SERVICE_ROLLBACK", - "TRIGGER_ROLLBACK" - ], - "enumDescriptions": [ - "Not specified. Invalid name.", - "Artifact Regsitry Stage", - "Build Stage", - "Service Stage", - "Trigger Stage", - "Service Rollback Stage", - "Trigger Rollback Stage" - ], - "type": "string" - }, - "resource": { - "description": "Resource of the Stage", - "type": "string" - }, - "resourceUri": { - "description": "Link to the current Stage resource", - "type": "string" - }, - "state": { - "description": "Current state of the Stage", - "enum": [ - "STATE_UNSPECIFIED", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETE" - ], - "enumDescriptions": [ - "Not specified. Invalid state.", - "Stage has not started.", - "Stage is in progress.", - "Stage has completed." - ], - "type": "string" - }, - "stateMessages": { - "description": "State messages from the current Stage.", - "items": { - "$ref": "GoogleCloudFunctionsV2betaStateMessage" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaStateMessage": { - "description": "Informational messages about the state of the Cloud Function or Operation.", - "id": "GoogleCloudFunctionsV2betaStateMessage", - "properties": { - "message": { - "description": "The message.", - "type": "string" - }, - "severity": { - "description": "Severity of the state message.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Not specified. Invalid severity.", - "ERROR-level severity.", - "WARNING-level severity.", - "INFO-level severity." - ], - "type": "string" - }, - "type": { - "description": "One-word CamelCase type of the state message.", - "type": "string" - } - }, - "type": "object" - }, "ListFunctionsResponse": { "description": "Response for the `ListFunctions` method.", "id": "ListFunctionsResponse", diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index e577a1d50ee..d0294c4470e 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -1020,342 +1020,6 @@ func (s GoogleCloudFunctionsV2StateMessage) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2alphaLocationMetadata: Extra GCF specific location -// information. -type GoogleCloudFunctionsV2alphaLocationMetadata struct { - // Environments: The Cloud Function environments this location supports. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Unspecified - // "GEN_1" - Gen 1 - // "GEN_2" - Gen 2 - Environments []string `json:"environments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaLocationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaLocationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata of the -// long-running operation. -type GoogleCloudFunctionsV2alphaOperationMetadata struct { - // ApiVersion: API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // BuildName: The build name of the function for create and update operations. - BuildName string `json:"buildName,omitempty"` - // CancelRequested: Identifies whether the user has requested cancellation of - // the operation. Operations that have successfully been cancelled have - // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // OperationType: The operation type. - // - // Possible values: - // "OPERATIONTYPE_UNSPECIFIED" - Unspecified - // "CREATE_FUNCTION" - CreateFunction - // "UPDATE_FUNCTION" - UpdateFunction - // "DELETE_FUNCTION" - DeleteFunction - // "REDIRECT_FUNCTION_UPGRADE_TRAFFIC" - RedirectFunctionUpgradeTraffic - // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC" - RollbackFunctionUpgradeTraffic - // "SETUP_FUNCTION_UPGRADE_CONFIG" - SetupFunctionUpgradeConfig - // "ABORT_FUNCTION_UPGRADE" - AbortFunctionUpgrade - // "COMMIT_FUNCTION_UPGRADE" - CommitFunctionUpgrade - OperationType string `json:"operationType,omitempty"` - // RequestResource: The original request that started the operation. - RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` - // SourceToken: An identifier for Firebase function sources. Disclaimer: This - // field is only supported for Firebase function deployments. - SourceToken string `json:"sourceToken,omitempty"` - // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2alphaStage `json:"stages,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Server-defined resource path for the target of the operation. - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaStage: Each Stage of the deployment process -type GoogleCloudFunctionsV2alphaStage struct { - // Message: Message describing the Stage - Message string `json:"message,omitempty"` - // Name: Name of the Stage. This will be unique for each Stage. - // - // Possible values: - // "NAME_UNSPECIFIED" - Not specified. Invalid name. - // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage - // "BUILD" - Build Stage - // "SERVICE" - Service Stage - // "TRIGGER" - Trigger Stage - // "SERVICE_ROLLBACK" - Service Rollback Stage - // "TRIGGER_ROLLBACK" - Trigger Rollback Stage - Name string `json:"name,omitempty"` - // Resource: Resource of the Stage - Resource string `json:"resource,omitempty"` - // ResourceUri: Link to the current Stage resource - ResourceUri string `json:"resourceUri,omitempty"` - // State: Current state of the Stage - // - // Possible values: - // "STATE_UNSPECIFIED" - Not specified. Invalid state. - // "NOT_STARTED" - Stage has not started. - // "IN_PROGRESS" - Stage is in progress. - // "COMPLETE" - Stage has completed. - State string `json:"state,omitempty"` - // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2alphaStateMessage `json:"stateMessages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaStage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaStage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaStateMessage: Informational messages about the -// state of the Cloud Function or Operation. -type GoogleCloudFunctionsV2alphaStateMessage struct { - // Message: The message. - Message string `json:"message,omitempty"` - // Severity: Severity of the state message. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. - // "ERROR" - ERROR-level severity. - // "WARNING" - WARNING-level severity. - // "INFO" - INFO-level severity. - Severity string `json:"severity,omitempty"` - // Type: One-word CamelCase type of the state message. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaStateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaStateMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaLocationMetadata: Extra GCF specific location -// information. -type GoogleCloudFunctionsV2betaLocationMetadata struct { - // Environments: The Cloud Function environments this location supports. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Unspecified - // "GEN_1" - Gen 1 - // "GEN_2" - Gen 2 - Environments []string `json:"environments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaLocationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaLocationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaOperationMetadata: Represents the metadata of the -// long-running operation. -type GoogleCloudFunctionsV2betaOperationMetadata struct { - // ApiVersion: API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // BuildName: The build name of the function for create and update operations. - BuildName string `json:"buildName,omitempty"` - // CancelRequested: Identifies whether the user has requested cancellation of - // the operation. Operations that have successfully been cancelled have - // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // OperationType: The operation type. - // - // Possible values: - // "OPERATIONTYPE_UNSPECIFIED" - Unspecified - // "CREATE_FUNCTION" - CreateFunction - // "UPDATE_FUNCTION" - UpdateFunction - // "DELETE_FUNCTION" - DeleteFunction - // "REDIRECT_FUNCTION_UPGRADE_TRAFFIC" - RedirectFunctionUpgradeTraffic - // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC" - RollbackFunctionUpgradeTraffic - // "SETUP_FUNCTION_UPGRADE_CONFIG" - SetupFunctionUpgradeConfig - // "ABORT_FUNCTION_UPGRADE" - AbortFunctionUpgrade - // "COMMIT_FUNCTION_UPGRADE" - CommitFunctionUpgrade - OperationType string `json:"operationType,omitempty"` - // RequestResource: The original request that started the operation. - RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` - // SourceToken: An identifier for Firebase function sources. Disclaimer: This - // field is only supported for Firebase function deployments. - SourceToken string `json:"sourceToken,omitempty"` - // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2betaStage `json:"stages,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Server-defined resource path for the target of the operation. - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaStage: Each Stage of the deployment process -type GoogleCloudFunctionsV2betaStage struct { - // Message: Message describing the Stage - Message string `json:"message,omitempty"` - // Name: Name of the Stage. This will be unique for each Stage. - // - // Possible values: - // "NAME_UNSPECIFIED" - Not specified. Invalid name. - // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage - // "BUILD" - Build Stage - // "SERVICE" - Service Stage - // "TRIGGER" - Trigger Stage - // "SERVICE_ROLLBACK" - Service Rollback Stage - // "TRIGGER_ROLLBACK" - Trigger Rollback Stage - Name string `json:"name,omitempty"` - // Resource: Resource of the Stage - Resource string `json:"resource,omitempty"` - // ResourceUri: Link to the current Stage resource - ResourceUri string `json:"resourceUri,omitempty"` - // State: Current state of the Stage - // - // Possible values: - // "STATE_UNSPECIFIED" - Not specified. Invalid state. - // "NOT_STARTED" - Stage has not started. - // "IN_PROGRESS" - Stage is in progress. - // "COMPLETE" - Stage has completed. - State string `json:"state,omitempty"` - // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2betaStateMessage `json:"stateMessages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaStage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaStage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaStateMessage: Informational messages about the -// state of the Cloud Function or Operation. -type GoogleCloudFunctionsV2betaStateMessage struct { - // Message: The message. - Message string `json:"message,omitempty"` - // Severity: Severity of the state message. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. - // "ERROR" - ERROR-level severity. - // "WARNING" - WARNING-level severity. - // "INFO" - INFO-level severity. - Severity string `json:"severity,omitempty"` - // Type: One-word CamelCase type of the state message. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaStateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaStateMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ListFunctionsResponse: Response for the `ListFunctions` method. type ListFunctionsResponse struct { // Functions: The functions that match the request. diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index 79a8ca7803f..cbf7e3f2d6c 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -716,7 +716,7 @@ } } }, - "revision": "20240822", + "revision": "20240905", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -1165,211 +1165,6 @@ }, "type": "object" }, - "GoogleCloudFunctionsV2LocationMetadata": { - "description": "Extra GCF specific location information.", - "id": "GoogleCloudFunctionsV2LocationMetadata", - "properties": { - "environments": { - "description": "The Cloud Function environments this location supports.", - "items": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "GEN_1", - "GEN_2" - ], - "enumDescriptions": [ - "Unspecified", - "Gen 1", - "Gen 2" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudFunctionsV2OperationMetadata", - "properties": { - "apiVersion": { - "description": "API version used to start the operation.", - "type": "string" - }, - "buildName": { - "description": "The build name of the function for create and update operations.", - "type": "string" - }, - "cancelRequested": { - "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATIONTYPE_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION", - "REDIRECT_FUNCTION_UPGRADE_TRAFFIC", - "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC", - "SETUP_FUNCTION_UPGRADE_CONFIG", - "ABORT_FUNCTION_UPGRADE", - "COMMIT_FUNCTION_UPGRADE" - ], - "enumDescriptions": [ - "Unspecified", - "CreateFunction", - "UpdateFunction", - "DeleteFunction", - "RedirectFunctionUpgradeTraffic", - "RollbackFunctionUpgradeTraffic", - "SetupFunctionUpgradeConfig", - "AbortFunctionUpgrade", - "CommitFunctionUpgrade" - ], - "type": "string" - }, - "requestResource": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "sourceToken": { - "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", - "type": "string" - }, - "stages": { - "description": "Mechanism for reporting in-progress stages", - "items": { - "$ref": "GoogleCloudFunctionsV2Stage" - }, - "type": "array" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Server-defined resource path for the target of the operation.", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2Stage": { - "description": "Each Stage of the deployment process", - "id": "GoogleCloudFunctionsV2Stage", - "properties": { - "message": { - "description": "Message describing the Stage", - "type": "string" - }, - "name": { - "description": "Name of the Stage. This will be unique for each Stage.", - "enum": [ - "NAME_UNSPECIFIED", - "ARTIFACT_REGISTRY", - "BUILD", - "SERVICE", - "TRIGGER", - "SERVICE_ROLLBACK", - "TRIGGER_ROLLBACK" - ], - "enumDescriptions": [ - "Not specified. Invalid name.", - "Artifact Regsitry Stage", - "Build Stage", - "Service Stage", - "Trigger Stage", - "Service Rollback Stage", - "Trigger Rollback Stage" - ], - "type": "string" - }, - "resource": { - "description": "Resource of the Stage", - "type": "string" - }, - "resourceUri": { - "description": "Link to the current Stage resource", - "type": "string" - }, - "state": { - "description": "Current state of the Stage", - "enum": [ - "STATE_UNSPECIFIED", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETE" - ], - "enumDescriptions": [ - "Not specified. Invalid state.", - "Stage has not started.", - "Stage is in progress.", - "Stage has completed." - ], - "type": "string" - }, - "stateMessages": { - "description": "State messages from the current Stage.", - "items": { - "$ref": "GoogleCloudFunctionsV2StateMessage" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2StateMessage": { - "description": "Informational messages about the state of the Cloud Function or Operation.", - "id": "GoogleCloudFunctionsV2StateMessage", - "properties": { - "message": { - "description": "The message.", - "type": "string" - }, - "severity": { - "description": "Severity of the state message.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Not specified. Invalid severity.", - "ERROR-level severity.", - "WARNING-level severity.", - "INFO-level severity." - ], - "type": "string" - }, - "type": { - "description": "One-word CamelCase type of the state message.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudFunctionsV2alphaLocationMetadata": { "description": "Extra GCF specific location information.", "id": "GoogleCloudFunctionsV2alphaLocationMetadata", @@ -1575,211 +1370,6 @@ }, "type": "object" }, - "GoogleCloudFunctionsV2betaLocationMetadata": { - "description": "Extra GCF specific location information.", - "id": "GoogleCloudFunctionsV2betaLocationMetadata", - "properties": { - "environments": { - "description": "The Cloud Function environments this location supports.", - "items": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "GEN_1", - "GEN_2" - ], - "enumDescriptions": [ - "Unspecified", - "Gen 1", - "Gen 2" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudFunctionsV2betaOperationMetadata", - "properties": { - "apiVersion": { - "description": "API version used to start the operation.", - "type": "string" - }, - "buildName": { - "description": "The build name of the function for create and update operations.", - "type": "string" - }, - "cancelRequested": { - "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATIONTYPE_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION", - "REDIRECT_FUNCTION_UPGRADE_TRAFFIC", - "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC", - "SETUP_FUNCTION_UPGRADE_CONFIG", - "ABORT_FUNCTION_UPGRADE", - "COMMIT_FUNCTION_UPGRADE" - ], - "enumDescriptions": [ - "Unspecified", - "CreateFunction", - "UpdateFunction", - "DeleteFunction", - "RedirectFunctionUpgradeTraffic", - "RollbackFunctionUpgradeTraffic", - "SetupFunctionUpgradeConfig", - "AbortFunctionUpgrade", - "CommitFunctionUpgrade" - ], - "type": "string" - }, - "requestResource": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "sourceToken": { - "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", - "type": "string" - }, - "stages": { - "description": "Mechanism for reporting in-progress stages", - "items": { - "$ref": "GoogleCloudFunctionsV2betaStage" - }, - "type": "array" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Server-defined resource path for the target of the operation.", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaStage": { - "description": "Each Stage of the deployment process", - "id": "GoogleCloudFunctionsV2betaStage", - "properties": { - "message": { - "description": "Message describing the Stage", - "type": "string" - }, - "name": { - "description": "Name of the Stage. This will be unique for each Stage.", - "enum": [ - "NAME_UNSPECIFIED", - "ARTIFACT_REGISTRY", - "BUILD", - "SERVICE", - "TRIGGER", - "SERVICE_ROLLBACK", - "TRIGGER_ROLLBACK" - ], - "enumDescriptions": [ - "Not specified. Invalid name.", - "Artifact Regsitry Stage", - "Build Stage", - "Service Stage", - "Trigger Stage", - "Service Rollback Stage", - "Trigger Rollback Stage" - ], - "type": "string" - }, - "resource": { - "description": "Resource of the Stage", - "type": "string" - }, - "resourceUri": { - "description": "Link to the current Stage resource", - "type": "string" - }, - "state": { - "description": "Current state of the Stage", - "enum": [ - "STATE_UNSPECIFIED", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETE" - ], - "enumDescriptions": [ - "Not specified. Invalid state.", - "Stage has not started.", - "Stage is in progress.", - "Stage has completed." - ], - "type": "string" - }, - "stateMessages": { - "description": "State messages from the current Stage.", - "items": { - "$ref": "GoogleCloudFunctionsV2betaStateMessage" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2betaStateMessage": { - "description": "Informational messages about the state of the Cloud Function or Operation.", - "id": "GoogleCloudFunctionsV2betaStateMessage", - "properties": { - "message": { - "description": "The message.", - "type": "string" - }, - "severity": { - "description": "Severity of the state message.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Not specified. Invalid severity.", - "ERROR-level severity.", - "WARNING-level severity.", - "INFO-level severity." - ], - "type": "string" - }, - "type": { - "description": "One-word CamelCase type of the state message.", - "type": "string" - } - }, - "type": "object" - }, "ListFunctionsResponse": { "description": "Response for the `ListFunctions` method.", "id": "ListFunctionsResponse", diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index 66bf65cbf24..3dfc02d8198 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -852,174 +852,6 @@ func (s GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2LocationMetadata: Extra GCF specific location -// information. -type GoogleCloudFunctionsV2LocationMetadata struct { - // Environments: The Cloud Function environments this location supports. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Unspecified - // "GEN_1" - Gen 1 - // "GEN_2" - Gen 2 - Environments []string `json:"environments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2LocationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2LocationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2OperationMetadata: Represents the metadata of the -// long-running operation. -type GoogleCloudFunctionsV2OperationMetadata struct { - // ApiVersion: API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // BuildName: The build name of the function for create and update operations. - BuildName string `json:"buildName,omitempty"` - // CancelRequested: Identifies whether the user has requested cancellation of - // the operation. Operations that have successfully been cancelled have - // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // OperationType: The operation type. - // - // Possible values: - // "OPERATIONTYPE_UNSPECIFIED" - Unspecified - // "CREATE_FUNCTION" - CreateFunction - // "UPDATE_FUNCTION" - UpdateFunction - // "DELETE_FUNCTION" - DeleteFunction - // "REDIRECT_FUNCTION_UPGRADE_TRAFFIC" - RedirectFunctionUpgradeTraffic - // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC" - RollbackFunctionUpgradeTraffic - // "SETUP_FUNCTION_UPGRADE_CONFIG" - SetupFunctionUpgradeConfig - // "ABORT_FUNCTION_UPGRADE" - AbortFunctionUpgrade - // "COMMIT_FUNCTION_UPGRADE" - CommitFunctionUpgrade - OperationType string `json:"operationType,omitempty"` - // RequestResource: The original request that started the operation. - RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` - // SourceToken: An identifier for Firebase function sources. Disclaimer: This - // field is only supported for Firebase function deployments. - SourceToken string `json:"sourceToken,omitempty"` - // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2Stage `json:"stages,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Server-defined resource path for the target of the operation. - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2Stage: Each Stage of the deployment process -type GoogleCloudFunctionsV2Stage struct { - // Message: Message describing the Stage - Message string `json:"message,omitempty"` - // Name: Name of the Stage. This will be unique for each Stage. - // - // Possible values: - // "NAME_UNSPECIFIED" - Not specified. Invalid name. - // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage - // "BUILD" - Build Stage - // "SERVICE" - Service Stage - // "TRIGGER" - Trigger Stage - // "SERVICE_ROLLBACK" - Service Rollback Stage - // "TRIGGER_ROLLBACK" - Trigger Rollback Stage - Name string `json:"name,omitempty"` - // Resource: Resource of the Stage - Resource string `json:"resource,omitempty"` - // ResourceUri: Link to the current Stage resource - ResourceUri string `json:"resourceUri,omitempty"` - // State: Current state of the Stage - // - // Possible values: - // "STATE_UNSPECIFIED" - Not specified. Invalid state. - // "NOT_STARTED" - Stage has not started. - // "IN_PROGRESS" - Stage is in progress. - // "COMPLETE" - Stage has completed. - State string `json:"state,omitempty"` - // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2StateMessage `json:"stateMessages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2Stage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2Stage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2StateMessage: Informational messages about the state -// of the Cloud Function or Operation. -type GoogleCloudFunctionsV2StateMessage struct { - // Message: The message. - Message string `json:"message,omitempty"` - // Severity: Severity of the state message. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. - // "ERROR" - ERROR-level severity. - // "WARNING" - WARNING-level severity. - // "INFO" - INFO-level severity. - Severity string `json:"severity,omitempty"` - // Type: One-word CamelCase type of the state message. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2StateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2StateMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudFunctionsV2alphaLocationMetadata: Extra GCF specific location // information. type GoogleCloudFunctionsV2alphaLocationMetadata struct { @@ -1188,174 +1020,6 @@ func (s GoogleCloudFunctionsV2alphaStateMessage) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2betaLocationMetadata: Extra GCF specific location -// information. -type GoogleCloudFunctionsV2betaLocationMetadata struct { - // Environments: The Cloud Function environments this location supports. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Unspecified - // "GEN_1" - Gen 1 - // "GEN_2" - Gen 2 - Environments []string `json:"environments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaLocationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaLocationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaOperationMetadata: Represents the metadata of the -// long-running operation. -type GoogleCloudFunctionsV2betaOperationMetadata struct { - // ApiVersion: API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // BuildName: The build name of the function for create and update operations. - BuildName string `json:"buildName,omitempty"` - // CancelRequested: Identifies whether the user has requested cancellation of - // the operation. Operations that have successfully been cancelled have - // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // OperationType: The operation type. - // - // Possible values: - // "OPERATIONTYPE_UNSPECIFIED" - Unspecified - // "CREATE_FUNCTION" - CreateFunction - // "UPDATE_FUNCTION" - UpdateFunction - // "DELETE_FUNCTION" - DeleteFunction - // "REDIRECT_FUNCTION_UPGRADE_TRAFFIC" - RedirectFunctionUpgradeTraffic - // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC" - RollbackFunctionUpgradeTraffic - // "SETUP_FUNCTION_UPGRADE_CONFIG" - SetupFunctionUpgradeConfig - // "ABORT_FUNCTION_UPGRADE" - AbortFunctionUpgrade - // "COMMIT_FUNCTION_UPGRADE" - CommitFunctionUpgrade - OperationType string `json:"operationType,omitempty"` - // RequestResource: The original request that started the operation. - RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` - // SourceToken: An identifier for Firebase function sources. Disclaimer: This - // field is only supported for Firebase function deployments. - SourceToken string `json:"sourceToken,omitempty"` - // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2betaStage `json:"stages,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Server-defined resource path for the target of the operation. - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaStage: Each Stage of the deployment process -type GoogleCloudFunctionsV2betaStage struct { - // Message: Message describing the Stage - Message string `json:"message,omitempty"` - // Name: Name of the Stage. This will be unique for each Stage. - // - // Possible values: - // "NAME_UNSPECIFIED" - Not specified. Invalid name. - // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage - // "BUILD" - Build Stage - // "SERVICE" - Service Stage - // "TRIGGER" - Trigger Stage - // "SERVICE_ROLLBACK" - Service Rollback Stage - // "TRIGGER_ROLLBACK" - Trigger Rollback Stage - Name string `json:"name,omitempty"` - // Resource: Resource of the Stage - Resource string `json:"resource,omitempty"` - // ResourceUri: Link to the current Stage resource - ResourceUri string `json:"resourceUri,omitempty"` - // State: Current state of the Stage - // - // Possible values: - // "STATE_UNSPECIFIED" - Not specified. Invalid state. - // "NOT_STARTED" - Stage has not started. - // "IN_PROGRESS" - Stage is in progress. - // "COMPLETE" - Stage has completed. - State string `json:"state,omitempty"` - // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2betaStateMessage `json:"stateMessages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaStage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaStage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2betaStateMessage: Informational messages about the -// state of the Cloud Function or Operation. -type GoogleCloudFunctionsV2betaStateMessage struct { - // Message: The message. - Message string `json:"message,omitempty"` - // Severity: Severity of the state message. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. - // "ERROR" - ERROR-level severity. - // "WARNING" - WARNING-level severity. - // "INFO" - INFO-level severity. - Severity string `json:"severity,omitempty"` - // Type: One-word CamelCase type of the state message. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2betaStateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaStateMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ListFunctionsResponse: Response for the `ListFunctions` method. type ListFunctionsResponse struct { // Functions: The functions that match the request. diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index 3eb64909875..fe436718fa7 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -716,7 +716,7 @@ } } }, - "revision": "20240822", + "revision": "20240905", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -1165,416 +1165,6 @@ }, "type": "object" }, - "GoogleCloudFunctionsV2LocationMetadata": { - "description": "Extra GCF specific location information.", - "id": "GoogleCloudFunctionsV2LocationMetadata", - "properties": { - "environments": { - "description": "The Cloud Function environments this location supports.", - "items": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "GEN_1", - "GEN_2" - ], - "enumDescriptions": [ - "Unspecified", - "Gen 1", - "Gen 2" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2OperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudFunctionsV2OperationMetadata", - "properties": { - "apiVersion": { - "description": "API version used to start the operation.", - "type": "string" - }, - "buildName": { - "description": "The build name of the function for create and update operations.", - "type": "string" - }, - "cancelRequested": { - "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATIONTYPE_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION", - "REDIRECT_FUNCTION_UPGRADE_TRAFFIC", - "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC", - "SETUP_FUNCTION_UPGRADE_CONFIG", - "ABORT_FUNCTION_UPGRADE", - "COMMIT_FUNCTION_UPGRADE" - ], - "enumDescriptions": [ - "Unspecified", - "CreateFunction", - "UpdateFunction", - "DeleteFunction", - "RedirectFunctionUpgradeTraffic", - "RollbackFunctionUpgradeTraffic", - "SetupFunctionUpgradeConfig", - "AbortFunctionUpgrade", - "CommitFunctionUpgrade" - ], - "type": "string" - }, - "requestResource": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "sourceToken": { - "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", - "type": "string" - }, - "stages": { - "description": "Mechanism for reporting in-progress stages", - "items": { - "$ref": "GoogleCloudFunctionsV2Stage" - }, - "type": "array" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Server-defined resource path for the target of the operation.", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2Stage": { - "description": "Each Stage of the deployment process", - "id": "GoogleCloudFunctionsV2Stage", - "properties": { - "message": { - "description": "Message describing the Stage", - "type": "string" - }, - "name": { - "description": "Name of the Stage. This will be unique for each Stage.", - "enum": [ - "NAME_UNSPECIFIED", - "ARTIFACT_REGISTRY", - "BUILD", - "SERVICE", - "TRIGGER", - "SERVICE_ROLLBACK", - "TRIGGER_ROLLBACK" - ], - "enumDescriptions": [ - "Not specified. Invalid name.", - "Artifact Regsitry Stage", - "Build Stage", - "Service Stage", - "Trigger Stage", - "Service Rollback Stage", - "Trigger Rollback Stage" - ], - "type": "string" - }, - "resource": { - "description": "Resource of the Stage", - "type": "string" - }, - "resourceUri": { - "description": "Link to the current Stage resource", - "type": "string" - }, - "state": { - "description": "Current state of the Stage", - "enum": [ - "STATE_UNSPECIFIED", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETE" - ], - "enumDescriptions": [ - "Not specified. Invalid state.", - "Stage has not started.", - "Stage is in progress.", - "Stage has completed." - ], - "type": "string" - }, - "stateMessages": { - "description": "State messages from the current Stage.", - "items": { - "$ref": "GoogleCloudFunctionsV2StateMessage" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2StateMessage": { - "description": "Informational messages about the state of the Cloud Function or Operation.", - "id": "GoogleCloudFunctionsV2StateMessage", - "properties": { - "message": { - "description": "The message.", - "type": "string" - }, - "severity": { - "description": "Severity of the state message.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Not specified. Invalid severity.", - "ERROR-level severity.", - "WARNING-level severity.", - "INFO-level severity." - ], - "type": "string" - }, - "type": { - "description": "One-word CamelCase type of the state message.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaLocationMetadata": { - "description": "Extra GCF specific location information.", - "id": "GoogleCloudFunctionsV2alphaLocationMetadata", - "properties": { - "environments": { - "description": "The Cloud Function environments this location supports.", - "items": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "GEN_1", - "GEN_2" - ], - "enumDescriptions": [ - "Unspecified", - "Gen 1", - "Gen 2" - ], - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudFunctionsV2alphaOperationMetadata", - "properties": { - "apiVersion": { - "description": "API version used to start the operation.", - "type": "string" - }, - "buildName": { - "description": "The build name of the function for create and update operations.", - "type": "string" - }, - "cancelRequested": { - "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "type": "boolean" - }, - "createTime": { - "description": "The time the operation was created.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time the operation finished running.", - "format": "google-datetime", - "type": "string" - }, - "operationType": { - "description": "The operation type.", - "enum": [ - "OPERATIONTYPE_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION", - "REDIRECT_FUNCTION_UPGRADE_TRAFFIC", - "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC", - "SETUP_FUNCTION_UPGRADE_CONFIG", - "ABORT_FUNCTION_UPGRADE", - "COMMIT_FUNCTION_UPGRADE" - ], - "enumDescriptions": [ - "Unspecified", - "CreateFunction", - "UpdateFunction", - "DeleteFunction", - "RedirectFunctionUpgradeTraffic", - "RollbackFunctionUpgradeTraffic", - "SetupFunctionUpgradeConfig", - "AbortFunctionUpgrade", - "CommitFunctionUpgrade" - ], - "type": "string" - }, - "requestResource": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The original request that started the operation.", - "type": "object" - }, - "sourceToken": { - "description": "An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments.", - "type": "string" - }, - "stages": { - "description": "Mechanism for reporting in-progress stages", - "items": { - "$ref": "GoogleCloudFunctionsV2alphaStage" - }, - "type": "array" - }, - "statusDetail": { - "description": "Human-readable status of the operation, if any.", - "type": "string" - }, - "target": { - "description": "Server-defined resource path for the target of the operation.", - "type": "string" - }, - "verb": { - "description": "Name of the verb executed by the operation.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaStage": { - "description": "Each Stage of the deployment process", - "id": "GoogleCloudFunctionsV2alphaStage", - "properties": { - "message": { - "description": "Message describing the Stage", - "type": "string" - }, - "name": { - "description": "Name of the Stage. This will be unique for each Stage.", - "enum": [ - "NAME_UNSPECIFIED", - "ARTIFACT_REGISTRY", - "BUILD", - "SERVICE", - "TRIGGER", - "SERVICE_ROLLBACK", - "TRIGGER_ROLLBACK" - ], - "enumDescriptions": [ - "Not specified. Invalid name.", - "Artifact Regsitry Stage", - "Build Stage", - "Service Stage", - "Trigger Stage", - "Service Rollback Stage", - "Trigger Rollback Stage" - ], - "type": "string" - }, - "resource": { - "description": "Resource of the Stage", - "type": "string" - }, - "resourceUri": { - "description": "Link to the current Stage resource", - "type": "string" - }, - "state": { - "description": "Current state of the Stage", - "enum": [ - "STATE_UNSPECIFIED", - "NOT_STARTED", - "IN_PROGRESS", - "COMPLETE" - ], - "enumDescriptions": [ - "Not specified. Invalid state.", - "Stage has not started.", - "Stage is in progress.", - "Stage has completed." - ], - "type": "string" - }, - "stateMessages": { - "description": "State messages from the current Stage.", - "items": { - "$ref": "GoogleCloudFunctionsV2alphaStateMessage" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudFunctionsV2alphaStateMessage": { - "description": "Informational messages about the state of the Cloud Function or Operation.", - "id": "GoogleCloudFunctionsV2alphaStateMessage", - "properties": { - "message": { - "description": "The message.", - "type": "string" - }, - "severity": { - "description": "Severity of the state message.", - "enum": [ - "SEVERITY_UNSPECIFIED", - "ERROR", - "WARNING", - "INFO" - ], - "enumDescriptions": [ - "Not specified. Invalid severity.", - "ERROR-level severity.", - "WARNING-level severity.", - "INFO-level severity." - ], - "type": "string" - }, - "type": { - "description": "One-word CamelCase type of the state message.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudFunctionsV2betaLocationMetadata": { "description": "Extra GCF specific location information.", "id": "GoogleCloudFunctionsV2betaLocationMetadata", diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index e79718ff734..8eb549b08d0 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -852,342 +852,6 @@ func (s GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2LocationMetadata: Extra GCF specific location -// information. -type GoogleCloudFunctionsV2LocationMetadata struct { - // Environments: The Cloud Function environments this location supports. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Unspecified - // "GEN_1" - Gen 1 - // "GEN_2" - Gen 2 - Environments []string `json:"environments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2LocationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2LocationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2OperationMetadata: Represents the metadata of the -// long-running operation. -type GoogleCloudFunctionsV2OperationMetadata struct { - // ApiVersion: API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // BuildName: The build name of the function for create and update operations. - BuildName string `json:"buildName,omitempty"` - // CancelRequested: Identifies whether the user has requested cancellation of - // the operation. Operations that have successfully been cancelled have - // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // OperationType: The operation type. - // - // Possible values: - // "OPERATIONTYPE_UNSPECIFIED" - Unspecified - // "CREATE_FUNCTION" - CreateFunction - // "UPDATE_FUNCTION" - UpdateFunction - // "DELETE_FUNCTION" - DeleteFunction - // "REDIRECT_FUNCTION_UPGRADE_TRAFFIC" - RedirectFunctionUpgradeTraffic - // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC" - RollbackFunctionUpgradeTraffic - // "SETUP_FUNCTION_UPGRADE_CONFIG" - SetupFunctionUpgradeConfig - // "ABORT_FUNCTION_UPGRADE" - AbortFunctionUpgrade - // "COMMIT_FUNCTION_UPGRADE" - CommitFunctionUpgrade - OperationType string `json:"operationType,omitempty"` - // RequestResource: The original request that started the operation. - RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` - // SourceToken: An identifier for Firebase function sources. Disclaimer: This - // field is only supported for Firebase function deployments. - SourceToken string `json:"sourceToken,omitempty"` - // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2Stage `json:"stages,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Server-defined resource path for the target of the operation. - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2Stage: Each Stage of the deployment process -type GoogleCloudFunctionsV2Stage struct { - // Message: Message describing the Stage - Message string `json:"message,omitempty"` - // Name: Name of the Stage. This will be unique for each Stage. - // - // Possible values: - // "NAME_UNSPECIFIED" - Not specified. Invalid name. - // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage - // "BUILD" - Build Stage - // "SERVICE" - Service Stage - // "TRIGGER" - Trigger Stage - // "SERVICE_ROLLBACK" - Service Rollback Stage - // "TRIGGER_ROLLBACK" - Trigger Rollback Stage - Name string `json:"name,omitempty"` - // Resource: Resource of the Stage - Resource string `json:"resource,omitempty"` - // ResourceUri: Link to the current Stage resource - ResourceUri string `json:"resourceUri,omitempty"` - // State: Current state of the Stage - // - // Possible values: - // "STATE_UNSPECIFIED" - Not specified. Invalid state. - // "NOT_STARTED" - Stage has not started. - // "IN_PROGRESS" - Stage is in progress. - // "COMPLETE" - Stage has completed. - State string `json:"state,omitempty"` - // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2StateMessage `json:"stateMessages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2Stage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2Stage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2StateMessage: Informational messages about the state -// of the Cloud Function or Operation. -type GoogleCloudFunctionsV2StateMessage struct { - // Message: The message. - Message string `json:"message,omitempty"` - // Severity: Severity of the state message. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. - // "ERROR" - ERROR-level severity. - // "WARNING" - WARNING-level severity. - // "INFO" - INFO-level severity. - Severity string `json:"severity,omitempty"` - // Type: One-word CamelCase type of the state message. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2StateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2StateMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaLocationMetadata: Extra GCF specific location -// information. -type GoogleCloudFunctionsV2alphaLocationMetadata struct { - // Environments: The Cloud Function environments this location supports. - // - // Possible values: - // "ENVIRONMENT_UNSPECIFIED" - Unspecified - // "GEN_1" - Gen 1 - // "GEN_2" - Gen 2 - Environments []string `json:"environments,omitempty"` - // ForceSendFields is a list of field names (e.g. "Environments") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Environments") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaLocationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaLocationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata of the -// long-running operation. -type GoogleCloudFunctionsV2alphaOperationMetadata struct { - // ApiVersion: API version used to start the operation. - ApiVersion string `json:"apiVersion,omitempty"` - // BuildName: The build name of the function for create and update operations. - BuildName string `json:"buildName,omitempty"` - // CancelRequested: Identifies whether the user has requested cancellation of - // the operation. Operations that have successfully been cancelled have - // google.longrunning.Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. - CancelRequested bool `json:"cancelRequested,omitempty"` - // CreateTime: The time the operation was created. - CreateTime string `json:"createTime,omitempty"` - // EndTime: The time the operation finished running. - EndTime string `json:"endTime,omitempty"` - // OperationType: The operation type. - // - // Possible values: - // "OPERATIONTYPE_UNSPECIFIED" - Unspecified - // "CREATE_FUNCTION" - CreateFunction - // "UPDATE_FUNCTION" - UpdateFunction - // "DELETE_FUNCTION" - DeleteFunction - // "REDIRECT_FUNCTION_UPGRADE_TRAFFIC" - RedirectFunctionUpgradeTraffic - // "ROLLBACK_FUNCTION_UPGRADE_TRAFFIC" - RollbackFunctionUpgradeTraffic - // "SETUP_FUNCTION_UPGRADE_CONFIG" - SetupFunctionUpgradeConfig - // "ABORT_FUNCTION_UPGRADE" - AbortFunctionUpgrade - // "COMMIT_FUNCTION_UPGRADE" - CommitFunctionUpgrade - OperationType string `json:"operationType,omitempty"` - // RequestResource: The original request that started the operation. - RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` - // SourceToken: An identifier for Firebase function sources. Disclaimer: This - // field is only supported for Firebase function deployments. - SourceToken string `json:"sourceToken,omitempty"` - // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2alphaStage `json:"stages,omitempty"` - // StatusDetail: Human-readable status of the operation, if any. - StatusDetail string `json:"statusDetail,omitempty"` - // Target: Server-defined resource path for the target of the operation. - Target string `json:"target,omitempty"` - // Verb: 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaOperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaStage: Each Stage of the deployment process -type GoogleCloudFunctionsV2alphaStage struct { - // Message: Message describing the Stage - Message string `json:"message,omitempty"` - // Name: Name of the Stage. This will be unique for each Stage. - // - // Possible values: - // "NAME_UNSPECIFIED" - Not specified. Invalid name. - // "ARTIFACT_REGISTRY" - Artifact Regsitry Stage - // "BUILD" - Build Stage - // "SERVICE" - Service Stage - // "TRIGGER" - Trigger Stage - // "SERVICE_ROLLBACK" - Service Rollback Stage - // "TRIGGER_ROLLBACK" - Trigger Rollback Stage - Name string `json:"name,omitempty"` - // Resource: Resource of the Stage - Resource string `json:"resource,omitempty"` - // ResourceUri: Link to the current Stage resource - ResourceUri string `json:"resourceUri,omitempty"` - // State: Current state of the Stage - // - // Possible values: - // "STATE_UNSPECIFIED" - Not specified. Invalid state. - // "NOT_STARTED" - Stage has not started. - // "IN_PROGRESS" - Stage is in progress. - // "COMPLETE" - Stage has completed. - State string `json:"state,omitempty"` - // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2alphaStateMessage `json:"stateMessages,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaStage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaStage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudFunctionsV2alphaStateMessage: Informational messages about the -// state of the Cloud Function or Operation. -type GoogleCloudFunctionsV2alphaStateMessage struct { - // Message: The message. - Message string `json:"message,omitempty"` - // Severity: Severity of the state message. - // - // Possible values: - // "SEVERITY_UNSPECIFIED" - Not specified. Invalid severity. - // "ERROR" - ERROR-level severity. - // "WARNING" - WARNING-level severity. - // "INFO" - INFO-level severity. - Severity string `json:"severity,omitempty"` - // Type: One-word CamelCase type of the state message. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Message") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Message") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudFunctionsV2alphaStateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaStateMessage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudFunctionsV2betaLocationMetadata: Extra GCF specific location // information. type GoogleCloudFunctionsV2betaLocationMetadata struct { diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 76dd9a4cb4a..5713e50d5d4 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -2062,7 +2062,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of all usable backend services in the specified project.", + "description": "Retrieves a list of all usable backend services in the specified project.", "flatPath": "projects/{project}/global/backendServices/listUsable", "httpMethod": "GET", "id": "compute.backendServices.listUsable", @@ -14231,6 +14231,55 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/getIamPolicy", + "httpMethod": "GET", + "id": "compute.instantSnapshotGroups.getIamPolicy", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "inserts a Zonal InstantSnapshotGroup resource", "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups", @@ -14340,6 +14389,97 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/setIamPolicy", + "httpMethod": "POST", + "id": "compute.instantSnapshotGroups.setIamPolicy", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/setIamPolicy", + "request": { + "$ref": "ZoneSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.instantSnapshotGroups.testIamPermissions", + "parameterOrder": [ + "project", + "zone", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -23957,7 +24097,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of all usable backend services in the specified project in the given region.", + "description": "Retrieves a list of all usable backend services in the specified project in the given region.", "flatPath": "projects/{project}/regions/{region}/backendServices/listUsable", "httpMethod": "GET", "id": "compute.regionBackendServices.listUsable", @@ -28737,6 +28877,55 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/getIamPolicy", + "httpMethod": "GET", + "id": "compute.regionInstantSnapshotGroups.getIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "optionsRequestedPolicyVersion": { + "description": "Requested IAM Policy version.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "insert": { "description": "creates a Regional InstantSnapshotGroup resource", "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups", @@ -28846,6 +29035,97 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/setIamPolicy", + "httpMethod": "POST", + "id": "compute.regionInstantSnapshotGroups.setIamPolicy", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/setIamPolicy", + "request": { + "$ref": "RegionSetPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/testIamPermissions", + "httpMethod": "POST", + "id": "compute.regionInstantSnapshotGroups.testIamPermissions", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshotGroups/{resource}/testIamPermissions", + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, @@ -45278,7 +45558,7 @@ } } }, - "revision": "20240827", + "revision": "20240903", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -60627,6 +60907,10 @@ ], "type": "string" }, + "multiMig": { + "description": "URL to the multi-MIG that this Managed Instance Group belongs to.", + "type": "string" + }, "name": { "annotations": { "required": [ @@ -69632,6 +69916,9 @@ ], "type": "string" }, + "currentActionDetails": { + "$ref": "ManagedInstanceCurrentActionDetails" + }, "id": { "description": "[Output only] The unique identifier for this resource. This field is empty when instance does not exist.", "format": "uint64", @@ -69751,6 +70038,45 @@ }, "type": "object" }, + "ManagedInstanceCurrentActionDetails": { + "id": "ManagedInstanceCurrentActionDetails", + "properties": { + "methodName": { + "type": "string" + }, + "trigger": { + "description": "[Output Only] Details of the current action that the managed instance group has scheduled for the instance. Contains trigger for the current action, and methodName in case it was triggered by API call. Possible values for trigger: - API Any API call. - PROACTIVE_UPDATE Proactive updater scheduled an update on this managed instance. - AUTOSCALING Instance being deleted/created after a decision from the Autoscaler. - REDISTRIBUTION The regional managed instance group is moving instances between zones to restore balance. - STANDBY_REFILL The managed instance group is refilling the Standby Pool (stopped/suspended virtual machines) after scale up. - MAINTENANCE Manual maintenance. - FAILED_CREATION The managed instance group is handling failed instance creation. - INSTANCE_FAILURE The managed instance group is handling instance failure, according to the Instance Lifecycle Policy. - FAILED_HEALTH_CHECK The managed instance group is handling failed health check, according to the Instance Lifecycle Policy. - TERMINATION_TIMESTAMP Instance reached termination time, thus managed instance group stops/deletes it. ", + "enum": [ + "API", + "AUTOSCALING", + "FAILED_CREATION", + "FAILED_HEALTH_CHECK", + "INSTANCE_FAILURE", + "MAINTENANCE", + "NONE", + "PROACTIVE_UPDATE", + "REDISTRIBUTION", + "STANDBY_REFILL", + "TERMINATION_TIMESTAMP" + ], + "enumDescriptions": [ + "Any API call.", + "Instance being deleted/created after a decision from the Autoscaler.", + "The managed instance group is handling failed instance creation.", + "The managed instance group is handling failed health check, according to the Instance Lifecycle Policy.", + "The managed instance group is handling instance failure, according to the Instance Lifecycle Policy.", + "Manual maintenance.", + "Default value, not visible externally.", + "Proactive updater scheduled an update on this managed instance.", + "The regional managed instance group is moving instances between zones to restore balance.", + "The managed instance group is refilling the Standby Pool (stopped/suspended virtual machines) after scale up.", + "Instance reached termination time, thus managed instance group stops/deletes it." + ], + "type": "string" + } + }, + "type": "object" + }, "ManagedInstanceInstanceFlexibilityOverride": { "id": "ManagedInstanceInstanceFlexibilityOverride", "properties": { @@ -84640,6 +84966,10 @@ "RoutePolicy": { "id": "RoutePolicy", "properties": { + "description": { + "description": "An optional description of route policy.", + "type": "string" + }, "fingerprint": { "description": "A fingerprint for the Route Policy being applied to this Router, which is essentially a hash of the Route Policy used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update Route Policy. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make a getRoutePolicy() request to retrieve a Route Policy.", "format": "byte", @@ -93787,7 +94117,7 @@ "type": "string" }, "internalIpv6Prefix": { - "description": "[Output Only] The internal IPv6 address range that is assigned to this subnetwork.", + "description": "The internal IPv6 address range that is owned by this subnetwork.", "type": "string" }, "ipCidrRange": { diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index e1187135b77..a2970bd9291 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -19368,6 +19368,8 @@ type InstanceGroupManager struct { // "PAGINATED" - Pagination is enabled for the group's listManagedInstances // API method. maxResults and pageToken query parameters are respected. ListManagedInstancesResults string `json:"listManagedInstancesResults,omitempty"` + // MultiMig: URL to the multi-MIG that this Managed Instance Group belongs to. + MultiMig string `json:"multiMig,omitempty"` // Name: The name of the managed instance group. The name must be 1-63 // characters long, and comply with RFC1035. Name string `json:"name,omitempty"` @@ -29611,7 +29613,8 @@ type ManagedInstance struct { // Applies only if autohealing policy has a health check specified 2. Waiting // for addition verification steps performed as post-instance creation (subject // to future extensions). - CurrentAction string `json:"currentAction,omitempty"` + CurrentAction string `json:"currentAction,omitempty"` + CurrentActionDetails *ManagedInstanceCurrentActionDetails `json:"currentActionDetails,omitempty"` // Id: [Output only] The unique identifier for this resource. This field is // empty when instance does not exist. Id uint64 `json:"id,omitempty,string"` @@ -29735,6 +29738,64 @@ func (s ManagedInstanceAllInstancesConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type ManagedInstanceCurrentActionDetails struct { + MethodName string `json:"methodName,omitempty"` + // Trigger: [Output Only] Details of the current action that the managed + // instance group has scheduled for the instance. Contains trigger for the + // current action, and methodName in case it was triggered by API call. + // Possible values for trigger: - API Any API call. - PROACTIVE_UPDATE + // Proactive updater scheduled an update on this managed instance. - + // AUTOSCALING Instance being deleted/created after a decision from the + // Autoscaler. - REDISTRIBUTION The regional managed instance group is moving + // instances between zones to restore balance. - STANDBY_REFILL The managed + // instance group is refilling the Standby Pool (stopped/suspended virtual + // machines) after scale up. - MAINTENANCE Manual maintenance. - + // FAILED_CREATION The managed instance group is handling failed instance + // creation. - INSTANCE_FAILURE The managed instance group is handling instance + // failure, according to the Instance Lifecycle Policy. - FAILED_HEALTH_CHECK + // The managed instance group is handling failed health check, according to the + // Instance Lifecycle Policy. - TERMINATION_TIMESTAMP Instance reached + // termination time, thus managed instance group stops/deletes it. + // + // Possible values: + // "API" - Any API call. + // "AUTOSCALING" - Instance being deleted/created after a decision from the + // Autoscaler. + // "FAILED_CREATION" - The managed instance group is handling failed instance + // creation. + // "FAILED_HEALTH_CHECK" - The managed instance group is handling failed + // health check, according to the Instance Lifecycle Policy. + // "INSTANCE_FAILURE" - The managed instance group is handling instance + // failure, according to the Instance Lifecycle Policy. + // "MAINTENANCE" - Manual maintenance. + // "NONE" - Default value, not visible externally. + // "PROACTIVE_UPDATE" - Proactive updater scheduled an update on this managed + // instance. + // "REDISTRIBUTION" - The regional managed instance group is moving instances + // between zones to restore balance. + // "STANDBY_REFILL" - The managed instance group is refilling the Standby + // Pool (stopped/suspended virtual machines) after scale up. + // "TERMINATION_TIMESTAMP" - Instance reached termination time, thus managed + // instance group stops/deletes it. + Trigger string `json:"trigger,omitempty"` + // ForceSendFields is a list of field names (e.g. "MethodName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MethodName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ManagedInstanceCurrentActionDetails) MarshalJSON() ([]byte, error) { + type NoMethod ManagedInstanceCurrentActionDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ManagedInstanceInstanceFlexibilityOverride struct { // MachineType: The machine type to be used for this instance. MachineType string `json:"machineType,omitempty"` @@ -45749,6 +45810,8 @@ func (s RouteListWarningData) MarshalJSON() ([]byte, error) { } type RoutePolicy struct { + // Description: An optional description of route policy. + Description string `json:"description,omitempty"` // Fingerprint: A fingerprint for the Route Policy being applied to this // Router, which is essentially a hash of the Route Policy used for optimistic // locking. The fingerprint is initially generated by Compute Engine and @@ -45768,13 +45831,13 @@ type RoutePolicy struct { // "ROUTE_POLICY_TYPE_EXPORT" - The Route Policy is an Export Policy. // "ROUTE_POLICY_TYPE_IMPORT" - The Route Policy is an Import Policy. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Fingerprint") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Fingerprint") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -55497,8 +55560,8 @@ type Subnetwork struct { // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. Id uint64 `json:"id,omitempty,string"` - // InternalIpv6Prefix: [Output Only] The internal IPv6 address range that is - // assigned to this subnetwork. + // InternalIpv6Prefix: The internal IPv6 address range that is owned by this + // subnetwork. InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` // IpCidrRange: The range of internal addresses that are owned by this // subnetwork. Provide this property when you create the subnetwork. For diff --git a/compute/v0.alpha/compute2-gen.go b/compute/v0.alpha/compute2-gen.go index 49619b2c933..782d35de5fb 100644 --- a/compute/v0.alpha/compute2-gen.go +++ b/compute/v0.alpha/compute2-gen.go @@ -5843,8 +5843,8 @@ type BackendServicesListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves an aggregated list of all usable backend services in -// the specified project. +// ListUsable: Retrieves a list of all usable backend services in the specified +// project. // // - project: Project ID for this request. func (r *BackendServicesService) ListUsable(project string) *BackendServicesListUsableCall { @@ -40893,6 +40893,129 @@ func (c *InstantSnapshotGroupsGetCall) Do(opts ...googleapi.CallOption) (*Instan return ret, nil } +type InstantSnapshotGroupsGetIamPolicyCall struct { + s *Service + project string + zone string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstantSnapshotGroupsService) GetIamPolicy(project string, zone string, resource string) *InstantSnapshotGroupsGetIamPolicyCall { + c := &InstantSnapshotGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstantSnapshotGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstantSnapshotGroupsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 +// details. +func (c *InstantSnapshotGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *InstantSnapshotGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *InstantSnapshotGroupsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstantSnapshotGroupsGetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotGroupsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstantSnapshotGroupsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstantSnapshotGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "projects/{project}/zones/{zone}/instantSnapshotGroups/{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{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instantSnapshotGroups.getIamPolicy" call. +// 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 *InstantSnapshotGroupsGetIamPolicyCall) 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 +} + type InstantSnapshotGroupsInsertCall struct { s *Service project string @@ -41232,6 +41355,227 @@ func (c *InstantSnapshotGroupsListCall) Pages(ctx context.Context, f func(*ListI } } +type InstantSnapshotGroupsSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstantSnapshotGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstantSnapshotGroupsSetIamPolicyCall { + c := &InstantSnapshotGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.zonesetpolicyrequest = zonesetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InstantSnapshotGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstantSnapshotGroupsSetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotGroupsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstantSnapshotGroupsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstantSnapshotGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups/{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{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instantSnapshotGroups.setIamPolicy" call. +// 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 *InstantSnapshotGroupsSetIamPolicyCall) 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 +} + +type InstantSnapshotGroupsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstantSnapshotGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstantSnapshotGroupsTestIamPermissionsCall { + c := &InstantSnapshotGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InstantSnapshotGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstantSnapshotGroupsTestIamPermissionsCall) Context(ctx context.Context) *InstantSnapshotGroupsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstantSnapshotGroupsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstantSnapshotGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups/{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{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instantSnapshotGroups.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *InstantSnapshotGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + 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 +} + type InstantSnapshotsAggregatedListCall struct { s *Service project string @@ -69801,8 +70145,8 @@ type RegionBackendServicesListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves an aggregated list of all usable backend services in -// the specified project in the given region. +// ListUsable: Retrieves a list of all usable backend services in the specified +// project in the given region. // // - project: Project ID for this request. // - region: Name of the region scoping this request. It must be a string that diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index 7ccdcc7c337..b9cc385912b 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -12259,6 +12259,129 @@ func (c *RegionInstantSnapshotGroupsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } +type RegionInstantSnapshotGroupsGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionInstantSnapshotGroupsService) GetIamPolicy(project string, region string, resource string) *RegionInstantSnapshotGroupsGetIamPolicyCall { + c := &RegionInstantSnapshotGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionInstantSnapshotGroupsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 +// details. +func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotGroupsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "projects/{project}/regions/{region}/instantSnapshotGroups/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshotGroups.getIamPolicy" call. +// 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 *RegionInstantSnapshotGroupsGetIamPolicyCall) 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 +} + type RegionInstantSnapshotGroupsInsertCall struct { s *Service project string @@ -12598,6 +12721,227 @@ func (c *RegionInstantSnapshotGroupsListCall) Pages(ctx context.Context, f func( } } +type RegionInstantSnapshotGroupsSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionInstantSnapshotGroupsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionInstantSnapshotGroupsSetIamPolicyCall { + c := &RegionInstantSnapshotGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstantSnapshotGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstantSnapshotGroupsSetIamPolicyCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstantSnapshotGroupsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshotGroups/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshotGroups.setIamPolicy" call. +// 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 *RegionInstantSnapshotGroupsSetIamPolicyCall) 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 +} + +type RegionInstantSnapshotGroupsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionInstantSnapshotGroupsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionInstantSnapshotGroupsTestIamPermissionsCall { + c := &RegionInstantSnapshotGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstantSnapshotGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstantSnapshotGroupsTestIamPermissionsCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstantSnapshotGroupsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instantSnapshotGroups/{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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshotGroups.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.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 *RegionInstantSnapshotGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + 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 +} + type RegionInstantSnapshotsDeleteCall struct { s *Service project string diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 3e7b21b4ec5..491252bb42b 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -2007,7 +2007,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of all usable backend services in the specified project.", + "description": "Retrieves a list of all usable backend services in the specified project.", "flatPath": "projects/{project}/global/backendServices/listUsable", "httpMethod": "GET", "id": "compute.backendServices.listUsable", @@ -22797,7 +22797,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of all usable backend services in the specified project in the given region.", + "description": "Retrieves a list of all usable backend services in the specified project in the given region.", "flatPath": "projects/{project}/regions/{region}/backendServices/listUsable", "httpMethod": "GET", "id": "compute.regionBackendServices.listUsable", @@ -41911,7 +41911,7 @@ } } }, - "revision": "20240827", + "revision": "20240903", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -44714,6 +44714,13 @@ "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" + }, + "usedBy": { + "description": "[Output Only] List of resources referencing that backend bucket.", + "items": { + "$ref": "BackendBucketUsedBy" + }, + "type": "array" } }, "type": "object" @@ -45000,6 +45007,16 @@ }, "type": "object" }, + "BackendBucketUsedBy": { + "id": "BackendBucketUsedBy", + "properties": { + "reference": { + "description": "[Output Only] Server-defined URL for UrlMaps referencing that BackendBucket.", + "type": "string" + } + }, + "type": "object" + }, "BackendService": { "description": "Represents a Backend Service resource. A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly. Backend services in Google Compute Engine can be either regionally or globally scoped. * [Global](https://cloud.google.com/compute/docs/reference/rest/beta/backendServices) * [Regional](https://cloud.google.com/compute/docs/reference/rest/beta/regionBackendServices) For more information, see Backend Services.", "id": "BackendService", @@ -55913,6 +55930,10 @@ ], "type": "string" }, + "multiMig": { + "description": "URL to the multi-MIG that this Managed Instance Group belongs to.", + "type": "string" + }, "name": { "annotations": { "required": [ @@ -65723,6 +65744,11 @@ "description": "[Output Only] Address allocated from given subnetwork for PSC. This IP address acts as a VIP for a PSC NEG, allowing it to act as an endpoint in L7 PSC-XLB.", "type": "string" }, + "producerPort": { + "description": "The psc producer port is used to connect PSC NEG with specific port on the PSC Producer side; should only be used for the PRIVATE_SERVICE_CONNECT NEG type", + "format": "int32", + "type": "integer" + }, "pscConnectionId": { "description": "[Output Only] The PSC connection id of the PSC Network Endpoint Group Consumer.", "format": "uint64", @@ -84304,7 +84330,7 @@ "type": "string" }, "internalIpv6Prefix": { - "description": "[Output Only] The internal IPv6 address range that is assigned to this subnetwork.", + "description": "The internal IPv6 address range that is owned by this subnetwork.", "type": "string" }, "ipCidrRange": { diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index 58e07df7614..b9ffa516de7 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -4619,6 +4619,8 @@ type BackendBucket struct { Name string `json:"name,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // UsedBy: [Output Only] List of resources referencing that backend bucket. + UsedBy []*BackendBucketUsedBy `json:"usedBy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -5008,6 +5010,28 @@ func (s BackendBucketListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BackendBucketUsedBy struct { + // Reference: [Output Only] Server-defined URL for UrlMaps referencing that + // BackendBucket. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Reference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Reference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendBucketUsedBy) MarshalJSON() ([]byte, error) { + type NoMethod BackendBucketUsedBy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BackendService: Represents a Backend Service resource. A backend service // defines how Google Cloud load balancers distribute traffic. The backend // service configuration contains a set of values, such as the protocol used to @@ -17644,6 +17668,8 @@ type InstanceGroupManager struct { // "PAGINATED" - Pagination is enabled for the group's listManagedInstances // API method. maxResults and pageToken query parameters are respected. ListManagedInstancesResults string `json:"listManagedInstancesResults,omitempty"` + // MultiMig: URL to the multi-MIG that this Managed Instance Group belongs to. + MultiMig string `json:"multiMig,omitempty"` // Name: The name of the managed instance group. The name must be 1-63 // characters long, and comply with RFC1035. Name string `json:"name,omitempty"` @@ -28834,6 +28860,10 @@ type NetworkEndpointGroupPscData struct { // for PSC. This IP address acts as a VIP for a PSC NEG, allowing it to act as // an endpoint in L7 PSC-XLB. ConsumerPscAddress string `json:"consumerPscAddress,omitempty"` + // ProducerPort: The psc producer port is used to connect PSC NEG with specific + // port on the PSC Producer side; should only be used for the + // PRIVATE_SERVICE_CONNECT NEG type + ProducerPort int64 `json:"producerPort,omitempty"` // PscConnectionId: [Output Only] The PSC connection id of the PSC Network // Endpoint Group Consumer. PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` @@ -48878,8 +48908,8 @@ type Subnetwork struct { // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. Id uint64 `json:"id,omitempty,string"` - // InternalIpv6Prefix: [Output Only] The internal IPv6 address range that is - // assigned to this subnetwork. + // InternalIpv6Prefix: The internal IPv6 address range that is owned by this + // subnetwork. InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` // IpCidrRange: The range of internal addresses that are owned by this // subnetwork. Provide this property when you create the subnetwork. For diff --git a/compute/v0.beta/compute2-gen.go b/compute/v0.beta/compute2-gen.go index db74c4a686b..bb9ee65edef 100644 --- a/compute/v0.beta/compute2-gen.go +++ b/compute/v0.beta/compute2-gen.go @@ -5635,8 +5635,8 @@ type BackendServicesListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves an aggregated list of all usable backend services in -// the specified project. +// ListUsable: Retrieves a list of all usable backend services in the specified +// project. // // - project: Project ID for this request. func (r *BackendServicesService) ListUsable(project string) *BackendServicesListUsableCall { diff --git a/compute/v0.beta/compute3-gen.go b/compute/v0.beta/compute3-gen.go index 9bf8314d681..8ef614c2273 100644 --- a/compute/v0.beta/compute3-gen.go +++ b/compute/v0.beta/compute3-gen.go @@ -1761,8 +1761,8 @@ type RegionBackendServicesListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves an aggregated list of all usable backend services in -// the specified project in the given region. +// ListUsable: Retrieves a list of all usable backend services in the specified +// project in the given region. // // - project: Project ID for this request. // - region: Name of the region scoping this request. It must be a string that diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 70bd1cc810f..fcf10a73c27 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -1915,7 +1915,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of all usable backend services in the specified project.", + "description": "Retrieves a list of all usable backend services in the specified project.", "flatPath": "projects/{project}/global/backendServices/listUsable", "httpMethod": "GET", "id": "compute.backendServices.listUsable", @@ -20638,7 +20638,7 @@ ] }, "listUsable": { - "description": "Retrieves an aggregated list of all usable backend services in the specified project in the given region.", + "description": "Retrieves a list of all usable backend services in the specified project in the given region.", "flatPath": "projects/{project}/regions/{region}/backendServices/listUsable", "httpMethod": "GET", "id": "compute.regionBackendServices.listUsable", @@ -37779,7 +37779,7 @@ } } }, - "revision": "20240827", + "revision": "20240903", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -40488,6 +40488,13 @@ "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", "type": "string" + }, + "usedBy": { + "description": "[Output Only] List of resources referencing that backend bucket.", + "items": { + "$ref": "BackendBucketUsedBy" + }, + "type": "array" } }, "type": "object" @@ -40774,6 +40781,16 @@ }, "type": "object" }, + "BackendBucketUsedBy": { + "id": "BackendBucketUsedBy", + "properties": { + "reference": { + "description": "[Output Only] Server-defined URL for UrlMaps referencing that BackendBucket.", + "type": "string" + } + }, + "type": "object" + }, "BackendService": { "description": "Represents a Backend Service resource. A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly. Backend services in Google Compute Engine can be either regionally or globally scoped. * [Global](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) * [Regional](https://cloud.google.com/compute/docs/reference/rest/v1/regionBackendServices) For more information, see Backend Services.", "id": "BackendService", @@ -60665,6 +60682,11 @@ "description": "[Output Only] Address allocated from given subnetwork for PSC. This IP address acts as a VIP for a PSC NEG, allowing it to act as an endpoint in L7 PSC-XLB.", "type": "string" }, + "producerPort": { + "description": "The psc producer port is used to connect PSC NEG with specific port on the PSC Producer side; should only be used for the PRIVATE_SERVICE_CONNECT NEG type", + "format": "int32", + "type": "integer" + }, "pscConnectionId": { "description": "[Output Only] The PSC connection id of the PSC Network Endpoint Group Consumer.", "format": "uint64", @@ -78077,7 +78099,7 @@ "type": "string" }, "internalIpv6Prefix": { - "description": "[Output Only] The internal IPv6 address range that is assigned to this subnetwork.", + "description": "The internal IPv6 address range that is owned by this subnetwork.", "type": "string" }, "ipCidrRange": { diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index ca8f1ffd01f..1a0dde8f2d2 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -4492,6 +4492,8 @@ type BackendBucket struct { Name string `json:"name,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // UsedBy: [Output Only] List of resources referencing that backend bucket. + UsedBy []*BackendBucketUsedBy `json:"usedBy,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -4881,6 +4883,28 @@ func (s BackendBucketListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BackendBucketUsedBy struct { + // Reference: [Output Only] Server-defined URL for UrlMaps referencing that + // BackendBucket. + Reference string `json:"reference,omitempty"` + // ForceSendFields is a list of field names (e.g. "Reference") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Reference") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendBucketUsedBy) MarshalJSON() ([]byte, error) { + type NoMethod BackendBucketUsedBy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BackendService: Represents a Backend Service resource. A backend service // defines how Google Cloud load balancers distribute traffic. The backend // service configuration contains a set of values, such as the protocol used to @@ -27686,6 +27710,10 @@ type NetworkEndpointGroupPscData struct { // for PSC. This IP address acts as a VIP for a PSC NEG, allowing it to act as // an endpoint in L7 PSC-XLB. ConsumerPscAddress string `json:"consumerPscAddress,omitempty"` + // ProducerPort: The psc producer port is used to connect PSC NEG with specific + // port on the PSC Producer side; should only be used for the + // PRIVATE_SERVICE_CONNECT NEG type + ProducerPort int64 `json:"producerPort,omitempty"` // PscConnectionId: [Output Only] The PSC connection id of the PSC Network // Endpoint Group Consumer. PscConnectionId uint64 `json:"pscConnectionId,omitempty,string"` @@ -46388,8 +46416,8 @@ type Subnetwork struct { // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. Id uint64 `json:"id,omitempty,string"` - // InternalIpv6Prefix: [Output Only] The internal IPv6 address range that is - // assigned to this subnetwork. + // InternalIpv6Prefix: The internal IPv6 address range that is owned by this + // subnetwork. InternalIpv6Prefix string `json:"internalIpv6Prefix,omitempty"` // IpCidrRange: The range of internal addresses that are owned by this // subnetwork. Provide this property when you create the subnetwork. For diff --git a/compute/v1/compute2-gen.go b/compute/v1/compute2-gen.go index 8b9c7f13e74..74f8dee4bf6 100644 --- a/compute/v1/compute2-gen.go +++ b/compute/v1/compute2-gen.go @@ -5413,8 +5413,8 @@ type BackendServicesListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves an aggregated list of all usable backend services in -// the specified project. +// ListUsable: Retrieves a list of all usable backend services in the specified +// project. // // - project: Project ID for this request. func (r *BackendServicesService) ListUsable(project string) *BackendServicesListUsableCall { diff --git a/compute/v1/compute3-gen.go b/compute/v1/compute3-gen.go index 71248bab0cc..dc8c4d4ffcf 100644 --- a/compute/v1/compute3-gen.go +++ b/compute/v1/compute3-gen.go @@ -1650,8 +1650,8 @@ type RegionBackendServicesListUsableCall struct { header_ http.Header } -// ListUsable: Retrieves an aggregated list of all usable backend services in -// the specified project in the given region. +// ListUsable: Retrieves a list of all usable backend services in the specified +// project in the given region. // // - project: Project ID for this request. // - region: Name of the region scoping this request. It must be a string that diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index 5eb074f8b68..a2e8fab6e07 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -1531,7 +1531,7 @@ } } }, - "revision": "20240805", + "revision": "20240910", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -2173,6 +2173,10 @@ ], "type": "string" }, + "metadataJson": { + "description": "Input only. JSON Metadata encoded as a string. This field is primarily used by Insights integrations with various telphony systems and must be in one of Insights' supported formats.", + "type": "string" + }, "name": { "description": "Immutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation}", "type": "string" @@ -4774,6 +4778,10 @@ ], "type": "string" }, + "metadataJson": { + "description": "Input only. JSON Metadata encoded as a string. This field is primarily used by Insights integrations with various telphony systems and must be in one of Insights' supported formats.", + "type": "string" + }, "name": { "description": "Immutable. The resource name of the conversation. Format: projects/{project}/locations/{location}/conversations/{conversation}", "type": "string" diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index 17ab18a9fc5..1d3ae819961 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -973,6 +973,10 @@ type GoogleCloudContactcenterinsightsV1Conversation struct { // phone. // "CHAT" - The format for conversations that took place over chat. Medium string `json:"medium,omitempty"` + // MetadataJson: Input only. JSON Metadata encoded as a string. This field is + // primarily used by Insights integrations with various telphony systems and + // must be in one of Insights' supported formats. + MetadataJson string `json:"metadataJson,omitempty"` // Name: Immutable. The resource name of the conversation. Format: // projects/{project}/locations/{location}/conversations/{conversation} Name string `json:"name,omitempty"` @@ -4368,6 +4372,10 @@ type GoogleCloudContactcenterinsightsV1alpha1Conversation struct { // phone. // "CHAT" - The format for conversations that took place over chat. Medium string `json:"medium,omitempty"` + // MetadataJson: Input only. JSON Metadata encoded as a string. This field is + // primarily used by Insights integrations with various telphony systems and + // must be in one of Insights' supported formats. + MetadataJson string `json:"metadataJson,omitempty"` // Name: Immutable. The resource name of the conversation. Format: // projects/{project}/locations/{location}/conversations/{conversation} Name string `json:"name,omitempty"` diff --git a/container/v1/container-api.json b/container/v1/container-api.json index 13d79a4304e..289bb106e45 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -14,7 +14,7 @@ "canonicalName": "Container", "description": "Builds and manages container-based applications, powered by the open source Kubernetes technology.", "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/container-engine/", + "documentationLink": "https://cloud.google.com/kubernetes-engine/docs/", "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240806", + "revision": "20240814", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3147,6 +3147,10 @@ "description": "The IP address range of the container pods in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen or specify a `/14` block in `10.0.0.0/8`.", "type": "string" }, + "compliancePostureConfig": { + "$ref": "CompliancePostureConfig", + "description": "Enable/Disable Compliance Posture features for the cluster." + }, "conditions": { "description": "Which conditions caused the current cluster state.", "items": { @@ -3565,6 +3569,10 @@ "$ref": "ClusterAutoscaling", "description": "Cluster-level autoscaling configuration." }, + "desiredCompliancePostureConfig": { + "$ref": "CompliancePostureConfig", + "description": "Enable/Disable Compliance Posture features for the cluster." + }, "desiredContainerdConfig": { "$ref": "ContainerdConfig", "description": "The desired containerd config for the cluster." @@ -3857,6 +3865,45 @@ "properties": {}, "type": "object" }, + "CompliancePostureConfig": { + "description": "CompliancePostureConfig defines the settings needed to enable/disable features for the Compliance Posture.", + "id": "CompliancePostureConfig", + "properties": { + "complianceStandards": { + "description": "List of enabled compliance standards.", + "items": { + "$ref": "ComplianceStandard" + }, + "type": "array" + }, + "mode": { + "description": "Defines the enablement mode for Compliance Posture.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value not specified.", + "Disables Compliance Posture features on the cluster.", + "Enables Compliance Posture features on the cluster." + ], + "type": "string" + } + }, + "type": "object" + }, + "ComplianceStandard": { + "description": "Defines the details of a compliance standard.", + "id": "ComplianceStandard", + "properties": { + "standard": { + "description": "Name of the compliance standard.", + "type": "string" + } + }, + "type": "object" + }, "ConfidentialNodes": { "description": "ConfidentialNodes is configuration for the confidential nodes feature, which makes nodes run on confidential VMs.", "id": "ConfidentialNodes", diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index 34e54bc4346..3a6035210a3 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -6,7 +6,7 @@ // Package container provides access to the Kubernetes Engine API. // -// For product documentation, see: https://cloud.google.com/container-engine/ +// For product documentation, see: https://cloud.google.com/kubernetes-engine/docs/ // // # Library status // @@ -1072,6 +1072,9 @@ type Cluster struct { // notation (e.g. `10.96.0.0/14`). Leave blank to have one automatically chosen // or specify a `/14` block in `10.0.0.0/8`. ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` + // CompliancePostureConfig: Enable/Disable Compliance Posture features for the + // cluster. + CompliancePostureConfig *CompliancePostureConfig `json:"compliancePostureConfig,omitempty"` // Conditions: Which conditions caused the current cluster state. Conditions []*StatusCondition `json:"conditions,omitempty"` // ConfidentialNodes: Configuration of Confidential Nodes. All the nodes in the @@ -1446,6 +1449,9 @@ type ClusterUpdate struct { DesiredBinaryAuthorization *BinaryAuthorization `json:"desiredBinaryAuthorization,omitempty"` // DesiredClusterAutoscaling: Cluster-level autoscaling configuration. DesiredClusterAutoscaling *ClusterAutoscaling `json:"desiredClusterAutoscaling,omitempty"` + // DesiredCompliancePostureConfig: Enable/Disable Compliance Posture features + // for the cluster. + DesiredCompliancePostureConfig *CompliancePostureConfig `json:"desiredCompliancePostureConfig,omitempty"` // DesiredContainerdConfig: The desired containerd config for the cluster. DesiredContainerdConfig *ContainerdConfig `json:"desiredContainerdConfig,omitempty"` // DesiredCostManagementConfig: The desired configuration for the fine-grained @@ -1713,6 +1719,58 @@ func (s CompleteIPRotationRequest) MarshalJSON() ([]byte, error) { type CompleteNodePoolUpgradeRequest struct { } +// CompliancePostureConfig: CompliancePostureConfig defines the settings needed +// to enable/disable features for the Compliance Posture. +type CompliancePostureConfig struct { + // ComplianceStandards: List of enabled compliance standards. + ComplianceStandards []*ComplianceStandard `json:"complianceStandards,omitempty"` + // Mode: Defines the enablement mode for Compliance Posture. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value not specified. + // "DISABLED" - Disables Compliance Posture features on the cluster. + // "ENABLED" - Enables Compliance Posture features on the cluster. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "ComplianceStandards") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ComplianceStandards") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CompliancePostureConfig) MarshalJSON() ([]byte, error) { + type NoMethod CompliancePostureConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ComplianceStandard: Defines the details of a compliance standard. +type ComplianceStandard struct { + // Standard: Name of the compliance standard. + Standard string `json:"standard,omitempty"` + // ForceSendFields is a list of field names (e.g. "Standard") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Standard") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ComplianceStandard) MarshalJSON() ([]byte, error) { + type NoMethod ComplianceStandard + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConfidentialNodes: ConfidentialNodes is configuration for the confidential // nodes feature, which makes nodes run on confidential VMs. type ConfidentialNodes struct { diff --git a/css/v1/css-api.json b/css/v1/css-api.json index 20fdf7e4d98..73db2c3792e 100644 --- a/css/v1/css-api.json +++ b/css/v1/css-api.json @@ -472,7 +472,7 @@ } } }, - "revision": "20240719", + "revision": "20240909", "rootUrl": "https://css.googleapis.com/", "schemas": { "Account": { @@ -691,6 +691,10 @@ "description": "Condition of the headline offer.", "type": "string" }, + "headlineOfferInstallment": { + "$ref": "HeadlineOfferInstallment", + "description": "Number and amount of installments to pay for an item." + }, "headlineOfferLink": { "description": "Link to the headline offer.", "type": "string" @@ -707,6 +711,10 @@ "$ref": "Price", "description": "Headline Price of the aggregate offer." }, + "headlineOfferSubscriptionCost": { + "$ref": "HeadlineOfferSubscriptionCost", + "description": "Number of periods (months or years) and amount of payment per period for an item with an associated subscription contract." + }, "highPrice": { "$ref": "Price", "description": "High Price of the aggregate offer." @@ -1022,6 +1030,56 @@ "properties": {}, "type": "object" }, + "HeadlineOfferInstallment": { + "description": "A message that represents installment.", + "id": "HeadlineOfferInstallment", + "properties": { + "amount": { + "$ref": "Price", + "description": "The amount the buyer has to pay per month." + }, + "downpayment": { + "$ref": "Price", + "description": "The up-front down payment amount the buyer has to pay." + }, + "months": { + "description": "The number of installments the buyer has to pay.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "HeadlineOfferSubscriptionCost": { + "description": "The SubscriptionCost of the product.", + "id": "HeadlineOfferSubscriptionCost", + "properties": { + "amount": { + "$ref": "Price", + "description": "The amount the buyer has to pay per subscription period." + }, + "period": { + "description": "The type of subscription period. Supported values are: * \"`month`\" * \"`year`\"", + "enum": [ + "SUBSCRIPTION_PERIOD_UNSPECIFIED", + "MONTH", + "YEAR" + ], + "enumDescriptions": [ + "Indicates that the subscription period is unspecified.", + "Indicates that the subscription period is month.", + "Indicates that the subscription period is year." + ], + "type": "string" + }, + "periodLength": { + "description": "The number of subscription periods the buyer has to pay.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "ItemLevelIssue": { "description": "The ItemLevelIssue of the product status.", "id": "ItemLevelIssue", diff --git a/css/v1/css-gen.go b/css/v1/css-gen.go index f0386057370..8f5882c6fb7 100644 --- a/css/v1/css-gen.go +++ b/css/v1/css-gen.go @@ -359,6 +359,9 @@ type Attributes struct { Gtin string `json:"gtin,omitempty"` // HeadlineOfferCondition: Condition of the headline offer. HeadlineOfferCondition string `json:"headlineOfferCondition,omitempty"` + // HeadlineOfferInstallment: Number and amount of installments to pay for an + // item. + HeadlineOfferInstallment *HeadlineOfferInstallment `json:"headlineOfferInstallment,omitempty"` // HeadlineOfferLink: Link to the headline offer. HeadlineOfferLink string `json:"headlineOfferLink,omitempty"` // HeadlineOfferMobileLink: Mobile Link to the headline offer. @@ -367,6 +370,10 @@ type Attributes struct { HeadlineOfferPrice *Price `json:"headlineOfferPrice,omitempty"` // HeadlineOfferShippingPrice: Headline Price of the aggregate offer. HeadlineOfferShippingPrice *Price `json:"headlineOfferShippingPrice,omitempty"` + // HeadlineOfferSubscriptionCost: Number of periods (months or years) and + // amount of payment per period for an item with an associated subscription + // contract. + HeadlineOfferSubscriptionCost *HeadlineOfferSubscriptionCost `json:"headlineOfferSubscriptionCost,omitempty"` // HighPrice: High Price of the aggregate offer. HighPrice *Price `json:"highPrice,omitempty"` // ImageLink: URL of an image of the item. @@ -694,6 +701,65 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// HeadlineOfferInstallment: A message that represents installment. +type HeadlineOfferInstallment struct { + // Amount: The amount the buyer has to pay per month. + Amount *Price `json:"amount,omitempty"` + // Downpayment: The up-front down payment amount the buyer has to pay. + Downpayment *Price `json:"downpayment,omitempty"` + // Months: The number of installments the buyer has to pay. + Months int64 `json:"months,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Amount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s HeadlineOfferInstallment) MarshalJSON() ([]byte, error) { + type NoMethod HeadlineOfferInstallment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// HeadlineOfferSubscriptionCost: The SubscriptionCost of the product. +type HeadlineOfferSubscriptionCost struct { + // Amount: The amount the buyer has to pay per subscription period. + Amount *Price `json:"amount,omitempty"` + // Period: The type of subscription period. Supported values are: * "month" * + // "year" + // + // Possible values: + // "SUBSCRIPTION_PERIOD_UNSPECIFIED" - Indicates that the subscription period + // is unspecified. + // "MONTH" - Indicates that the subscription period is month. + // "YEAR" - Indicates that the subscription period is year. + Period string `json:"period,omitempty"` + // PeriodLength: The number of subscription periods the buyer has to pay. + PeriodLength int64 `json:"periodLength,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Amount") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Amount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s HeadlineOfferSubscriptionCost) MarshalJSON() ([]byte, error) { + type NoMethod HeadlineOfferSubscriptionCost + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ItemLevelIssue: The ItemLevelIssue of the product status. type ItemLevelIssue struct { // ApplicableCountries: List of country codes (ISO 3166-1 alpha-2) where issue diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index d81a01da7b4..264fde66388 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1250,7 +1250,7 @@ } } }, - "revision": "20240814", + "revision": "20240904", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AppendOnly": { @@ -2778,6 +2778,10 @@ "cdcStrategy": { "$ref": "CdcStrategy", "description": "Optional. The CDC strategy of the stream. If not set, the system's default value will be used." + }, + "force": { + "description": "Optional. Update the stream without validating it.", + "type": "boolean" } }, "type": "object" diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index d28421c84fc..b10b945d3f3 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -1990,6 +1990,8 @@ type RunStreamRequest struct { // CdcStrategy: Optional. The CDC strategy of the stream. If not set, the // system's default value will be used. CdcStrategy *CdcStrategy `json:"cdcStrategy,omitempty"` + // Force: Optional. Update the stream without validating it. + Force bool `json:"force,omitempty"` // ForceSendFields is a list of field names (e.g. "CdcStrategy") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 3a9fbabaa36..c77651ca792 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -14,7 +14,7 @@ "canonicalName": "Discovery Engine", "description": "Discovery Engine API.", "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/discovery-engine/docs", + "documentationLink": "https://cloud.google.com/generative-ai-app-builder/docs/", "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -921,7 +921,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -949,7 +949,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -974,7 +974,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -1015,7 +1015,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1078,7 +1078,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -1106,7 +1106,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1134,7 +1134,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -1159,7 +1159,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -1205,7 +1205,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1757,7 +1757,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1785,7 +1785,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -1810,7 +1810,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -1856,7 +1856,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1919,7 +1919,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", + "description": "Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", "required": true, @@ -2549,7 +2549,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -2740,7 +2740,7 @@ ], "parameters": { "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -2783,7 +2783,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -2811,7 +2811,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", "required": true, @@ -2836,7 +2836,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", "required": true, @@ -2877,7 +2877,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -2940,7 +2940,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", "required": true, @@ -2968,7 +2968,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -2996,7 +2996,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", "required": true, @@ -3021,7 +3021,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", "required": true, @@ -3067,7 +3067,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3288,7 +3288,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3316,7 +3316,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", "required": true, @@ -3341,7 +3341,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", "required": true, @@ -3387,7 +3387,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3450,7 +3450,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", + "description": "Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/answers/[^/]+$", "required": true, @@ -4221,7 +4221,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -4249,7 +4249,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -4274,7 +4274,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -4315,7 +4315,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -4378,7 +4378,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -4406,7 +4406,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -4434,7 +4434,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -4459,7 +4459,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -4505,7 +4505,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -4956,7 +4956,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -4984,7 +4984,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -5009,7 +5009,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -5055,7 +5055,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5118,7 +5118,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", + "description": "Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", "required": true, @@ -5542,7 +5542,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5785,7 +5785,7 @@ ], "parameters": { "rankingConfig": { - "description": "Required. The resource name of the rank service config, such as `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.", + "description": "Required. The resource name of the rank service config, such as `projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/rankingConfigs/[^/]+$", "required": true, @@ -5986,7 +5986,7 @@ } } }, - "revision": "20240829", + "revision": "20240912", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6314,7 +6314,8 @@ "description": "Answer generation specification." }, "asynchronousMode": { - "description": "Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", + "deprecated": true, + "description": "Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", "type": "boolean" }, "query": { @@ -6367,6 +6368,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.", "type": "boolean" @@ -6593,6 +6598,25 @@ "content": { "description": "Chunk textual content.", "type": "string" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata", + "description": "Metadata of the document from the current chunk." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata": { + "description": "Document metadata contains the information of the document of the current chunk.", + "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata", + "properties": { + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "Uri of the document.", + "type": "string" } }, "type": "object" @@ -6606,14 +6630,15 @@ "type": "string" }, "documentContexts": { - "description": "List of document contexts.", + "description": "List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.", "items": { "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext" }, "type": "array" }, "extractiveAnswers": { - "description": "List of extractive answers.", + "deprecated": true, + "description": "Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.", "items": { "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer" }, @@ -6642,7 +6667,7 @@ "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext", "properties": { "content": { - "description": "Document content.", + "description": "Document content to be used for answer generation.", "type": "string" }, "pageIdentifier": { @@ -6668,7 +6693,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment": { - "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)", + "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.", "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment", "properties": { "content": { @@ -6984,7 +7009,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result. .", "type": "object" }, "title": { @@ -7120,13 +7145,13 @@ "$ref": "GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", "description": "The value of the matcher that was used to match the Document." }, - "status": { - "description": "The status of the document.", + "state": { + "description": "The state of the document.", "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_INDEXED", - "STATUS_NOT_IN_TARGET_SITE", - "STATUS_NOT_IN_INDEX" + "STATE_UNSPECIFIED", + "INDEXED", + "NOT_IN_TARGET_SITE", + "NOT_IN_INDEX" ], "enumDescriptions": [ "Should never be set.", @@ -7980,7 +8005,7 @@ "type": "boolean" }, "servingConfig": { - "description": "The resource name of the Serving Config to use. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", + "description": "The resource name of the Serving Config to use. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", "type": "string" }, "summarySpec": { @@ -8176,7 +8201,7 @@ "type": "string" }, "name": { - "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}` model must be an alpha-numerical string with limit of 40 characters.", + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`. Model must be an alpha-numerical string with limit of 40 characters.", "type": "string" }, "trainingStartTime": { @@ -8248,6 +8273,10 @@ "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, + "servingConfigDataStore": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigDataStore", + "description": "Optional. Stores serving config at DataStore level." + }, "solutionTypes": { "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { @@ -8489,7 +8518,7 @@ "type": "boolean" }, "name": { - "description": "The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", + "description": "The Document resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", "type": "string" }, "promotionIds": { @@ -8531,7 +8560,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsm`: Override parsing config for XLSM files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -8694,7 +8723,7 @@ "type": "string" }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, "searchEngineConfig": { @@ -9614,7 +9643,7 @@ "type": "string" }, "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "description": "Output only. Full resource name of the project, for example `projects/{project}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", "readOnly": true, "type": "string" }, @@ -10082,6 +10111,10 @@ "description": "Request message for SiteSearchEngineService.RecrawlUris method.", "id": "GoogleCloudDiscoveryengineV1RecrawlUrisRequest", "properties": { + "siteCredential": { + "description": "Optional. Full resource name of the SiteCredential, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`. Only set to crawl private URIs.", + "type": "string" + }, "uris": { "description": "Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in `site_search_engine`.", "items": { @@ -10286,6 +10319,10 @@ "format": "float", "type": "number" }, + "boostControlSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "description": "Complex specification for custom ranking based on customer defined attribute value." + }, "condition": { "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": `(document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))`", "type": "string" @@ -10293,6 +10330,66 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpec": { + "description": "Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "properties": { + "attributeType": { + "description": "The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).", + "enum": [ + "ATTRIBUTE_TYPE_UNSPECIFIED", + "NUMERICAL", + "FRESHNESS" + ], + "enumDescriptions": [ + "Unspecified AttributeType.", + "The value of the numerical field will be used to dynamically update the boost amount. In this case, the attribute_value (the x value) of the control point will be the actual value of the numerical field for which the boost_amount is specified.", + "For the freshness use case the attribute value will be the duration between the current time and the date in the datetime field specified. The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. For example, `5D`, `3DT12H30M`, `T24H`." + ], + "type": "string" + }, + "controlPoints": { + "description": "The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint" + }, + "type": "array" + }, + "fieldName": { + "description": "The name of the field whose value will be used to determine the boost amount.", + "type": "string" + }, + "interpolationType": { + "description": "The interpolation type to be applied to connect the control points listed below.", + "enum": [ + "INTERPOLATION_TYPE_UNSPECIFIED", + "LINEAR" + ], + "enumDescriptions": [ + "Interpolation type is unspecified. In this case, it defaults to Linear.", + "Piecewise linear interpolation will be applied." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "description": "The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).", + "id": "GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint", + "properties": { + "attributeValue": { + "description": "Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.", + "type": "string" + }, + "boostAmount": { + "description": "The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec": { "description": "A specification for configuring the behavior of content search.", "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", @@ -10408,6 +10505,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", "type": "boolean" @@ -10976,6 +11077,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1ServingConfigDataStore": { + "description": "Stores information regarding the serving configurations at DataStore level.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigDataStore", + "properties": { + "disabledForServing": { + "description": "If set true, the DataStore will not be available for serving search requests.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1Session": { "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1Session", @@ -11998,7 +12110,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result. .", "type": "object" }, "title": { @@ -12420,7 +12532,7 @@ "type": "string" }, "name": { - "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}` model must be an alpha-numerical string with limit of 40 characters.", + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`. Model must be an alpha-numerical string with limit of 40 characters.", "type": "string" }, "trainingStartTime": { @@ -12505,6 +12617,14 @@ "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, + "naturalLanguageQueryUnderstandingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", + "description": "Optional. Configuration for Natural Language Query Understanding." + }, + "servingConfigDataStore": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfigDataStore", + "description": "Optional. Stores serving config at DataStore level." + }, "solutionTypes": { "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { @@ -12648,7 +12768,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsm`: Override parsing config for XLSM files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -12809,7 +12929,7 @@ "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, "recommendationMetadata": { @@ -13698,6 +13818,27 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig": { + "description": "Configuration for Natural Language Query Understanding.", + "id": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", + "properties": { + "mode": { + "description": "Mode of Natural Language Query Understanding. If this field is unset, the behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value.", + "Natural Language Query Understanding is disabled.", + "Natural Language Query Understanding is enabled." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaProject": { "description": "Metadata and configurations for a Google Cloud project in the service.", "id": "GoogleCloudDiscoveryengineV1alphaProject", @@ -13709,7 +13850,7 @@ "type": "string" }, "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "description": "Output only. Full resource name of the project, for example `projects/{project}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", "readOnly": true, "type": "string" }, @@ -14514,6 +14655,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", "type": "boolean" @@ -14812,6 +14957,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaServingConfigDataStore": { + "description": "Stores information regarding the serving configurations at DataStore level.", + "id": "GoogleCloudDiscoveryengineV1alphaServingConfigDataStore", + "properties": { + "disabledForServing": { + "description": "If set true, the DataStore will not be available for serving search requests.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSession": { "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1alphaSession", @@ -15082,7 +15238,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", "properties": { "engine": { - "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "type": "string" } }, @@ -15529,7 +15685,7 @@ "type": "string" }, "name": { - "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}` model must be an alpha-numerical string with limit of 40 characters.", + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`. Model must be an alpha-numerical string with limit of 40 characters.", "type": "string" }, "trainingStartTime": { @@ -15605,6 +15761,14 @@ "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, + "naturalLanguageQueryUnderstandingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig", + "description": "Optional. Configuration for Natural Language Query Understanding." + }, + "servingConfigDataStore": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfigDataStore", + "description": "Optional. Stores serving config at DataStore level." + }, "solutionTypes": { "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { @@ -15748,7 +15912,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsm`: Override parsing config for XLSM files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -15905,7 +16069,7 @@ "type": "string" }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, "searchEngineConfig": { @@ -16444,6 +16608,27 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig": { + "description": "Configuration for Natural Language Query Understanding.", + "id": "GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig", + "properties": { + "mode": { + "description": "Mode of Natural Language Query Understanding. If this field is unset, the behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value.", + "Natural Language Query Understanding is disabled.", + "Natural Language Query Understanding is enabled." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaProject": { "description": "Metadata and configurations for a Google Cloud project in the service.", "id": "GoogleCloudDiscoveryengineV1betaProject", @@ -16455,7 +16640,7 @@ "type": "string" }, "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "description": "Output only. Full resource name of the project, for example `projects/{project}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", "readOnly": true, "type": "string" }, @@ -17051,6 +17236,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", "type": "boolean" @@ -17349,6 +17538,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaServingConfigDataStore": { + "description": "Stores information regarding the serving configurations at DataStore level.", + "id": "GoogleCloudDiscoveryengineV1betaServingConfigDataStore", + "properties": { + "disabledForServing": { + "description": "If set true, the DataStore will not be available for serving search requests.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSiteVerificationInfo": { "description": "Verification information for target sites in advanced site search.", "id": "GoogleCloudDiscoveryengineV1betaSiteVerificationInfo", @@ -17535,7 +17735,7 @@ "id": "GoogleCloudDiscoveryengineV1betaTuneEngineMetadata", "properties": { "engine": { - "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "type": "string" } }, diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 2076fc81c59..073ef50bfd1 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -6,7 +6,7 @@ // Package discoveryengine provides access to the Discovery Engine API. // -// For product documentation, see: https://cloud.google.com/discovery-engine/docs +// For product documentation, see: https://cloud.google.com/generative-ai-app-builder/docs/ // // # Library status // @@ -1272,7 +1272,8 @@ func (s GoogleCloudDiscoveryengineV1AnswerCitationSource) MarshalJSON() ([]byte, type GoogleCloudDiscoveryengineV1AnswerQueryRequest struct { // AnswerGenerationSpec: Answer generation specification. AnswerGenerationSpec *GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpec `json:"answerGenerationSpec,omitempty"` - // AsynchronousMode: Asynchronous mode control. If enabled, the response will + // AsynchronousMode: Deprecated: This field is deprecated. Streaming Answer API + // will be supported. Asynchronous mode control. If enabled, the response will // be returned with answer/session resource name without final answer. The API // users need to do the polling to get the latest status of answer/session by // calling ConversationalSearchService.GetAnswer or @@ -1348,6 +1349,16 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpec struct { // skip generating answers for adversarial queries and return fallback messages // instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. If this field is set to `false`, all search results are used // regardless of relevance to generate answers. If set to `true` or unset, the @@ -1705,6 +1716,8 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSea Chunk string `json:"chunk,omitempty"` // Content: Chunk textual content. Content string `json:"content,omitempty"` + // DocumentMetadata: Metadata of the document from the current chunk. + DocumentMetadata *GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata `json:"documentMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -1723,14 +1736,44 @@ func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultList return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearc +// hResultChunkInfoDocumentMetadata: Document metadata contains the information +// of the document of the current chunk. +type GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata struct { + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: Uri of the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearc // hResultUnstructuredDocumentInfo: Unstructured document information. type GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo struct { // Document: Document resource name. Document string `json:"document,omitempty"` - // DocumentContexts: List of document contexts. + // DocumentContexts: List of document contexts. The content will be used for + // Answer Generation. This is supposed to be the main content of the document + // that can be long and comprehensive. DocumentContexts []*GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext `json:"documentContexts,omitempty"` - // ExtractiveAnswers: List of extractive answers. + // ExtractiveAnswers: Deprecated: This field is deprecated and will have no + // effect on the Answer generation. Please use document_contexts and + // extractive_segments fields. List of extractive answers. ExtractiveAnswers []*GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer `json:"extractiveAnswers,omitempty"` // ExtractiveSegments: List of extractive segments. ExtractiveSegments []*GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment `json:"extractiveSegments,omitempty"` @@ -1759,7 +1802,7 @@ func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultList // GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearc // hResultUnstructuredDocumentInfoDocumentContext: Document context. type GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext struct { - // Content: Document content. + // Content: Document content to be used for answer generation. Content string `json:"content,omitempty"` // PageIdentifier: Page identifier. PageIdentifier string `json:"pageIdentifier,omitempty"` @@ -1810,6 +1853,8 @@ func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultList // GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearc // hResultUnstructuredDocumentInfoExtractiveSegment: Extractive segment. Guide // (https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) +// Answer generation will only use it if document_contexts is empty. This is +// supposed to be shorter snippets. type GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment struct { // Content: Extractive segment content. Content string `json:"content,omitempty"` @@ -2219,8 +2264,8 @@ type GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResult struct // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document , or the Chunk in - // search result . + // It's populated from the struct data from the Document, or the Chunk in + // search result. . StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` @@ -2449,15 +2494,15 @@ type GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetada LastRefreshedTime string `json:"lastRefreshedTime,omitempty"` // MatcherValue: The value of the matcher that was used to match the Document. MatcherValue *GoogleCloudDiscoveryengineV1BatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue `json:"matcherValue,omitempty"` - // Status: The status of the document. + // State: The state of the document. // // Possible values: - // "STATUS_UNSPECIFIED" - Should never be set. - // "STATUS_INDEXED" - The Document is indexed. - // "STATUS_NOT_IN_TARGET_SITE" - The Document is not indexed because its URI - // is not in the TargetSite. - // "STATUS_NOT_IN_INDEX" - The Document is not indexed. - Status string `json:"status,omitempty"` + // "STATE_UNSPECIFIED" - Should never be set. + // "INDEXED" - The Document is indexed. + // "NOT_IN_TARGET_SITE" - The Document is not indexed because its URI is not + // in the TargetSite. + // "NOT_IN_INDEX" - The Document is not indexed. + State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "DataIngestionSource") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3636,9 +3681,9 @@ type GoogleCloudDiscoveryengineV1ConverseConversationRequest struct { // SafeSearch: Whether to turn on safe search. SafeSearch bool `json:"safeSearch,omitempty"` // ServingConfig: The resource name of the Serving Config to use. Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection}/d - // ataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not - // set, the default serving config will be used. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the + // default serving config will be used. ServingConfig string `json:"servingConfig,omitempty"` // SummarySpec: A specification for configuring the summary returned in the // response. @@ -3914,9 +3959,9 @@ type GoogleCloudDiscoveryengineV1CustomTuningModel struct { // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be - // an alpha-numerical string with limit of 40 characters. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/customTuningModels/{custom_tuning_model}`. Model must be an + // alpha-numerical string with limit of 40 characters. Name string `json:"name,omitempty"` // TrainingStartTime: Timestamp the model training was initiated. TrainingStartTime string `json:"trainingStartTime,omitempty"` @@ -3979,6 +4024,8 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length // limit of 1024 characters. Name string `json:"name,omitempty"` + // ServingConfigDataStore: Optional. Stores serving config at DataStore level. + ServingConfigDataStore *GoogleCloudDiscoveryengineV1ServingConfigDataStore `json:"servingConfigDataStore,omitempty"` // SolutionTypes: The solutions that the data store enrolls. Available // solutions for each industry_vertical: * `MEDIA`: // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: @@ -4312,8 +4359,8 @@ type GoogleCloudDiscoveryengineV1DocumentInfo struct { // data store. Joined bool `json:"joined,omitempty"` // Name: The Document resource full name, of the form: - // `projects/{project_id}/locations/{location}/collections/{collection_id}/dataS - // tores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}/branches/{branch_id}/documents/{document_id}` Name string `json:"name,omitempty"` // PromotionIds: The promotion IDs associated with this Document. Currently, // this field is restricted to at most one ID. @@ -4366,8 +4413,10 @@ type GoogleCloudDiscoveryengineV1DocumentProcessingConfig struct { // digital parsing and layout parsing are supported. * `docx`: Override parsing // config for DOCX files, only digital parsing and layout parsing are // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. * `xlsx`: Override parsing config - // for XLSX files, only digital parsing and layout parsing are supported. + // parsing and layout parsing are supported. * `xlsm`: Override parsing config + // for XLSM files, only digital parsing and layout parsing are supported. * + // `xlsx`: Override parsing config for XLSX files, only digital parsing and + // layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -4580,9 +4629,9 @@ type GoogleCloudDiscoveryengineV1Engine struct { // Name: Immutable. The fully qualified resource name of the engine. This field // must be a UTF-8 encoded string with a length limit of 1024 characters. // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. + // Otherwise, an INVALID_ARGUMENT error is returned. Name string `json:"name,omitempty"` // SearchEngineConfig: Configurations for the Search Engine. Only applicable if // solution_type is SOLUTION_TYPE_SEARCH. @@ -5959,8 +6008,8 @@ type GoogleCloudDiscoveryengineV1Project struct { // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in + // `projects/{project}`. Note that when making requests, project number and + // project id are both acceptable, but the server will always respond in // project number. Name string `json:"name,omitempty"` // ProvisionCompletionTime: Output only. The timestamp when this project is @@ -6672,19 +6721,23 @@ func (s GoogleCloudDiscoveryengineV1RecommendResponseRecommendationResult) Marsh // GoogleCloudDiscoveryengineV1RecrawlUrisRequest: Request message for // SiteSearchEngineService.RecrawlUris method. type GoogleCloudDiscoveryengineV1RecrawlUrisRequest struct { + // SiteCredential: Optional. Full resource name of the SiteCredential, such as + // `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCrede + // ntials/*`. Only set to crawl private URIs. + SiteCredential string `json:"siteCredential,omitempty"` // Uris: Required. List of URIs to crawl. At most 10K URIs are supported, // otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at // least one TargetSite in `site_search_engine`. Uris []string `json:"uris,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uris") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "SiteCredential") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uris") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "SiteCredential") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -7003,6 +7056,9 @@ type GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpec struct // If both are set then the global boost is ignored and the more fine-grained // boost_control_spec is applied. Boost float64 `json:"boost,omitempty"` + // BoostControlSpec: Complex specification for custom ranking based on customer + // defined attribute value. + BoostControlSpec *GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` // Condition: An expression which specifies a boost condition. The syntax and // supported fields are the same as a filter expression. See // SearchRequest.filter for detail syntax and limitations. Examples: * To boost @@ -7041,6 +7097,107 @@ func (s *GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpec) U return nil } +// GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostCont +// rolSpec: Specification for custom ranking based on customer specified +// attribute value. It provides more controls for customized ranking than the +// simple (condition, boost) combination above. +type GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: The attribute type to be used to determine the boost amount. + // The attribute value can be derived from the field value of the specified + // field_name. In the case of numerical it is straightforward i.e. + // attribute_value = numerical_field_value. In the case of freshness however, + // attribute_value = (time.now() - datetime_field_value). + // + // Possible values: + // "ATTRIBUTE_TYPE_UNSPECIFIED" - Unspecified AttributeType. + // "NUMERICAL" - The value of the numerical field will be used to dynamically + // update the boost amount. In this case, the attribute_value (the x value) of + // the control point will be the actual value of the numerical field for which + // the boost_amount is specified. + // "FRESHNESS" - For the freshness use case the attribute value will be the + // duration between the current time and the date in the datetime field + // specified. The value must be formatted as an XSD `dayTimeDuration` value (a + // restricted subset of an ISO 8601 duration value). The pattern for this is: + // `nDnM]`. For example, `5D`, `3DT12H30M`, `T24H`. + AttributeType string `json:"attributeType,omitempty"` + // ControlPoints: The control points used to define the curve. The monotonic + // function (defined through the interpolation_type above) passes through the + // control points listed here. + ControlPoints []*GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + // FieldName: The name of the field whose value will be used to determine the + // boost amount. + FieldName string `json:"fieldName,omitempty"` + // InterpolationType: The interpolation type to be applied to connect the + // control points listed below. + // + // Possible values: + // "INTERPOLATION_TYPE_UNSPECIFIED" - Interpolation type is unspecified. In + // this case, it defaults to Linear. + // "LINEAR" - Piecewise linear interpolation will be applied. + InterpolationType string `json:"interpolationType,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AttributeType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostCont +// rolSpecControlPoint: The control points used to define the curve. The curve +// defined through these control points can only be monotonically increasing or +// decreasing(constant values are acceptable). +type GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: Can be one of: 1. The numerical field value. 2. The duration + // spec for freshness: The value must be formatted as an XSD `dayTimeDuration` + // value (a restricted subset of an ISO 8601 duration value). The pattern for + // this is: `nDnM]`. + AttributeValue string `json:"attributeValue,omitempty"` + // BoostAmount: The value between -1 to 1 by which to boost the score if the + // attribute_value evaluates to the value specified above. + BoostAmount float64 `json:"boostAmount,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AttributeValue") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + var s1 struct { + BoostAmount gensupport.JSONFloat64 `json:"boostAmount"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BoostAmount = float64(s1.BoostAmount) + return nil +} + // GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec: A specification // for configuring the behavior of content search. type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec struct { @@ -7212,6 +7369,16 @@ type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec struc // skip generating summaries for adversarial queries and return fallback // messages instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. The default value is `false`. If this field is set to // `false`, all search results are used regardless of relevance to generate @@ -8111,6 +8278,30 @@ func (s GoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata) Ma return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1ServingConfigDataStore: Stores information +// regarding the serving configurations at DataStore level. +type GoogleCloudDiscoveryengineV1ServingConfigDataStore struct { + // DisabledForServing: If set true, the DataStore will not be available for + // serving search requests. + DisabledForServing bool `json:"disabledForServing,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisabledForServing") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisabledForServing") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfigDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigDataStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1Session: External session proto definition. type GoogleCloudDiscoveryengineV1Session struct { // EndTime: Output only. The time the session finished. @@ -9440,8 +9631,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult st // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document , or the Chunk in - // search result . + // It's populated from the struct data from the Document, or the Chunk in + // search result. . StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` @@ -10051,9 +10242,9 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be - // an alpha-numerical string with limit of 40 characters. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/customTuningModels/{custom_tuning_model}`. Model must be an + // alpha-numerical string with limit of 40 characters. Name string `json:"name,omitempty"` // TrainingStartTime: Timestamp the model training was initiated. TrainingStartTime string `json:"trainingStartTime,omitempty"` @@ -10128,6 +10319,11 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length // limit of 1024 characters. Name string `json:"name,omitempty"` + // NaturalLanguageQueryUnderstandingConfig: Optional. Configuration for Natural + // Language Query Understanding. + NaturalLanguageQueryUnderstandingConfig *GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig `json:"naturalLanguageQueryUnderstandingConfig,omitempty"` + // ServingConfigDataStore: Optional. Stores serving config at DataStore level. + ServingConfigDataStore *GoogleCloudDiscoveryengineV1alphaServingConfigDataStore `json:"servingConfigDataStore,omitempty"` // SolutionTypes: The solutions that the data store enrolls. Available // solutions for each industry_vertical: * `MEDIA`: // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: @@ -10338,8 +10534,10 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // digital parsing and layout parsing are supported. * `docx`: Override parsing // config for DOCX files, only digital parsing and layout parsing are // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. * `xlsx`: Override parsing config - // for XLSX files, only digital parsing and layout parsing are supported. + // parsing and layout parsing are supported. * `xlsm`: Override parsing config + // for XLSM files, only digital parsing and layout parsing are supported. * + // `xlsx`: Override parsing config for XLSX files, only digital parsing and + // layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -10551,9 +10749,9 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // Name: Immutable. The fully qualified resource name of the engine. This field // must be a UTF-8 encoded string with a length limit of 1024 characters. // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. + // Otherwise, an INVALID_ARGUMENT error is returned. Name string `json:"name,omitempty"` // RecommendationMetadata: Output only. Additional information of a // recommendation engine. Only applicable if solution_type is @@ -11749,14 +11947,44 @@ func (s GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig: +// Configuration for Natural Language Query Understanding. +type GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig struct { + // Mode: Mode of Natural Language Query Understanding. If this field is unset, + // the behavior defaults to + // NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value. + // "DISABLED" - Natural Language Query Understanding is disabled. + // "ENABLED" - Natural Language Query Understanding is enabled. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaProject: Metadata and configurations for a // Google Cloud project in the service. type GoogleCloudDiscoveryengineV1alphaProject struct { // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in + // `projects/{project}`. Note that when making requests, project number and + // project id are both acceptable, but the server will always respond in // project number. Name string `json:"name,omitempty"` // ProvisionCompletionTime: Output only. The timestamp when this project is @@ -12927,6 +13155,16 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec // skip generating summaries for adversarial queries and return fallback // messages instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. The default value is `false`. If this field is set to // `false`, all search results are used regardless of relevance to generate @@ -13465,6 +13703,30 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) Marsh return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaServingConfigDataStore: Stores information +// regarding the serving configurations at DataStore level. +type GoogleCloudDiscoveryengineV1alphaServingConfigDataStore struct { + // DisabledForServing: If set true, the DataStore will not be available for + // serving search requests. + DisabledForServing bool `json:"disabledForServing,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisabledForServing") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisabledForServing") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaServingConfigDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigDataStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. type GoogleCloudDiscoveryengineV1alphaSession struct { // EndTime: Output only. The time the session finished. @@ -13783,8 +14045,8 @@ func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse) MarshalJSON() type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { // Engine: Required. The resource name of the engine that this tune applies to. // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}` Engine string `json:"engine,omitempty"` // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -14402,9 +14664,9 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be - // an alpha-numerical string with limit of 40 characters. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/customTuningModels/{custom_tuning_model}`. Model must be an + // alpha-numerical string with limit of 40 characters. Name string `json:"name,omitempty"` // TrainingStartTime: Timestamp the model training was initiated. TrainingStartTime string `json:"trainingStartTime,omitempty"` @@ -14469,6 +14731,11 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length // limit of 1024 characters. Name string `json:"name,omitempty"` + // NaturalLanguageQueryUnderstandingConfig: Optional. Configuration for Natural + // Language Query Understanding. + NaturalLanguageQueryUnderstandingConfig *GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig `json:"naturalLanguageQueryUnderstandingConfig,omitempty"` + // ServingConfigDataStore: Optional. Stores serving config at DataStore level. + ServingConfigDataStore *GoogleCloudDiscoveryengineV1betaServingConfigDataStore `json:"servingConfigDataStore,omitempty"` // SolutionTypes: The solutions that the data store enrolls. Available // solutions for each industry_vertical: * `MEDIA`: // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: @@ -14679,8 +14946,10 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { // digital parsing and layout parsing are supported. * `docx`: Override parsing // config for DOCX files, only digital parsing and layout parsing are // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. * `xlsx`: Override parsing config - // for XLSX files, only digital parsing and layout parsing are supported. + // parsing and layout parsing are supported. * `xlsm`: Override parsing config + // for XLSM files, only digital parsing and layout parsing are supported. * + // `xlsx`: Override parsing config for XLSX files, only digital parsing and + // layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -14888,9 +15157,9 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // Name: Immutable. The fully qualified resource name of the engine. This field // must be a UTF-8 encoded string with a length limit of 1024 characters. // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. + // Otherwise, an INVALID_ARGUMENT error is returned. Name string `json:"name,omitempty"` // SearchEngineConfig: Configurations for the Search Engine. Only applicable if // solution_type is SOLUTION_TYPE_SEARCH. @@ -15628,14 +15897,44 @@ func (s GoogleCloudDiscoveryengineV1betaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig: +// Configuration for Natural Language Query Understanding. +type GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig struct { + // Mode: Mode of Natural Language Query Understanding. If this field is unset, + // the behavior defaults to + // NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value. + // "DISABLED" - Natural Language Query Understanding is disabled. + // "ENABLED" - Natural Language Query Understanding is enabled. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a // Google Cloud project in the service. type GoogleCloudDiscoveryengineV1betaProject struct { // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in + // `projects/{project}`. Note that when making requests, project number and + // project id are both acceptable, but the server will always respond in // project number. Name string `json:"name,omitempty"` // ProvisionCompletionTime: Output only. The timestamp when this project is @@ -16542,6 +16841,16 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec s // skip generating summaries for adversarial queries and return fallback // messages instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. The default value is `false`. If this field is set to // `false`, all search results are used regardless of relevance to generate @@ -17080,6 +17389,30 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaServingConfigDataStore: Stores information +// regarding the serving configurations at DataStore level. +type GoogleCloudDiscoveryengineV1betaServingConfigDataStore struct { + // DisabledForServing: If set true, the DataStore will not be available for + // serving search requests. + DisabledForServing bool `json:"disabledForServing,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisabledForServing") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisabledForServing") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaServingConfigDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigDataStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification // information for target sites in advanced site search. type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { @@ -17301,8 +17634,8 @@ func (s GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { // Engine: Required. The resource name of the engine that this tune applies to. // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}` Engine string `json:"engine,omitempty"` // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -20519,10 +20852,10 @@ type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { // create already exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -20634,8 +20967,8 @@ type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -20733,8 +21066,8 @@ type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { // Get: Gets a Control. // // - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -20843,10 +21176,10 @@ type ProjectsLocationsCollectionsDataStoresControlsListCall struct { // List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -21112,12 +21445,12 @@ type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { // Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/-` to activate auto session mode, which +// automatically creates a new conversation inside a ConverseConversation +// session. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21221,8 +21554,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { // exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -21325,8 +21658,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { // exist, a NOT_FOUND error is returned. // // - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21424,8 +21757,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { // Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21534,8 +21867,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { // List: Lists all Conversations by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -23633,8 +23966,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { // ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -23737,8 +24070,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -23836,8 +24169,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { // Get: Gets a Session. // // - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -23946,8 +24279,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { // List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -24222,8 +24555,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { // Get: Gets a Answer. // // - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine_id}/sessions/{session_id}/answers/{answer_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -26561,8 +26894,8 @@ type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { // // - parent: The resource name of the catalog under which the events are // created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto -// res/${dataStoreId}`. +// `projects/{project}/locations/global/collections/{collection}/dataStores/{d +// ataStore}`. func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1purgeusereventsrequest *GoogleCloudDiscoveryengineV1PurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -27255,8 +27588,8 @@ type ProjectsLocationsCollectionsEnginesPatchCall struct { // - name: Immutable. The fully qualified resource name of the engine. This // field must be a UTF-8 encoded string with a length limit of 1024 // characters. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}` engine should be 1-63 characters, and valid characters are +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}` engine should be 1-63 characters, and valid characters are // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1engine *GoogleCloudDiscoveryengineV1Engine) *ProjectsLocationsCollectionsEnginesPatchCall { c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -27370,10 +27703,10 @@ type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { // create already exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control) *ProjectsLocationsCollectionsEnginesControlsCreateCall { c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -27485,8 +27818,8 @@ type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -27584,8 +27917,8 @@ type ProjectsLocationsCollectionsEnginesControlsGetCall struct { // Get: Gets a Control. // // - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { c := &ProjectsLocationsCollectionsEnginesControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -27694,10 +28027,10 @@ type ProjectsLocationsCollectionsEnginesControlsListCall struct { // List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -27963,12 +28296,12 @@ type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { // Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/-` to activate auto session mode, which +// automatically creates a new conversation inside a ConverseConversation +// session. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28072,8 +28405,8 @@ type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { // exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -28176,8 +28509,8 @@ type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { // exist, a NOT_FOUND error is returned. // // - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28275,8 +28608,8 @@ type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { // Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28385,8 +28718,8 @@ type ProjectsLocationsCollectionsEnginesConversationsListCall struct { // List: Lists all Conversations by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -29270,8 +29603,8 @@ type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { // ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -29374,8 +29707,8 @@ type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -29473,8 +29806,8 @@ type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { // Get: Gets a Session. // // - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -29583,8 +29916,8 @@ type ProjectsLocationsCollectionsEnginesSessionsListCall struct { // List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -29859,8 +30192,8 @@ type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { // Get: Gets a Answer. // // - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine_id}/sessions/{session_id}/answers/{answer_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -32652,10 +32985,10 @@ type ProjectsLocationsDataStoresControlsCreateCall struct { // create already exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control) *ProjectsLocationsDataStoresControlsCreateCall { c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -32767,8 +33100,8 @@ type ProjectsLocationsDataStoresControlsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { c := &ProjectsLocationsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -32866,8 +33199,8 @@ type ProjectsLocationsDataStoresControlsGetCall struct { // Get: Gets a Control. // // - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -32976,10 +33309,10 @@ type ProjectsLocationsDataStoresControlsListCall struct { // List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -33245,12 +33578,12 @@ type ProjectsLocationsDataStoresConversationsConverseCall struct { // Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/-` to activate auto session mode, which +// automatically creates a new conversation inside a ConverseConversation +// session. func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -33354,8 +33687,8 @@ type ProjectsLocationsDataStoresConversationsCreateCall struct { // exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsDataStoresConversationsCreateCall { c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -33458,8 +33791,8 @@ type ProjectsLocationsDataStoresConversationsDeleteCall struct { // exist, a NOT_FOUND error is returned. // // - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -33557,8 +33890,8 @@ type ProjectsLocationsDataStoresConversationsGetCall struct { // Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -33667,8 +34000,8 @@ type ProjectsLocationsDataStoresConversationsListCall struct { // List: Lists all Conversations by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -35395,8 +35728,8 @@ type ProjectsLocationsDataStoresSessionsCreateCall struct { // ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsDataStoresSessionsCreateCall { c := &ProjectsLocationsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -35499,8 +35832,8 @@ type ProjectsLocationsDataStoresSessionsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsDataStoresSessionsService) Delete(name string) *ProjectsLocationsDataStoresSessionsDeleteCall { c := &ProjectsLocationsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -35598,8 +35931,8 @@ type ProjectsLocationsDataStoresSessionsGetCall struct { // Get: Gets a Session. // // - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsLocationsDataStoresSessionsGetCall { c := &ProjectsLocationsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -35708,8 +36041,8 @@ type ProjectsLocationsDataStoresSessionsListCall struct { // List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresSessionsService) List(parent string) *ProjectsLocationsDataStoresSessionsListCall { c := &ProjectsLocationsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -35984,8 +36317,8 @@ type ProjectsLocationsDataStoresSessionsAnswersGetCall struct { // Get: Gets a Answer. // // - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine_id}/sessions/{session_id}/answers/{answer_id}`. func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c := &ProjectsLocationsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -37544,8 +37877,8 @@ type ProjectsLocationsDataStoresUserEventsPurgeCall struct { // // - parent: The resource name of the catalog under which the events are // created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto -// res/${dataStoreId}`. +// `projects/{project}/locations/global/collections/{collection}/dataStores/{d +// ataStore}`. func (r *ProjectsLocationsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1purgeusereventsrequest *GoogleCloudDiscoveryengineV1PurgeUserEventsRequest) *ProjectsLocationsDataStoresUserEventsPurgeCall { c := &ProjectsLocationsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -38386,8 +38719,8 @@ type ProjectsLocationsRankingConfigsRankCall struct { // Rank: Ranks a list of text records based on the given input query. // // - rankingConfig: The resource name of the rank service config, such as -// `projects/{project_num}/locations/{location_id}/rankingConfigs/default_rank -// ing_config`. +// `projects/{project_num}/locations/{location}/rankingConfigs/default_ranking +// _config`. func (r *ProjectsLocationsRankingConfigsService) Rank(rankingConfig string, googleclouddiscoveryenginev1rankrequest *GoogleCloudDiscoveryengineV1RankRequest) *ProjectsLocationsRankingConfigsRankCall { c := &ProjectsLocationsRankingConfigsRankCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.rankingConfig = rankingConfig diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 6ddbdf7cb09..d0a27b0fa84 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -14,7 +14,7 @@ "canonicalName": "Discovery Engine", "description": "Discovery Engine API.", "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/discovery-engine/docs", + "documentationLink": "https://cloud.google.com/generative-ai-app-builder/docs/", "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -501,7 +501,7 @@ ], "parameters": { "name": { - "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", + "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/documentProcessingConfig$", "required": true, @@ -1238,7 +1238,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1266,7 +1266,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -1291,7 +1291,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -1332,7 +1332,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1395,7 +1395,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -1423,7 +1423,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1451,7 +1451,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -1476,7 +1476,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -1522,7 +1522,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -2014,7 +2014,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -2050,7 +2050,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + "description": "Required. Full resource name of the parent resource. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -2169,7 +2169,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -2197,7 +2197,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -2222,7 +2222,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -2268,7 +2268,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -2331,7 +2331,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", + "description": "Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", "required": true, @@ -3014,7 +3014,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -3205,7 +3205,7 @@ ], "parameters": { "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3239,7 +3239,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The name of the engine to pause. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3267,7 +3267,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The name of the engine to resume. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3295,7 +3295,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The resource name of the engine to tune. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3332,7 +3332,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3360,7 +3360,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", "required": true, @@ -3385,7 +3385,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", "required": true, @@ -3426,7 +3426,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3489,7 +3489,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", "required": true, @@ -3517,7 +3517,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3545,7 +3545,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", "required": true, @@ -3570,7 +3570,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", "required": true, @@ -3616,7 +3616,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3777,7 +3777,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -3813,7 +3813,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + "description": "Required. Full resource name of the parent resource. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3932,7 +3932,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3960,7 +3960,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", "required": true, @@ -3985,7 +3985,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", "required": true, @@ -4031,7 +4031,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -4094,7 +4094,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", + "description": "Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/answers/[^/]+$", "required": true, @@ -4337,7 +4337,7 @@ ], "parameters": { "name": { - "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", + "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/documentProcessingConfig$", "required": true, @@ -5046,7 +5046,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5074,7 +5074,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -5099,7 +5099,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -5140,7 +5140,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5203,7 +5203,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -5231,7 +5231,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5259,7 +5259,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -5284,7 +5284,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -5330,7 +5330,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5721,7 +5721,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -5757,7 +5757,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + "description": "Required. Full resource name of the parent resource. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5876,7 +5876,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5904,7 +5904,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -5929,7 +5929,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -5975,7 +5975,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -6038,7 +6038,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", + "description": "Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", "required": true, @@ -6462,7 +6462,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -6865,7 +6865,7 @@ ], "parameters": { "rankingConfig": { - "description": "Required. The resource name of the rank service config, such as `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.", + "description": "Required. The resource name of the rank service config, such as `projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/rankingConfigs/[^/]+$", "required": true, @@ -7517,7 +7517,7 @@ } } }, - "revision": "20240829", + "revision": "20240912", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -8206,6 +8206,10 @@ "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, + "servingConfigDataStore": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigDataStore", + "description": "Optional. Stores serving config at DataStore level." + }, "solutionTypes": { "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { @@ -8349,7 +8353,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsm`: Override parsing config for XLSM files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -8506,7 +8510,7 @@ "type": "string" }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, "searchEngineConfig": { @@ -8849,7 +8853,7 @@ "type": "string" }, "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "description": "Output only. Full resource name of the project, for example `projects/{project}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", "readOnly": true, "type": "string" }, @@ -9062,6 +9066,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1ServingConfigDataStore": { + "description": "Stores information regarding the serving configurations at DataStore level.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigDataStore", + "properties": { + "disabledForServing": { + "description": "If set true, the DataStore will not be available for serving search requests.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1SiteVerificationInfo": { "description": "Verification information for target sites in advanced site search.", "id": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", @@ -9506,7 +9521,8 @@ "description": "Answer generation specification." }, "asynchronousMode": { - "description": "Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", + "deprecated": true, + "description": "Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", "type": "boolean" }, "query": { @@ -9559,6 +9575,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.", "type": "boolean" @@ -9789,6 +9809,25 @@ "content": { "description": "Chunk textual content.", "type": "string" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata", + "description": "Metadata of the document from the current chunk." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata": { + "description": "Document metadata contains the information of the document of the current chunk.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata", + "properties": { + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "Uri of the document.", + "type": "string" } }, "type": "object" @@ -9802,14 +9841,15 @@ "type": "string" }, "documentContexts": { - "description": "List of document contexts.", + "description": "List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.", "items": { "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext" }, "type": "array" }, "extractiveAnswers": { - "description": "List of extractive answers.", + "deprecated": true, + "description": "Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.", "items": { "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer" }, @@ -9838,7 +9878,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext", "properties": { "content": { - "description": "Document content.", + "description": "Document content to be used for answer generation.", "type": "string" }, "pageIdentifier": { @@ -9864,7 +9904,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment": { - "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)", + "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.", "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment", "properties": { "content": { @@ -10180,7 +10220,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result. .", "type": "object" }, "title": { @@ -10316,13 +10356,13 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", "description": "The value of the matcher that was used to match the Document." }, - "status": { - "description": "The status of the document.", + "state": { + "description": "The state of the document.", "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_INDEXED", - "STATUS_NOT_IN_TARGET_SITE", - "STATUS_NOT_IN_INDEX" + "STATE_UNSPECIFIED", + "INDEXED", + "NOT_IN_TARGET_SITE", + "NOT_IN_INDEX" ], "enumDescriptions": [ "Should never be set.", @@ -11265,7 +11305,7 @@ "type": "boolean" }, "servingConfig": { - "description": "The resource name of the Serving Config to use. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", + "description": "The resource name of the Serving Config to use. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", "type": "string" }, "summarySpec": { @@ -11485,7 +11525,7 @@ "type": "string" }, "name": { - "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}` model must be an alpha-numerical string with limit of 40 characters.", + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`. Model must be an alpha-numerical string with limit of 40 characters.", "type": "string" }, "trainingStartTime": { @@ -11570,6 +11610,14 @@ "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, + "naturalLanguageQueryUnderstandingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", + "description": "Optional. Configuration for Natural Language Query Understanding." + }, + "servingConfigDataStore": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfigDataStore", + "description": "Optional. Stores serving config at DataStore level." + }, "solutionTypes": { "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { @@ -11847,7 +11895,7 @@ "type": "boolean" }, "name": { - "description": "The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", + "description": "The Document resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", "type": "string" }, "promotionIds": { @@ -11889,7 +11937,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsm`: Override parsing config for XLSM files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -12082,7 +12130,7 @@ "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, "recommendationMetadata": { @@ -13704,6 +13752,27 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig": { + "description": "Configuration for Natural Language Query Understanding.", + "id": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", + "properties": { + "mode": { + "description": "Mode of Natural Language Query Understanding. If this field is unset, the behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value.", + "Natural Language Query Understanding is disabled.", + "Natural Language Query Understanding is enabled." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaPageInfo": { "description": "Detailed page information.", "id": "GoogleCloudDiscoveryengineV1alphaPageInfo", @@ -13799,7 +13868,7 @@ "type": "string" }, "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "description": "Output only. Full resource name of the project, for example `projects/{project}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", "readOnly": true, "type": "string" }, @@ -14404,6 +14473,10 @@ "description": "Request message for SiteSearchEngineService.RecrawlUris method.", "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest", "properties": { + "siteCredential": { + "description": "Optional. Full resource name of the SiteCredential, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`. Only set to crawl private URIs.", + "type": "string" + }, "uris": { "description": "Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in `site_search_engine`.", "items": { @@ -15183,6 +15256,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", "type": "boolean" @@ -15843,13 +15920,15 @@ "ONE_BOX_TYPE_UNSPECIFIED", "PEOPLE", "ORGANIZATION", - "SLACK" + "SLACK", + "KNOWLEDGE_GRAPH" ], "enumDescriptions": [ "Default value. Should not be used.", "One Box result contains people results.", "One Box result contains organization results.", - "One Box result contains slack results." + "One Box result contains slack results.", + "One Box result contains Knowledge Graph search responses." ], "type": "string" }, @@ -16238,6 +16317,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaServingConfigDataStore": { + "description": "Stores information regarding the serving configurations at DataStore level.", + "id": "GoogleCloudDiscoveryengineV1alphaServingConfigDataStore", + "properties": { + "disabledForServing": { + "description": "If set true, the DataStore will not be available for serving search requests.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig": { "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", "id": "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig", @@ -16734,7 +16824,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", "properties": { "engine": { - "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "type": "string" } }, @@ -17287,7 +17377,7 @@ "type": "string" }, "name": { - "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}` model must be an alpha-numerical string with limit of 40 characters.", + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`. Model must be an alpha-numerical string with limit of 40 characters.", "type": "string" }, "trainingStartTime": { @@ -17363,6 +17453,14 @@ "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, + "naturalLanguageQueryUnderstandingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig", + "description": "Optional. Configuration for Natural Language Query Understanding." + }, + "servingConfigDataStore": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfigDataStore", + "description": "Optional. Stores serving config at DataStore level." + }, "solutionTypes": { "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { @@ -17506,7 +17604,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsm`: Override parsing config for XLSM files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -17663,7 +17761,7 @@ "type": "string" }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, "searchEngineConfig": { @@ -18202,6 +18300,27 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig": { + "description": "Configuration for Natural Language Query Understanding.", + "id": "GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig", + "properties": { + "mode": { + "description": "Mode of Natural Language Query Understanding. If this field is unset, the behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value.", + "Natural Language Query Understanding is disabled.", + "Natural Language Query Understanding is enabled." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaProject": { "description": "Metadata and configurations for a Google Cloud project in the service.", "id": "GoogleCloudDiscoveryengineV1betaProject", @@ -18213,7 +18332,7 @@ "type": "string" }, "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "description": "Output only. Full resource name of the project, for example `projects/{project}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", "readOnly": true, "type": "string" }, @@ -18809,6 +18928,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", "type": "boolean" @@ -19107,6 +19230,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaServingConfigDataStore": { + "description": "Stores information regarding the serving configurations at DataStore level.", + "id": "GoogleCloudDiscoveryengineV1betaServingConfigDataStore", + "properties": { + "disabledForServing": { + "description": "If set true, the DataStore will not be available for serving search requests.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSiteVerificationInfo": { "description": "Verification information for target sites in advanced site search.", "id": "GoogleCloudDiscoveryengineV1betaSiteVerificationInfo", @@ -19293,7 +19427,7 @@ "id": "GoogleCloudDiscoveryengineV1betaTuneEngineMetadata", "properties": { "engine": { - "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "type": "string" } }, diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 5b4f2ce1ace..ed9a87fb12e 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -6,7 +6,7 @@ // Package discoveryengine provides access to the Discovery Engine API. // -// For product documentation, see: https://cloud.google.com/discovery-engine/docs +// For product documentation, see: https://cloud.google.com/generative-ai-app-builder/docs/ // // # Library status // @@ -2087,6 +2087,8 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length // limit of 1024 characters. Name string `json:"name,omitempty"` + // ServingConfigDataStore: Optional. Stores serving config at DataStore level. + ServingConfigDataStore *GoogleCloudDiscoveryengineV1ServingConfigDataStore `json:"servingConfigDataStore,omitempty"` // SolutionTypes: The solutions that the data store enrolls. Available // solutions for each industry_vertical: * `MEDIA`: // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: @@ -2297,8 +2299,10 @@ type GoogleCloudDiscoveryengineV1DocumentProcessingConfig struct { // digital parsing and layout parsing are supported. * `docx`: Override parsing // config for DOCX files, only digital parsing and layout parsing are // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. * `xlsx`: Override parsing config - // for XLSX files, only digital parsing and layout parsing are supported. + // parsing and layout parsing are supported. * `xlsm`: Override parsing config + // for XLSM files, only digital parsing and layout parsing are supported. * + // `xlsx`: Override parsing config for XLSX files, only digital parsing and + // layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -2506,9 +2510,9 @@ type GoogleCloudDiscoveryengineV1Engine struct { // Name: Immutable. The fully qualified resource name of the engine. This field // must be a UTF-8 encoded string with a length limit of 1024 characters. // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. + // Otherwise, an INVALID_ARGUMENT error is returned. Name string `json:"name,omitempty"` // SearchEngineConfig: Configurations for the Search Engine. Only applicable if // solution_type is SOLUTION_TYPE_SEARCH. @@ -2981,8 +2985,8 @@ type GoogleCloudDiscoveryengineV1Project struct { // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in + // `projects/{project}`. Note that when making requests, project number and + // project id are both acceptable, but the server will always respond in // project number. Name string `json:"name,omitempty"` // ProvisionCompletionTime: Output only. The timestamp when this project is @@ -3258,6 +3262,30 @@ func (s GoogleCloudDiscoveryengineV1Schema) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1ServingConfigDataStore: Stores information +// regarding the serving configurations at DataStore level. +type GoogleCloudDiscoveryengineV1ServingConfigDataStore struct { + // DisabledForServing: If set true, the DataStore will not be available for + // serving search requests. + DisabledForServing bool `json:"disabledForServing,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisabledForServing") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisabledForServing") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfigDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigDataStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1SiteVerificationInfo: Verification information // for target sites in advanced site search. type GoogleCloudDiscoveryengineV1SiteVerificationInfo struct { @@ -3766,7 +3794,8 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerCitationSource) MarshalJSON() ([] type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest struct { // AnswerGenerationSpec: Answer generation specification. AnswerGenerationSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec `json:"answerGenerationSpec,omitempty"` - // AsynchronousMode: Asynchronous mode control. If enabled, the response will + // AsynchronousMode: Deprecated: This field is deprecated. Streaming Answer API + // will be supported. Asynchronous mode control. If enabled, the response will // be returned with answer/session resource name without final answer. The API // users need to do the polling to get the latest status of answer/session by // calling ConversationalSearchService.GetAnswer or @@ -3842,6 +3871,16 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec str // skip generating answers for adversarial queries and return fallback messages // instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. If this field is set to `false`, all search results are used // regardless of relevance to generate answers. If set to `true` or unset, the @@ -4200,6 +4239,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultLi Chunk string `json:"chunk,omitempty"` // Content: Chunk textual content. Content string `json:"content,omitempty"` + // DocumentMetadata: Metadata of the document from the current chunk. + DocumentMetadata *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata `json:"documentMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -4218,14 +4259,44 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResul return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList +// SearchResultChunkInfoDocumentMetadata: Document metadata contains the +// information of the document of the current chunk. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata struct { + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: Uri of the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList // SearchResultUnstructuredDocumentInfo: Unstructured document information. type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo struct { // Document: Document resource name. Document string `json:"document,omitempty"` - // DocumentContexts: List of document contexts. + // DocumentContexts: List of document contexts. The content will be used for + // Answer Generation. This is supposed to be the main content of the document + // that can be long and comprehensive. DocumentContexts []*GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext `json:"documentContexts,omitempty"` - // ExtractiveAnswers: List of extractive answers. + // ExtractiveAnswers: Deprecated: This field is deprecated and will have no + // effect on the Answer generation. Please use document_contexts and + // extractive_segments fields. List of extractive answers. ExtractiveAnswers []*GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer `json:"extractiveAnswers,omitempty"` // ExtractiveSegments: List of extractive segments. ExtractiveSegments []*GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment `json:"extractiveSegments,omitempty"` @@ -4254,7 +4325,7 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResul // GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList // SearchResultUnstructuredDocumentInfoDocumentContext: Document context. type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext struct { - // Content: Document content. + // Content: Document content to be used for answer generation. Content string `json:"content,omitempty"` // PageIdentifier: Page identifier. PageIdentifier string `json:"pageIdentifier,omitempty"` @@ -4307,6 +4378,8 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResul // SearchResultUnstructuredDocumentInfoExtractiveSegment: Extractive segment. // Guide // (https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) +// Answer generation will only use it if document_contexts is empty. This is +// supposed to be shorter snippets. type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment struct { // Content: Extractive segment content. Content string `json:"content,omitempty"` @@ -4717,8 +4790,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult st // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document , or the Chunk in - // search result . + // It's populated from the struct data from the Document, or the Chunk in + // search result. . StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` @@ -4947,15 +5020,15 @@ type GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentM LastRefreshedTime string `json:"lastRefreshedTime,omitempty"` // MatcherValue: The value of the matcher that was used to match the Document. MatcherValue *GoogleCloudDiscoveryengineV1alphaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue `json:"matcherValue,omitempty"` - // Status: The status of the document. + // State: The state of the document. // // Possible values: - // "STATUS_UNSPECIFIED" - Should never be set. - // "STATUS_INDEXED" - The Document is indexed. - // "STATUS_NOT_IN_TARGET_SITE" - The Document is not indexed because its URI - // is not in the TargetSite. - // "STATUS_NOT_IN_INDEX" - The Document is not indexed. - Status string `json:"status,omitempty"` + // "STATE_UNSPECIFIED" - Should never be set. + // "INDEXED" - The Document is indexed. + // "NOT_IN_TARGET_SITE" - The Document is not indexed because its URI is not + // in the TargetSite. + // "NOT_IN_INDEX" - The Document is not indexed. + State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "DataIngestionSource") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -6257,9 +6330,9 @@ type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest struct { // SafeSearch: Whether to turn on safe search. SafeSearch bool `json:"safeSearch,omitempty"` // ServingConfig: The resource name of the Serving Config to use. Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection}/d - // ataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not - // set, the default serving config will be used. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the + // default serving config will be used. ServingConfig string `json:"servingConfig,omitempty"` // SummarySpec: A specification for configuring the summary returned in the // response. @@ -6566,9 +6639,9 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be - // an alpha-numerical string with limit of 40 characters. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/customTuningModels/{custom_tuning_model}`. Model must be an + // alpha-numerical string with limit of 40 characters. Name string `json:"name,omitempty"` // TrainingStartTime: Timestamp the model training was initiated. TrainingStartTime string `json:"trainingStartTime,omitempty"` @@ -6643,6 +6716,11 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length // limit of 1024 characters. Name string `json:"name,omitempty"` + // NaturalLanguageQueryUnderstandingConfig: Optional. Configuration for Natural + // Language Query Understanding. + NaturalLanguageQueryUnderstandingConfig *GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig `json:"naturalLanguageQueryUnderstandingConfig,omitempty"` + // ServingConfigDataStore: Optional. Stores serving config at DataStore level. + ServingConfigDataStore *GoogleCloudDiscoveryengineV1alphaServingConfigDataStore `json:"servingConfigDataStore,omitempty"` // SolutionTypes: The solutions that the data store enrolls. Available // solutions for each industry_vertical: * `MEDIA`: // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: @@ -7035,8 +7113,8 @@ type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { // data store. Joined bool `json:"joined,omitempty"` // Name: The Document resource full name, of the form: - // `projects/{project_id}/locations/{location}/collections/{collection_id}/dataS - // tores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}/branches/{branch_id}/documents/{document_id}` Name string `json:"name,omitempty"` // PromotionIds: The promotion IDs associated with this Document. Currently, // this field is restricted to at most one ID. @@ -7089,8 +7167,10 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // digital parsing and layout parsing are supported. * `docx`: Override parsing // config for DOCX files, only digital parsing and layout parsing are // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. * `xlsx`: Override parsing config - // for XLSX files, only digital parsing and layout parsing are supported. + // parsing and layout parsing are supported. * `xlsm`: Override parsing config + // for XLSM files, only digital parsing and layout parsing are supported. * + // `xlsx`: Override parsing config for XLSX files, only digital parsing and + // layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -7372,9 +7452,9 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // Name: Immutable. The fully qualified resource name of the engine. This field // must be a UTF-8 encoded string with a length limit of 1024 characters. // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. + // Otherwise, an INVALID_ARGUMENT error is returned. Name string `json:"name,omitempty"` // RecommendationMetadata: Output only. Additional information of a // recommendation engine. Only applicable if solution_type is @@ -9727,6 +9807,36 @@ func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) UnmarshalJSON(data []byte) return nil } +// GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig: +// Configuration for Natural Language Query Understanding. +type GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig struct { + // Mode: Mode of Natural Language Query Understanding. If this field is unset, + // the behavior defaults to + // NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value. + // "DISABLED" - Natural Language Query Understanding is disabled. + // "ENABLED" - Natural Language Query Understanding is enabled. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaPageInfo: Detailed page information. type GoogleCloudDiscoveryengineV1alphaPageInfo struct { // PageCategory: The most specific category associated with a category page. To @@ -9877,8 +9987,8 @@ type GoogleCloudDiscoveryengineV1alphaProject struct { // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in + // `projects/{project}`. Note that when making requests, project number and + // project id are both acceptable, but the server will always respond in // project number. Name string `json:"name,omitempty"` // ProvisionCompletionTime: Output only. The timestamp when this project is @@ -10797,19 +10907,23 @@ func (s GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata) MarshalJSON() ([]b // GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest: Request message for // SiteSearchEngineService.RecrawlUris method. type GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest struct { + // SiteCredential: Optional. Full resource name of the SiteCredential, such as + // `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCrede + // ntials/*`. Only set to crawl private URIs. + SiteCredential string `json:"siteCredential,omitempty"` // Uris: Required. List of URIs to crawl. At most 10K URIs are supported, // otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at // least one TargetSite in `site_search_engine`. Uris []string `json:"uris,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uris") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "SiteCredential") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uris") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "SiteCredential") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -11958,6 +12072,16 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec // skip generating summaries for adversarial queries and return fallback // messages instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. The default value is `false`. If this field is set to // `false`, all search results are used regardless of relevance to generate @@ -12982,6 +13106,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseOneBoxResult struct { // "PEOPLE" - One Box result contains people results. // "ORGANIZATION" - One Box result contains organization results. // "SLACK" - One Box result contains slack results. + // "KNOWLEDGE_GRAPH" - One Box result contains Knowledge Graph search + // responses. OneBoxType string `json:"oneBoxType,omitempty"` // SearchResults: The search results for this One Box. SearchResults []*GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult `json:"searchResults,omitempty"` @@ -13492,6 +13618,30 @@ func (s GoogleCloudDiscoveryengineV1alphaServingConfig) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaServingConfigDataStore: Stores information +// regarding the serving configurations at DataStore level. +type GoogleCloudDiscoveryengineV1alphaServingConfigDataStore struct { + // DisabledForServing: If set true, the DataStore will not be available for + // serving search requests. + DisabledForServing bool `json:"disabledForServing,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisabledForServing") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisabledForServing") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaServingConfigDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigDataStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig: Specifies the // configurations needed for Generic Discovery.Currently we support: * // `content_search_spec`: configuration for generic content search. @@ -14199,8 +14349,8 @@ func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) UnmarshalJSON(data [] type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { // Engine: Required. The resource name of the engine that this tune applies to. // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}` Engine string `json:"engine,omitempty"` // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -14980,9 +15130,9 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be - // an alpha-numerical string with limit of 40 characters. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/customTuningModels/{custom_tuning_model}`. Model must be an + // alpha-numerical string with limit of 40 characters. Name string `json:"name,omitempty"` // TrainingStartTime: Timestamp the model training was initiated. TrainingStartTime string `json:"trainingStartTime,omitempty"` @@ -15047,6 +15197,11 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length // limit of 1024 characters. Name string `json:"name,omitempty"` + // NaturalLanguageQueryUnderstandingConfig: Optional. Configuration for Natural + // Language Query Understanding. + NaturalLanguageQueryUnderstandingConfig *GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig `json:"naturalLanguageQueryUnderstandingConfig,omitempty"` + // ServingConfigDataStore: Optional. Stores serving config at DataStore level. + ServingConfigDataStore *GoogleCloudDiscoveryengineV1betaServingConfigDataStore `json:"servingConfigDataStore,omitempty"` // SolutionTypes: The solutions that the data store enrolls. Available // solutions for each industry_vertical: * `MEDIA`: // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: @@ -15257,8 +15412,10 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { // digital parsing and layout parsing are supported. * `docx`: Override parsing // config for DOCX files, only digital parsing and layout parsing are // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. * `xlsx`: Override parsing config - // for XLSX files, only digital parsing and layout parsing are supported. + // parsing and layout parsing are supported. * `xlsm`: Override parsing config + // for XLSM files, only digital parsing and layout parsing are supported. * + // `xlsx`: Override parsing config for XLSX files, only digital parsing and + // layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -15466,9 +15623,9 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // Name: Immutable. The fully qualified resource name of the engine. This field // must be a UTF-8 encoded string with a length limit of 1024 characters. // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. + // Otherwise, an INVALID_ARGUMENT error is returned. Name string `json:"name,omitempty"` // SearchEngineConfig: Configurations for the Search Engine. Only applicable if // solution_type is SOLUTION_TYPE_SEARCH. @@ -16206,14 +16363,44 @@ func (s GoogleCloudDiscoveryengineV1betaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig: +// Configuration for Natural Language Query Understanding. +type GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig struct { + // Mode: Mode of Natural Language Query Understanding. If this field is unset, + // the behavior defaults to + // NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value. + // "DISABLED" - Natural Language Query Understanding is disabled. + // "ENABLED" - Natural Language Query Understanding is enabled. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a // Google Cloud project in the service. type GoogleCloudDiscoveryengineV1betaProject struct { // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in + // `projects/{project}`. Note that when making requests, project number and + // project id are both acceptable, but the server will always respond in // project number. Name string `json:"name,omitempty"` // ProvisionCompletionTime: Output only. The timestamp when this project is @@ -17120,6 +17307,16 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec s // skip generating summaries for adversarial queries and return fallback // messages instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. The default value is `false`. If this field is set to // `false`, all search results are used regardless of relevance to generate @@ -17658,6 +17855,30 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) Marsha return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaServingConfigDataStore: Stores information +// regarding the serving configurations at DataStore level. +type GoogleCloudDiscoveryengineV1betaServingConfigDataStore struct { + // DisabledForServing: If set true, the DataStore will not be available for + // serving search requests. + DisabledForServing bool `json:"disabledForServing,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisabledForServing") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisabledForServing") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaServingConfigDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigDataStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification // information for target sites in advanced site search. type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { @@ -17879,8 +18100,8 @@ func (s GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { // Engine: Required. The resource name of the engine that this tune applies to. // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}` Engine string `json:"engine,omitempty"` // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -19709,8 +19930,8 @@ type ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall struc // GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. // // - name: Full DocumentProcessingConfig resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/documentProcessingConfig`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/documentProcessingConfig`. func (r *ProjectsLocationsCollectionsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { c := &ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -22369,10 +22590,10 @@ type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { // create already exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -22484,8 +22705,8 @@ type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -22583,8 +22804,8 @@ type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { // Get: Gets a Control. // // - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -22693,10 +22914,10 @@ type ProjectsLocationsCollectionsDataStoresControlsListCall struct { // List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -22962,12 +23183,12 @@ type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { // Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/-` to activate auto session mode, which +// automatically creates a new conversation inside a ConverseConversation +// session. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -23071,8 +23292,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { // exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -23175,8 +23396,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { // exist, a NOT_FOUND error is returned. // // - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -23274,8 +23495,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { // Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -23384,8 +23605,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { // List: Lists all Conversations by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -25244,8 +25465,8 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { // does not exist. // // - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/servingConfigs/{serving_config_id}`. func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -25354,8 +25575,8 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { // List: Lists all ServingConfigs linked to this dataStore. // // - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}`. func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -25854,8 +26075,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { // ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -25958,8 +26179,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -26057,8 +26278,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { // Get: Gets a Session. // // - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -26167,8 +26388,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { // List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -26443,8 +26664,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { // Get: Gets a Answer. // // - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine_id}/sessions/{session_id}/answers/{answer_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28996,8 +29217,8 @@ type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { // // - parent: The resource name of the catalog under which the events are // created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto -// res/${dataStoreId}`. +// `projects/{project}/locations/global/collections/{collection}/dataStores/{d +// ataStore}`. func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -29690,8 +29911,8 @@ type ProjectsLocationsCollectionsEnginesPatchCall struct { // - name: Immutable. The fully qualified resource name of the engine. This // field must be a UTF-8 encoded string with a length limit of 1024 // characters. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}` engine should be 1-63 characters, and valid characters are +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}` engine should be 1-63 characters, and valid characters are // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -29804,8 +30025,8 @@ type ProjectsLocationsCollectionsEnginesPauseCall struct { // SolutionType is SOLUTION_TYPE_RECOMMENDATION. // // - name: The name of the engine to pause. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -29909,8 +30130,8 @@ type ProjectsLocationsCollectionsEnginesResumeCall struct { // SolutionType is SOLUTION_TYPE_RECOMMENDATION. // // - name: The name of the engine to resume. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -30014,8 +30235,8 @@ type ProjectsLocationsCollectionsEnginesTuneCall struct { // SOLUTION_TYPE_RECOMMENDATION. // // - name: The resource name of the engine to tune. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -30120,10 +30341,10 @@ type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { // create already exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsEnginesControlsCreateCall { c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -30235,8 +30456,8 @@ type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -30334,8 +30555,8 @@ type ProjectsLocationsCollectionsEnginesControlsGetCall struct { // Get: Gets a Control. // // - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { c := &ProjectsLocationsCollectionsEnginesControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -30444,10 +30665,10 @@ type ProjectsLocationsCollectionsEnginesControlsListCall struct { // List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -30713,12 +30934,12 @@ type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { // Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/-` to activate auto session mode, which +// automatically creates a new conversation inside a ConverseConversation +// session. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -30822,8 +31043,8 @@ type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { // exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -30926,8 +31147,8 @@ type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { // exist, a NOT_FOUND error is returned. // // - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -31025,8 +31246,8 @@ type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { // Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -31135,8 +31356,8 @@ type ProjectsLocationsCollectionsEnginesConversationsListCall struct { // List: Lists all Conversations by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -31781,8 +32002,8 @@ type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { // does not exist. // // - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/servingConfigs/{serving_config_id}`. func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -31891,8 +32112,8 @@ type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { // List: Lists all ServingConfigs linked to this dataStore. // // - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}`. func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -32391,8 +32612,8 @@ type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { // ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -32495,8 +32716,8 @@ type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -32594,8 +32815,8 @@ type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { // Get: Gets a Session. // // - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -32704,8 +32925,8 @@ type ProjectsLocationsCollectionsEnginesSessionsListCall struct { // List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -32980,8 +33201,8 @@ type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { // Get: Gets a Answer. // // - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine_id}/sessions/{session_id}/answers/{answer_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -33862,8 +34083,8 @@ type ProjectsLocationsDataStoresGetDocumentProcessingConfigCall struct { // GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. // // - name: Full DocumentProcessingConfig resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/documentProcessingConfig`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/documentProcessingConfig`. func (r *ProjectsLocationsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { c := &ProjectsLocationsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -36417,10 +36638,10 @@ type ProjectsLocationsDataStoresControlsCreateCall struct { // create already exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsDataStoresControlsCreateCall { c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -36532,8 +36753,8 @@ type ProjectsLocationsDataStoresControlsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { c := &ProjectsLocationsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -36631,8 +36852,8 @@ type ProjectsLocationsDataStoresControlsGetCall struct { // Get: Gets a Control. // // - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -36741,10 +36962,10 @@ type ProjectsLocationsDataStoresControlsListCall struct { // List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -37010,12 +37231,12 @@ type ProjectsLocationsDataStoresConversationsConverseCall struct { // Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/-` to activate auto session mode, which +// automatically creates a new conversation inside a ConverseConversation +// session. func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -37119,8 +37340,8 @@ type ProjectsLocationsDataStoresConversationsCreateCall struct { // exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -37223,8 +37444,8 @@ type ProjectsLocationsDataStoresConversationsDeleteCall struct { // exist, a NOT_FOUND error is returned. // // - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -37322,8 +37543,8 @@ type ProjectsLocationsDataStoresConversationsGetCall struct { // Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -37432,8 +37653,8 @@ type ProjectsLocationsDataStoresConversationsListCall struct { // List: Lists all Conversations by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -38921,8 +39142,8 @@ type ProjectsLocationsDataStoresServingConfigsGetCall struct { // does not exist. // // - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/servingConfigs/{serving_config_id}`. func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -39031,8 +39252,8 @@ type ProjectsLocationsDataStoresServingConfigsListCall struct { // List: Lists all ServingConfigs linked to this dataStore. // // - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}`. func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -39531,8 +39752,8 @@ type ProjectsLocationsDataStoresSessionsCreateCall struct { // ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsDataStoresSessionsCreateCall { c := &ProjectsLocationsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -39635,8 +39856,8 @@ type ProjectsLocationsDataStoresSessionsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsDataStoresSessionsService) Delete(name string) *ProjectsLocationsDataStoresSessionsDeleteCall { c := &ProjectsLocationsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -39734,8 +39955,8 @@ type ProjectsLocationsDataStoresSessionsGetCall struct { // Get: Gets a Session. // // - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsLocationsDataStoresSessionsGetCall { c := &ProjectsLocationsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -39844,8 +40065,8 @@ type ProjectsLocationsDataStoresSessionsListCall struct { // List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresSessionsService) List(parent string) *ProjectsLocationsDataStoresSessionsListCall { c := &ProjectsLocationsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -40120,8 +40341,8 @@ type ProjectsLocationsDataStoresSessionsAnswersGetCall struct { // Get: Gets a Answer. // // - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine_id}/sessions/{session_id}/answers/{answer_id}`. func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c := &ProjectsLocationsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -41680,8 +41901,8 @@ type ProjectsLocationsDataStoresUserEventsPurgeCall struct { // // - parent: The resource name of the catalog under which the events are // created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto -// res/${dataStoreId}`. +// `projects/{project}/locations/global/collections/{collection}/dataStores/{d +// ataStore}`. func (r *ProjectsLocationsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsDataStoresUserEventsPurgeCall { c := &ProjectsLocationsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -43153,8 +43374,8 @@ type ProjectsLocationsRankingConfigsRankCall struct { // Rank: Ranks a list of text records based on the given input query. // // - rankingConfig: The resource name of the rank service config, such as -// `projects/{project_num}/locations/{location_id}/rankingConfigs/default_rank -// ing_config`. +// `projects/{project_num}/locations/{location}/rankingConfigs/default_ranking +// _config`. func (r *ProjectsLocationsRankingConfigsService) Rank(rankingConfig string, googleclouddiscoveryenginev1alpharankrequest *GoogleCloudDiscoveryengineV1alphaRankRequest) *ProjectsLocationsRankingConfigsRankCall { c := &ProjectsLocationsRankingConfigsRankCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.rankingConfig = rankingConfig diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 3cac54c9e17..dbb78bba9de 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -14,7 +14,7 @@ "canonicalName": "Discovery Engine", "description": "Discovery Engine API.", "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/discovery-engine/docs", + "documentationLink": "https://cloud.google.com/generative-ai-app-builder/docs/", "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", @@ -921,7 +921,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -949,7 +949,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -974,7 +974,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -1015,7 +1015,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1078,7 +1078,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -1106,7 +1106,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1134,7 +1134,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -1159,7 +1159,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -1205,7 +1205,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1697,7 +1697,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -1733,7 +1733,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + "description": "Required. Full resource name of the parent resource. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1852,7 +1852,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -1880,7 +1880,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -1905,7 +1905,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -1951,7 +1951,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -2014,7 +2014,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", + "description": "Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", "required": true, @@ -2644,7 +2644,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -2835,7 +2835,7 @@ ], "parameters": { "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -2869,7 +2869,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The name of the engine to pause. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -2897,7 +2897,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The name of the engine to resume. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -2925,7 +2925,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The resource name of the engine to tune. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -2962,7 +2962,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -2990,7 +2990,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", "required": true, @@ -3015,7 +3015,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", "required": true, @@ -3056,7 +3056,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3119,7 +3119,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", "required": true, @@ -3147,7 +3147,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3175,7 +3175,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", "required": true, @@ -3200,7 +3200,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", "required": true, @@ -3246,7 +3246,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3407,7 +3407,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -3443,7 +3443,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + "description": "Required. Full resource name of the parent resource. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3562,7 +3562,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3590,7 +3590,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", "required": true, @@ -3615,7 +3615,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", "required": true, @@ -3661,7 +3661,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, @@ -3724,7 +3724,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", + "description": "Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/answers/[^/]+$", "required": true, @@ -4495,7 +4495,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -4523,7 +4523,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to delete. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -4548,7 +4548,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", "required": true, @@ -4589,7 +4589,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}` or `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -4652,7 +4652,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -4680,7 +4680,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -4708,7 +4708,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -4733,7 +4733,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + "description": "Required. The resource name of the Conversation to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", "required": true, @@ -4779,7 +4779,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5170,7 +5170,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", "required": true, @@ -5206,7 +5206,7 @@ "type": "string" }, "parent": { - "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + "description": "Required. Full resource name of the parent resource. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5325,7 +5325,7 @@ ], "parameters": { "parent": { - "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. Full resource name of parent data store. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5353,7 +5353,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -5378,7 +5378,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", "required": true, @@ -5424,7 +5424,7 @@ "type": "string" }, "parent": { - "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5487,7 +5487,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", + "description": "Required. The resource name of the Answer to get. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", "required": true, @@ -5911,7 +5911,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -6240,7 +6240,7 @@ ], "parameters": { "rankingConfig": { - "description": "Required. The resource name of the rank service config, such as `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.", + "description": "Required. The resource name of the rank service config, such as `projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/rankingConfigs/[^/]+$", "required": true, @@ -6786,7 +6786,7 @@ } } }, - "revision": "20240829", + "revision": "20240912", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -7289,6 +7289,10 @@ "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, + "servingConfigDataStore": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigDataStore", + "description": "Optional. Stores serving config at DataStore level." + }, "solutionTypes": { "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { @@ -7432,7 +7436,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsm`: Override parsing config for XLSM files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -7589,7 +7593,7 @@ "type": "string" }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, "searchEngineConfig": { @@ -7932,7 +7936,7 @@ "type": "string" }, "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "description": "Output only. Full resource name of the project, for example `projects/{project}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", "readOnly": true, "type": "string" }, @@ -8145,6 +8149,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1ServingConfigDataStore": { + "description": "Stores information regarding the serving configurations at DataStore level.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigDataStore", + "properties": { + "disabledForServing": { + "description": "If set true, the DataStore will not be available for serving search requests.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1SiteVerificationInfo": { "description": "Verification information for target sites in advanced site search.", "id": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", @@ -8832,7 +8847,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result. .", "type": "object" }, "title": { @@ -9254,7 +9269,7 @@ "type": "string" }, "name": { - "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}` model must be an alpha-numerical string with limit of 40 characters.", + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`. Model must be an alpha-numerical string with limit of 40 characters.", "type": "string" }, "trainingStartTime": { @@ -9339,6 +9354,14 @@ "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, + "naturalLanguageQueryUnderstandingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", + "description": "Optional. Configuration for Natural Language Query Understanding." + }, + "servingConfigDataStore": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfigDataStore", + "description": "Optional. Stores serving config at DataStore level." + }, "solutionTypes": { "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { @@ -9482,7 +9505,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsm`: Override parsing config for XLSM files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -9643,7 +9666,7 @@ "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, "recommendationMetadata": { @@ -10532,6 +10555,27 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig": { + "description": "Configuration for Natural Language Query Understanding.", + "id": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", + "properties": { + "mode": { + "description": "Mode of Natural Language Query Understanding. If this field is unset, the behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value.", + "Natural Language Query Understanding is disabled.", + "Natural Language Query Understanding is enabled." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaProject": { "description": "Metadata and configurations for a Google Cloud project in the service.", "id": "GoogleCloudDiscoveryengineV1alphaProject", @@ -10543,7 +10587,7 @@ "type": "string" }, "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "description": "Output only. Full resource name of the project, for example `projects/{project}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", "readOnly": true, "type": "string" }, @@ -11348,6 +11392,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", "type": "boolean" @@ -11646,6 +11694,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaServingConfigDataStore": { + "description": "Stores information regarding the serving configurations at DataStore level.", + "id": "GoogleCloudDiscoveryengineV1alphaServingConfigDataStore", + "properties": { + "disabledForServing": { + "description": "If set true, the DataStore will not be available for serving search requests.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSession": { "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1alphaSession", @@ -11916,7 +11975,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", "properties": { "engine": { - "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "type": "string" } }, @@ -12191,7 +12250,8 @@ "description": "Answer generation specification." }, "asynchronousMode": { - "description": "Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", + "deprecated": true, + "description": "Deprecated: This field is deprecated. Streaming Answer API will be supported. Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", "type": "boolean" }, "query": { @@ -12244,6 +12304,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.", "type": "boolean" @@ -12470,6 +12534,25 @@ "content": { "description": "Chunk textual content.", "type": "string" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata", + "description": "Metadata of the document from the current chunk." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata": { + "description": "Document metadata contains the information of the document of the current chunk.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata", + "properties": { + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "Uri of the document.", + "type": "string" } }, "type": "object" @@ -12483,14 +12566,15 @@ "type": "string" }, "documentContexts": { - "description": "List of document contexts.", + "description": "List of document contexts. The content will be used for Answer Generation. This is supposed to be the main content of the document that can be long and comprehensive.", "items": { "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext" }, "type": "array" }, "extractiveAnswers": { - "description": "List of extractive answers.", + "deprecated": true, + "description": "Deprecated: This field is deprecated and will have no effect on the Answer generation. Please use document_contexts and extractive_segments fields. List of extractive answers.", "items": { "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer" }, @@ -12519,7 +12603,7 @@ "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext", "properties": { "content": { - "description": "Document content.", + "description": "Document content to be used for answer generation.", "type": "string" }, "pageIdentifier": { @@ -12545,7 +12629,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment": { - "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)", + "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) Answer generation will only use it if document_contexts is empty. This is supposed to be shorter snippets.", "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment", "properties": { "content": { @@ -12861,7 +12945,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document, or the Chunk in search result. .", "type": "object" }, "title": { @@ -12997,13 +13081,13 @@ "$ref": "GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue", "description": "The value of the matcher that was used to match the Document." }, - "status": { - "description": "The status of the document.", + "state": { + "description": "The state of the document.", "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_INDEXED", - "STATUS_NOT_IN_TARGET_SITE", - "STATUS_NOT_IN_INDEX" + "STATE_UNSPECIFIED", + "INDEXED", + "NOT_IN_TARGET_SITE", + "NOT_IN_INDEX" ], "enumDescriptions": [ "Should never be set.", @@ -13857,7 +13941,7 @@ "type": "boolean" }, "servingConfig": { - "description": "The resource name of the Serving Config to use. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", + "description": "The resource name of the Serving Config to use. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", "type": "string" }, "summarySpec": { @@ -14066,7 +14150,7 @@ "type": "string" }, "name": { - "description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}` model must be an alpha-numerical string with limit of 40 characters.", + "description": "Required. The fully qualified resource name of the model. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`. Model must be an alpha-numerical string with limit of 40 characters.", "type": "string" }, "trainingStartTime": { @@ -14142,6 +14226,14 @@ "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, + "naturalLanguageQueryUnderstandingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig", + "description": "Optional. Configuration for Natural Language Query Understanding." + }, + "servingConfigDataStore": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfigDataStore", + "description": "Optional. Stores serving config at DataStore level." + }, "solutionTypes": { "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { @@ -14383,7 +14475,7 @@ "type": "boolean" }, "name": { - "description": "The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", + "description": "The Document resource full name, of the form: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", "type": "string" }, "promotionIds": { @@ -14425,7 +14517,7 @@ "additionalProperties": { "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported. * `xlsm`: Override parsing config for XLSM files, only digital parsing and layout parsing are supported. * `xlsx`: Override parsing config for XLSX files, only digital parsing and layout parsing are supported.", "type": "object" } }, @@ -14614,7 +14706,7 @@ "type": "string" }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, "searchEngineConfig": { @@ -15785,6 +15877,27 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig": { + "description": "Configuration for Natural Language Query Understanding.", + "id": "GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig", + "properties": { + "mode": { + "description": "Mode of Natural Language Query Understanding. If this field is unset, the behavior defaults to NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED.", + "enum": [ + "MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value.", + "Natural Language Query Understanding is disabled.", + "Natural Language Query Understanding is enabled." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaPageInfo": { "description": "Detailed page information.", "id": "GoogleCloudDiscoveryengineV1betaPageInfo", @@ -15850,7 +15963,7 @@ "type": "string" }, "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "description": "Output only. Full resource name of the project, for example `projects/{project}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", "readOnly": true, "type": "string" }, @@ -16337,6 +16450,10 @@ "description": "Request message for SiteSearchEngineService.RecrawlUris method.", "id": "GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest", "properties": { + "siteCredential": { + "description": "Optional. Full resource name of the SiteCredential, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`. Only set to crawl private URIs.", + "type": "string" + }, "uris": { "description": "Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in `site_search_engine`.", "items": { @@ -16898,6 +17015,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, "ignoreLowRelevantContent": { "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", "type": "boolean" @@ -17558,13 +17679,15 @@ "ONE_BOX_TYPE_UNSPECIFIED", "PEOPLE", "ORGANIZATION", - "SLACK" + "SLACK", + "KNOWLEDGE_GRAPH" ], "enumDescriptions": [ "Default value. Should not be used.", "One Box result contains people results.", "One Box result contains organization results.", - "One Box result contains slack results." + "One Box result contains slack results.", + "One Box result contains Knowledge Graph search responses." ], "type": "string" }, @@ -17945,6 +18068,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaServingConfigDataStore": { + "description": "Stores information regarding the serving configurations at DataStore level.", + "id": "GoogleCloudDiscoveryengineV1betaServingConfigDataStore", + "properties": { + "disabledForServing": { + "description": "If set true, the DataStore will not be available for serving search requests.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig": { "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", "id": "GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig", @@ -18388,7 +18522,7 @@ "id": "GoogleCloudDiscoveryengineV1betaTuneEngineMetadata", "properties": { "engine": { - "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`", "type": "string" } }, diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 8d0283b2013..4cdb3ac1de5 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -6,7 +6,7 @@ // Package discoveryengine provides access to the Discovery Engine API. // -// For product documentation, see: https://cloud.google.com/discovery-engine/docs +// For product documentation, see: https://cloud.google.com/generative-ai-app-builder/docs/ // // # Library status // @@ -1614,6 +1614,8 @@ type GoogleCloudDiscoveryengineV1DataStore struct { // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length // limit of 1024 characters. Name string `json:"name,omitempty"` + // ServingConfigDataStore: Optional. Stores serving config at DataStore level. + ServingConfigDataStore *GoogleCloudDiscoveryengineV1ServingConfigDataStore `json:"servingConfigDataStore,omitempty"` // SolutionTypes: The solutions that the data store enrolls. Available // solutions for each industry_vertical: * `MEDIA`: // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: @@ -1824,8 +1826,10 @@ type GoogleCloudDiscoveryengineV1DocumentProcessingConfig struct { // digital parsing and layout parsing are supported. * `docx`: Override parsing // config for DOCX files, only digital parsing and layout parsing are // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. * `xlsx`: Override parsing config - // for XLSX files, only digital parsing and layout parsing are supported. + // parsing and layout parsing are supported. * `xlsm`: Override parsing config + // for XLSM files, only digital parsing and layout parsing are supported. * + // `xlsx`: Override parsing config for XLSX files, only digital parsing and + // layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -2033,9 +2037,9 @@ type GoogleCloudDiscoveryengineV1Engine struct { // Name: Immutable. The fully qualified resource name of the engine. This field // must be a UTF-8 encoded string with a length limit of 1024 characters. // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. + // Otherwise, an INVALID_ARGUMENT error is returned. Name string `json:"name,omitempty"` // SearchEngineConfig: Configurations for the Search Engine. Only applicable if // solution_type is SOLUTION_TYPE_SEARCH. @@ -2508,8 +2512,8 @@ type GoogleCloudDiscoveryengineV1Project struct { // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in + // `projects/{project}`. Note that when making requests, project number and + // project id are both acceptable, but the server will always respond in // project number. Name string `json:"name,omitempty"` // ProvisionCompletionTime: Output only. The timestamp when this project is @@ -2785,6 +2789,30 @@ func (s GoogleCloudDiscoveryengineV1Schema) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1ServingConfigDataStore: Stores information +// regarding the serving configurations at DataStore level. +type GoogleCloudDiscoveryengineV1ServingConfigDataStore struct { + // DisabledForServing: If set true, the DataStore will not be available for + // serving search requests. + DisabledForServing bool `json:"disabledForServing,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisabledForServing") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisabledForServing") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfigDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigDataStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1SiteVerificationInfo: Verification information // for target sites in advanced site search. type GoogleCloudDiscoveryengineV1SiteVerificationInfo struct { @@ -3592,8 +3620,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult st // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document , or the Chunk in - // search result . + // It's populated from the struct data from the Document, or the Chunk in + // search result. . StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` @@ -4203,9 +4231,9 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be - // an alpha-numerical string with limit of 40 characters. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/customTuningModels/{custom_tuning_model}`. Model must be an + // alpha-numerical string with limit of 40 characters. Name string `json:"name,omitempty"` // TrainingStartTime: Timestamp the model training was initiated. TrainingStartTime string `json:"trainingStartTime,omitempty"` @@ -4280,6 +4308,11 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length // limit of 1024 characters. Name string `json:"name,omitempty"` + // NaturalLanguageQueryUnderstandingConfig: Optional. Configuration for Natural + // Language Query Understanding. + NaturalLanguageQueryUnderstandingConfig *GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig `json:"naturalLanguageQueryUnderstandingConfig,omitempty"` + // ServingConfigDataStore: Optional. Stores serving config at DataStore level. + ServingConfigDataStore *GoogleCloudDiscoveryengineV1alphaServingConfigDataStore `json:"servingConfigDataStore,omitempty"` // SolutionTypes: The solutions that the data store enrolls. Available // solutions for each industry_vertical: * `MEDIA`: // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: @@ -4490,8 +4523,10 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // digital parsing and layout parsing are supported. * `docx`: Override parsing // config for DOCX files, only digital parsing and layout parsing are // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. * `xlsx`: Override parsing config - // for XLSX files, only digital parsing and layout parsing are supported. + // parsing and layout parsing are supported. * `xlsm`: Override parsing config + // for XLSM files, only digital parsing and layout parsing are supported. * + // `xlsx`: Override parsing config for XLSX files, only digital parsing and + // layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -4703,9 +4738,9 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // Name: Immutable. The fully qualified resource name of the engine. This field // must be a UTF-8 encoded string with a length limit of 1024 characters. // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. + // Otherwise, an INVALID_ARGUMENT error is returned. Name string `json:"name,omitempty"` // RecommendationMetadata: Output only. Additional information of a // recommendation engine. Only applicable if solution_type is @@ -5901,14 +5936,44 @@ func (s GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig: +// Configuration for Natural Language Query Understanding. +type GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig struct { + // Mode: Mode of Natural Language Query Understanding. If this field is unset, + // the behavior defaults to + // NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value. + // "DISABLED" - Natural Language Query Understanding is disabled. + // "ENABLED" - Natural Language Query Understanding is enabled. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaProject: Metadata and configurations for a // Google Cloud project in the service. type GoogleCloudDiscoveryengineV1alphaProject struct { // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in + // `projects/{project}`. Note that when making requests, project number and + // project id are both acceptable, but the server will always respond in // project number. Name string `json:"name,omitempty"` // ProvisionCompletionTime: Output only. The timestamp when this project is @@ -7079,6 +7144,16 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec // skip generating summaries for adversarial queries and return fallback // messages instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. The default value is `false`. If this field is set to // `false`, all search results are used regardless of relevance to generate @@ -7617,6 +7692,30 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) Marsh return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaServingConfigDataStore: Stores information +// regarding the serving configurations at DataStore level. +type GoogleCloudDiscoveryengineV1alphaServingConfigDataStore struct { + // DisabledForServing: If set true, the DataStore will not be available for + // serving search requests. + DisabledForServing bool `json:"disabledForServing,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisabledForServing") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisabledForServing") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaServingConfigDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigDataStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. type GoogleCloudDiscoveryengineV1alphaSession struct { // EndTime: Output only. The time the session finished. @@ -7935,8 +8034,8 @@ func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse) MarshalJSON() type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { // Engine: Required. The resource name of the engine that this tune applies to. // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}` Engine string `json:"engine,omitempty"` // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -8258,7 +8357,8 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerCitationSource) MarshalJSON() ([]b type GoogleCloudDiscoveryengineV1betaAnswerQueryRequest struct { // AnswerGenerationSpec: Answer generation specification. AnswerGenerationSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec `json:"answerGenerationSpec,omitempty"` - // AsynchronousMode: Asynchronous mode control. If enabled, the response will + // AsynchronousMode: Deprecated: This field is deprecated. Streaming Answer API + // will be supported. Asynchronous mode control. If enabled, the response will // be returned with answer/session resource name without final answer. The API // users need to do the polling to get the latest status of answer/session by // calling ConversationalSearchService.GetAnswer or @@ -8334,6 +8434,16 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec stru // skip generating answers for adversarial queries and return fallback messages // instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. If this field is set to `false`, all search results are used // regardless of relevance to generate answers. If set to `true` or unset, the @@ -8691,6 +8801,8 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultLis Chunk string `json:"chunk,omitempty"` // Content: Chunk textual content. Content string `json:"content,omitempty"` + // DocumentMetadata: Metadata of the document from the current chunk. + DocumentMetadata *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata `json:"documentMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -8709,14 +8821,44 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResult return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS +// earchResultChunkInfoDocumentMetadata: Document metadata contains the +// information of the document of the current chunk. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata struct { + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: Uri of the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Title") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfoDocumentMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS // earchResultUnstructuredDocumentInfo: Unstructured document information. type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo struct { // Document: Document resource name. Document string `json:"document,omitempty"` - // DocumentContexts: List of document contexts. + // DocumentContexts: List of document contexts. The content will be used for + // Answer Generation. This is supposed to be the main content of the document + // that can be long and comprehensive. DocumentContexts []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext `json:"documentContexts,omitempty"` - // ExtractiveAnswers: List of extractive answers. + // ExtractiveAnswers: Deprecated: This field is deprecated and will have no + // effect on the Answer generation. Please use document_contexts and + // extractive_segments fields. List of extractive answers. ExtractiveAnswers []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer `json:"extractiveAnswers,omitempty"` // ExtractiveSegments: List of extractive segments. ExtractiveSegments []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment `json:"extractiveSegments,omitempty"` @@ -8745,7 +8887,7 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResult // GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS // earchResultUnstructuredDocumentInfoDocumentContext: Document context. type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext struct { - // Content: Document content. + // Content: Document content to be used for answer generation. Content string `json:"content,omitempty"` // PageIdentifier: Page identifier. PageIdentifier string `json:"pageIdentifier,omitempty"` @@ -8798,6 +8940,8 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResult // earchResultUnstructuredDocumentInfoExtractiveSegment: Extractive segment. // Guide // (https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) +// Answer generation will only use it if document_contexts is empty. This is +// supposed to be shorter snippets. type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment struct { // Content: Extractive segment content. Content string `json:"content,omitempty"` @@ -9207,8 +9351,8 @@ type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult str // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document , or the Chunk in - // search result . + // It's populated from the struct data from the Document, or the Chunk in + // search result. . StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` @@ -9436,15 +9580,15 @@ type GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMe LastRefreshedTime string `json:"lastRefreshedTime,omitempty"` // MatcherValue: The value of the matcher that was used to match the Document. MatcherValue *GoogleCloudDiscoveryengineV1betaBatchGetDocumentsMetadataResponseDocumentMetadataMatcherValue `json:"matcherValue,omitempty"` - // Status: The status of the document. + // State: The state of the document. // // Possible values: - // "STATUS_UNSPECIFIED" - Should never be set. - // "STATUS_INDEXED" - The Document is indexed. - // "STATUS_NOT_IN_TARGET_SITE" - The Document is not indexed because its URI - // is not in the TargetSite. - // "STATUS_NOT_IN_INDEX" - The Document is not indexed. - Status string `json:"status,omitempty"` + // "STATE_UNSPECIFIED" - Should never be set. + // "INDEXED" - The Document is indexed. + // "NOT_IN_TARGET_SITE" - The Document is not indexed because its URI is not + // in the TargetSite. + // "NOT_IN_INDEX" - The Document is not indexed. + State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "DataIngestionSource") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -10625,9 +10769,9 @@ type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { // SafeSearch: Whether to turn on safe search. SafeSearch bool `json:"safeSearch,omitempty"` // ServingConfig: The resource name of the Serving Config to use. Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection}/d - // ataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not - // set, the default serving config will be used. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the + // default serving config will be used. ServingConfig string `json:"servingConfig,omitempty"` // SummarySpec: A specification for configuring the summary returned in the // response. @@ -10910,9 +11054,9 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // ModelVersion: The version of the model. ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be - // an alpha-numerical string with limit of 40 characters. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/customTuningModels/{custom_tuning_model}`. Model must be an + // alpha-numerical string with limit of 40 characters. Name string `json:"name,omitempty"` // TrainingStartTime: Timestamp the model training was initiated. TrainingStartTime string `json:"trainingStartTime,omitempty"` @@ -10977,6 +11121,11 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length // limit of 1024 characters. Name string `json:"name,omitempty"` + // NaturalLanguageQueryUnderstandingConfig: Optional. Configuration for Natural + // Language Query Understanding. + NaturalLanguageQueryUnderstandingConfig *GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig `json:"naturalLanguageQueryUnderstandingConfig,omitempty"` + // ServingConfigDataStore: Optional. Stores serving config at DataStore level. + ServingConfigDataStore *GoogleCloudDiscoveryengineV1betaServingConfigDataStore `json:"servingConfigDataStore,omitempty"` // SolutionTypes: The solutions that the data store enrolls. Available // solutions for each industry_vertical: * `MEDIA`: // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: @@ -11310,8 +11459,8 @@ type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { // data store. Joined bool `json:"joined,omitempty"` // Name: The Document resource full name, of the form: - // `projects/{project_id}/locations/{location}/collections/{collection_id}/dataS - // tores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}/branches/{branch_id}/documents/{document_id}` Name string `json:"name,omitempty"` // PromotionIds: The promotion IDs associated with this Document. Currently, // this field is restricted to at most one ID. @@ -11364,8 +11513,10 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { // digital parsing and layout parsing are supported. * `docx`: Override parsing // config for DOCX files, only digital parsing and layout parsing are // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. * `xlsx`: Override parsing config - // for XLSX files, only digital parsing and layout parsing are supported. + // parsing and layout parsing are supported. * `xlsm`: Override parsing config + // for XLSM files, only digital parsing and layout parsing are supported. * + // `xlsx`: Override parsing config for XLSX files, only digital parsing and + // layout parsing are supported. ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or @@ -11640,9 +11791,9 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // Name: Immutable. The fully qualified resource name of the engine. This field // must be a UTF-8 encoded string with a length limit of 1024 characters. // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // `projects/{project}/locations/{location}/collections/{collection}/engines/{en + // gine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. + // Otherwise, an INVALID_ARGUMENT error is returned. Name string `json:"name,omitempty"` // SearchEngineConfig: Configurations for the Search Engine. Only applicable if // solution_type is SOLUTION_TYPE_SEARCH. @@ -13367,6 +13518,36 @@ func (s *GoogleCloudDiscoveryengineV1betaMediaInfo) UnmarshalJSON(data []byte) e return nil } +// GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig: +// Configuration for Natural Language Query Understanding. +type GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig struct { + // Mode: Mode of Natural Language Query Understanding. If this field is unset, + // the behavior defaults to + // NaturalLanguageQueryUnderstandingConfig.Mode.DISABLED. + // + // Possible values: + // "MODE_UNSPECIFIED" - Default value. + // "DISABLED" - Natural Language Query Understanding is disabled. + // "ENABLED" - Natural Language Query Understanding is enabled. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaNaturalLanguageQueryUnderstandingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaPageInfo: Detailed page information. type GoogleCloudDiscoveryengineV1betaPageInfo struct { // PageCategory: The most specific category associated with a category page. To @@ -13456,8 +13637,8 @@ type GoogleCloudDiscoveryengineV1betaProject struct { // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in + // `projects/{project}`. Note that when making requests, project number and + // project id are both acceptable, but the server will always respond in // project number. Name string `json:"name,omitempty"` // ProvisionCompletionTime: Output only. The timestamp when this project is @@ -14223,19 +14404,23 @@ func (s GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult) M // GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest: Request message for // SiteSearchEngineService.RecrawlUris method. type GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest struct { + // SiteCredential: Optional. Full resource name of the SiteCredential, such as + // `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCrede + // ntials/*`. Only set to crawl private URIs. + SiteCredential string `json:"siteCredential,omitempty"` // Uris: Required. List of URIs to crawl. At most 10K URIs are supported, // otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at // least one TargetSite in `site_search_engine`. Uris []string `json:"uris,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uris") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "SiteCredential") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uris") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "SiteCredential") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -15097,6 +15282,16 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec s // skip generating summaries for adversarial queries and return fallback // messages instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` // IgnoreLowRelevantContent: Specifies whether to filter out queries that have // low relevance. The default value is `false`. If this field is set to // `false`, all search results are used regardless of relevance to generate @@ -16121,6 +16316,8 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseOneBoxResult struct { // "PEOPLE" - One Box result contains people results. // "ORGANIZATION" - One Box result contains organization results. // "SLACK" - One Box result contains slack results. + // "KNOWLEDGE_GRAPH" - One Box result contains Knowledge Graph search + // responses. OneBoxType string `json:"oneBoxType,omitempty"` // SearchResults: The search results for this One Box. SearchResults []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"searchResults,omitempty"` @@ -16625,6 +16822,30 @@ func (s GoogleCloudDiscoveryengineV1betaServingConfig) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaServingConfigDataStore: Stores information +// regarding the serving configurations at DataStore level. +type GoogleCloudDiscoveryengineV1betaServingConfigDataStore struct { + // DisabledForServing: If set true, the DataStore will not be available for + // serving search requests. + DisabledForServing bool `json:"disabledForServing,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisabledForServing") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisabledForServing") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaServingConfigDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigDataStore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig: Specifies the // configurations needed for Generic Discovery.Currently we support: * // `content_search_spec`: configuration for generic content search. @@ -17265,8 +17486,8 @@ func (s *GoogleCloudDiscoveryengineV1betaTransactionInfo) UnmarshalJSON(data []b type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { // Engine: Required. The resource name of the engine that this tune applies to. // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}` Engine string `json:"engine,omitempty"` // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -20647,10 +20868,10 @@ type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { // create already exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -20762,8 +20983,8 @@ type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -20861,8 +21082,8 @@ type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { // Get: Gets a Control. // // - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -20971,10 +21192,10 @@ type ProjectsLocationsCollectionsDataStoresControlsListCall struct { // List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -21240,12 +21461,12 @@ type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { // Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/-` to activate auto session mode, which +// automatically creates a new conversation inside a ConverseConversation +// session. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21349,8 +21570,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { // exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -21453,8 +21674,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { // exist, a NOT_FOUND error is returned. // // - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21552,8 +21773,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { // Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -21662,8 +21883,8 @@ type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { // List: Lists all Conversations by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -23522,8 +23743,8 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { // does not exist. // // - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/servingConfigs/{serving_config_id}`. func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -23632,8 +23853,8 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { // List: Lists all ServingConfigs linked to this dataStore. // // - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}`. func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -24132,8 +24353,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { // ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -24236,8 +24457,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -24335,8 +24556,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { // Get: Gets a Session. // // - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -24445,8 +24666,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { // List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -24721,8 +24942,8 @@ type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { // Get: Gets a Answer. // // - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine_id}/sessions/{session_id}/answers/{answer_id}`. func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -27060,8 +27281,8 @@ type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { // // - parent: The resource name of the catalog under which the events are // created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto -// res/${dataStoreId}`. +// `projects/{project}/locations/global/collections/{collection}/dataStores/{d +// ataStore}`. func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1betapurgeusereventsrequest *GoogleCloudDiscoveryengineV1betaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -27754,8 +27975,8 @@ type ProjectsLocationsCollectionsEnginesPatchCall struct { // - name: Immutable. The fully qualified resource name of the engine. This // field must be a UTF-8 encoded string with a length limit of 1024 // characters. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}` engine should be 1-63 characters, and valid characters are +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}` engine should be 1-63 characters, and valid characters are // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -27868,8 +28089,8 @@ type ProjectsLocationsCollectionsEnginesPauseCall struct { // SolutionType is SOLUTION_TYPE_RECOMMENDATION. // // - name: The name of the engine to pause. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -27973,8 +28194,8 @@ type ProjectsLocationsCollectionsEnginesResumeCall struct { // SolutionType is SOLUTION_TYPE_RECOMMENDATION. // // - name: The name of the engine to resume. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28078,8 +28299,8 @@ type ProjectsLocationsCollectionsEnginesTuneCall struct { // SOLUTION_TYPE_RECOMMENDATION. // // - name: The resource name of the engine to tune. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28184,10 +28405,10 @@ type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { // create already exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsEnginesControlsCreateCall { c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -28299,8 +28520,8 @@ type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28398,8 +28619,8 @@ type ProjectsLocationsCollectionsEnginesControlsGetCall struct { // Get: Gets a Control. // // - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { c := &ProjectsLocationsCollectionsEnginesControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28508,10 +28729,10 @@ type ProjectsLocationsCollectionsEnginesControlsListCall struct { // List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -28777,12 +28998,12 @@ type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { // Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/-` to activate auto session mode, which +// automatically creates a new conversation inside a ConverseConversation +// session. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28886,8 +29107,8 @@ type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { // exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -28990,8 +29211,8 @@ type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { // exist, a NOT_FOUND error is returned. // // - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -29089,8 +29310,8 @@ type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { // Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -29199,8 +29420,8 @@ type ProjectsLocationsCollectionsEnginesConversationsListCall struct { // List: Lists all Conversations by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -29845,8 +30066,8 @@ type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { // does not exist. // // - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/servingConfigs/{serving_config_id}`. func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -29955,8 +30176,8 @@ type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { // List: Lists all ServingConfigs linked to this dataStore. // // - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}`. func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -30455,8 +30676,8 @@ type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { // ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -30559,8 +30780,8 @@ type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -30658,8 +30879,8 @@ type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { // Get: Gets a Session. // // - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -30768,8 +30989,8 @@ type ProjectsLocationsCollectionsEnginesSessionsListCall struct { // List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -31044,8 +31265,8 @@ type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { // Get: Gets a Answer. // // - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine_id}/sessions/{session_id}/answers/{answer_id}`. func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -33839,10 +34060,10 @@ type ProjectsLocationsDataStoresControlsCreateCall struct { // create already exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsDataStoresControlsCreateCall { c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -33954,8 +34175,8 @@ type ProjectsLocationsDataStoresControlsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { c := &ProjectsLocationsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -34053,8 +34274,8 @@ type ProjectsLocationsDataStoresControlsGetCall struct { // Get: Gets a Control. // // - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}/controls/{control_id}`. func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -34163,10 +34384,10 @@ type ProjectsLocationsDataStoresControlsListCall struct { // List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}` or +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -34432,12 +34653,12 @@ type ProjectsLocationsDataStoresConversationsConverseCall struct { // Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/-` to activate auto session mode, which +// automatically creates a new conversation inside a ConverseConversation +// session. func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -34541,8 +34762,8 @@ type ProjectsLocationsDataStoresConversationsCreateCall struct { // exists, an ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -34645,8 +34866,8 @@ type ProjectsLocationsDataStoresConversationsDeleteCall struct { // exist, a NOT_FOUND error is returned. // // - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -34744,8 +34965,8 @@ type ProjectsLocationsDataStoresConversationsGetCall struct { // Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/conversations/{conversation_id}`. func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -34854,8 +35075,8 @@ type ProjectsLocationsDataStoresConversationsListCall struct { // List: Lists all Conversations by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -36343,8 +36564,8 @@ type ProjectsLocationsDataStoresServingConfigsGetCall struct { // does not exist. // // - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}/servingConfigs/{serving_config_id}`. func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -36453,8 +36674,8 @@ type ProjectsLocationsDataStoresServingConfigsListCall struct { // List: Lists all ServingConfigs linked to this dataStore. // // - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine}`. func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -36953,8 +37174,8 @@ type ProjectsLocationsDataStoresSessionsCreateCall struct { // ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsDataStoresSessionsCreateCall { c := &ProjectsLocationsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -37057,8 +37278,8 @@ type ProjectsLocationsDataStoresSessionsDeleteCall struct { // NOT_FOUND error is returned. // // - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsDataStoresSessionsService) Delete(name string) *ProjectsLocationsDataStoresSessionsDeleteCall { c := &ProjectsLocationsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -37156,8 +37377,8 @@ type ProjectsLocationsDataStoresSessionsGetCall struct { // Get: Gets a Session. // // - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}/sessions/{session_id}`. func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsLocationsDataStoresSessionsGetCall { c := &ProjectsLocationsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -37266,8 +37487,8 @@ type ProjectsLocationsDataStoresSessionsListCall struct { // List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store_id}`. func (r *ProjectsLocationsDataStoresSessionsService) List(parent string) *ProjectsLocationsDataStoresSessionsListCall { c := &ProjectsLocationsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -37542,8 +37763,8 @@ type ProjectsLocationsDataStoresSessionsAnswersGetCall struct { // Get: Gets a Answer. // // - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +// `projects/{project}/locations/{location}/collections/{collection}/engines/{ +// engine_id}/sessions/{session_id}/answers/{answer_id}`. func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c := &ProjectsLocationsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -39102,8 +39323,8 @@ type ProjectsLocationsDataStoresUserEventsPurgeCall struct { // // - parent: The resource name of the catalog under which the events are // created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto -// res/${dataStoreId}`. +// `projects/{project}/locations/global/collections/{collection}/dataStores/{d +// ataStore}`. func (r *ProjectsLocationsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1betapurgeusereventsrequest *GoogleCloudDiscoveryengineV1betaPurgeUserEventsRequest) *ProjectsLocationsDataStoresUserEventsPurgeCall { c := &ProjectsLocationsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -40317,8 +40538,8 @@ type ProjectsLocationsRankingConfigsRankCall struct { // Rank: Ranks a list of text records based on the given input query. // // - rankingConfig: The resource name of the rank service config, such as -// `projects/{project_num}/locations/{location_id}/rankingConfigs/default_rank -// ing_config`. +// `projects/{project_num}/locations/{location}/rankingConfigs/default_ranking +// _config`. func (r *ProjectsLocationsRankingConfigsService) Rank(rankingConfig string, googleclouddiscoveryenginev1betarankrequest *GoogleCloudDiscoveryengineV1betaRankRequest) *ProjectsLocationsRankingConfigsRankCall { c := &ProjectsLocationsRankingConfigsRankCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.rankingConfig = rankingConfig diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index d9c1608026c..cdf811e960e 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -9267,7 +9267,7 @@ } } }, - "revision": "20240808", + "revision": "20240905", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -16191,7 +16191,7 @@ }, "pacing": { "$ref": "Pacing", - "description": "Required. The budget spending speed setting of the insertion order." + "description": "Required. The budget spending speed setting of the insertion order. *Warning*: Starting on **November 5, 2024**, pacing_type `PACING_TYPE_ASAP` will no longer be compatible with pacing_period `PACING_PERIOD_FLIGHT`. [Read more about this announced change](/display-video/api/deprecations#features.io_asap)." }, "partnerCosts": { "description": "The partner costs associated with the insertion order. If absent or empty in CreateInsertionOrder method, the newly created insertion order will inherit partner costs from the partner settings.", @@ -18843,7 +18843,7 @@ "type": "string" }, "pacingType": { - "description": "Required. The type of pacing that defines how the budget amount will be spent across the pacing_period.", + "description": "Required. The type of pacing that defines how the budget amount will be spent across the pacing_period. *Warning*: Starting on **November 5, 2024**, `PACING_TYPE_ASAP` will no longer be compatible with pacing_period `PACING_PERIOD_FLIGHT` for insertion orders. [Read more about this announced change](/display-video/api/deprecations#features.io_asap).", "enum": [ "PACING_TYPE_UNSPECIFIED", "PACING_TYPE_AHEAD", @@ -20060,8 +20060,8 @@ "Content related to motor vehicle, aviation or other transportation accidents.", "Issues that evoke strong, opposing views and spark debate. These include issues that are controversial in most countries and markets (such as abortion), as well as those that are controversial in specific countries and markets (such as immigration reform in the United States).", "Content which may be considered shocking or disturbing, such as violent news stories, stunts, or toilet humor.", - "YouTube videos embedded on websites outside of YouTube.com. Only applicable to YouTube and Partners line items.", - "Video of live events streamed over the internet. Only applicable to YouTube and Partners line items." + "YouTube videos embedded on websites outside of YouTube.com. Only applicable to YouTube and Partners line items. *Warning*: On **September 30, 2024**, this value will be sunset. [Read more about this announced change](/display-video/api/deprecations#features.yt_li_categories).", + "Video of live events streamed over the internet. Only applicable to YouTube and Partners line items. *Warning*: On **September 30, 2024**, this value will be sunset. [Read more about this announced change](/display-video/api/deprecations#features.yt_li_categories)." ], "type": "string" } @@ -20115,8 +20115,8 @@ "Content related to motor vehicle, aviation or other transportation accidents.", "Issues that evoke strong, opposing views and spark debate. These include issues that are controversial in most countries and markets (such as abortion), as well as those that are controversial in specific countries and markets (such as immigration reform in the United States).", "Content which may be considered shocking or disturbing, such as violent news stories, stunts, or toilet humor.", - "YouTube videos embedded on websites outside of YouTube.com. Only applicable to YouTube and Partners line items.", - "Video of live events streamed over the internet. Only applicable to YouTube and Partners line items." + "YouTube videos embedded on websites outside of YouTube.com. Only applicable to YouTube and Partners line items. *Warning*: On **September 30, 2024**, this value will be sunset. [Read more about this announced change](/display-video/api/deprecations#features.yt_li_categories).", + "Video of live events streamed over the internet. Only applicable to YouTube and Partners line items. *Warning*: On **September 30, 2024**, this value will be sunset. [Read more about this announced change](/display-video/api/deprecations#features.yt_li_categories)." ], "readOnly": true, "type": "string" diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index a3b6eea601c..ad9c2789962 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -8591,6 +8591,10 @@ type InsertionOrder struct { // Name: Output only. The resource name of the insertion order. Name string `json:"name,omitempty"` // Pacing: Required. The budget spending speed setting of the insertion order. + // *Warning*: Starting on **November 5, 2024**, pacing_type `PACING_TYPE_ASAP` + // will no longer be compatible with pacing_period `PACING_PERIOD_FLIGHT`. Read + // more about this announced change + // (/display-video/api/deprecations#features.io_asap). Pacing *Pacing `json:"pacing,omitempty"` // PartnerCosts: The partner costs associated with the insertion order. If // absent or empty in CreateInsertionOrder method, the newly created insertion @@ -11902,7 +11906,10 @@ type Pacing struct { // flight duration. PacingPeriod string `json:"pacingPeriod,omitempty"` // PacingType: Required. The type of pacing that defines how the budget amount - // will be spent across the pacing_period. + // will be spent across the pacing_period. *Warning*: Starting on **November 5, + // 2024**, `PACING_TYPE_ASAP` will no longer be compatible with pacing_period + // `PACING_PERIOD_FLIGHT` for insertion orders. Read more about this announced + // change (/display-video/api/deprecations#features.io_asap). // // Possible values: // "PACING_TYPE_UNSPECIFIED" - Pacing mode value is not specified or is @@ -13419,8 +13426,14 @@ type SensitiveCategoryAssignedTargetingOptionDetails struct { // or disturbing, such as violent news stories, stunts, or toilet humor. // "SENSITIVE_CATEGORY_EMBEDDED_VIDEO" - YouTube videos embedded on websites // outside of YouTube.com. Only applicable to YouTube and Partners line items. + // *Warning*: On **September 30, 2024**, this value will be sunset. [Read more + // about this announced + // change](/display-video/api/deprecations#features.yt_li_categories). // "SENSITIVE_CATEGORY_LIVE_STREAMING_VIDEO" - Video of live events streamed // over the internet. Only applicable to YouTube and Partners line items. + // *Warning*: On **September 30, 2024**, this value will be sunset. [Read more + // about this announced + // change](/display-video/api/deprecations#features.yt_li_categories). ExcludedSensitiveCategory string `json:"excludedSensitiveCategory,omitempty"` // ForceSendFields is a list of field names (e.g. "ExcludedSensitiveCategory") // to unconditionally include in API requests. By default, fields with empty or @@ -13499,8 +13512,14 @@ type SensitiveCategoryTargetingOptionDetails struct { // or disturbing, such as violent news stories, stunts, or toilet humor. // "SENSITIVE_CATEGORY_EMBEDDED_VIDEO" - YouTube videos embedded on websites // outside of YouTube.com. Only applicable to YouTube and Partners line items. + // *Warning*: On **September 30, 2024**, this value will be sunset. [Read more + // about this announced + // change](/display-video/api/deprecations#features.yt_li_categories). // "SENSITIVE_CATEGORY_LIVE_STREAMING_VIDEO" - Video of live events streamed // over the internet. Only applicable to YouTube and Partners line items. + // *Warning*: On **September 30, 2024**, this value will be sunset. [Read more + // about this announced + // change](/display-video/api/deprecations#features.yt_li_categories). SensitiveCategory string `json:"sensitiveCategory,omitempty"` // ForceSendFields is a list of field names (e.g. "SensitiveCategory") to // unconditionally include in API requests. By default, fields with empty or diff --git a/displayvideo/v3/displayvideo-api.json b/displayvideo/v3/displayvideo-api.json index 3f440fcf0cb..d2494f03f2b 100644 --- a/displayvideo/v3/displayvideo-api.json +++ b/displayvideo/v3/displayvideo-api.json @@ -9222,7 +9222,7 @@ } } }, - "revision": "20240808", + "revision": "20240905", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -16925,7 +16925,7 @@ }, "pacing": { "$ref": "Pacing", - "description": "Required. The budget spending speed setting of the insertion order." + "description": "Required. The budget spending speed setting of the insertion order. *Warning*: Starting on **November 5, 2024**, pacing_type `PACING_TYPE_ASAP` will no longer be compatible with pacing_period `PACING_PERIOD_FLIGHT`. [Read more about this announced change](/display-video/api/deprecations#features.io_asap)." }, "partnerCosts": { "description": "The partner costs associated with the insertion order. If absent or empty in CreateInsertionOrder method, the newly created insertion order will inherit partner costs from the partner settings.", @@ -19594,7 +19594,7 @@ "type": "string" }, "pacingType": { - "description": "Required. The type of pacing that defines how the budget amount will be spent across the pacing_period.", + "description": "Required. The type of pacing that defines how the budget amount will be spent across the pacing_period. *Warning*: Starting on **November 5, 2024**, `PACING_TYPE_ASAP` will no longer be compatible with pacing_period `PACING_PERIOD_FLIGHT` for insertion orders. [Read more about this announced change](/display-video/api/deprecations#features.io_asap).", "enum": [ "PACING_TYPE_UNSPECIFIED", "PACING_TYPE_AHEAD", @@ -20831,8 +20831,8 @@ "Content related to motor vehicle, aviation or other transportation accidents.", "Issues that evoke strong, opposing views and spark debate. These include issues that are controversial in most countries and markets (such as abortion), as well as those that are controversial in specific countries and markets (such as immigration reform in the United States).", "Content which may be considered shocking or disturbing, such as violent news stories, stunts, or toilet humor.", - "YouTube videos embedded on websites outside of YouTube.com. Only applicable to YouTube and Partners line items.", - "Video of live events streamed over the internet. Only applicable to YouTube and Partners line items." + "YouTube videos embedded on websites outside of YouTube.com. Only applicable to YouTube and Partners line items. *Warning*: On **September 30, 2024**, this value will be sunset. [Read more about this announced change](/display-video/api/deprecations#features.yt_li_categories).", + "Video of live events streamed over the internet. Only applicable to YouTube and Partners line items. *Warning*: On **September 30, 2024**, this value will be sunset. [Read more about this announced change](/display-video/api/deprecations#features.yt_li_categories)." ], "type": "string" } @@ -20886,8 +20886,8 @@ "Content related to motor vehicle, aviation or other transportation accidents.", "Issues that evoke strong, opposing views and spark debate. These include issues that are controversial in most countries and markets (such as abortion), as well as those that are controversial in specific countries and markets (such as immigration reform in the United States).", "Content which may be considered shocking or disturbing, such as violent news stories, stunts, or toilet humor.", - "YouTube videos embedded on websites outside of YouTube.com. Only applicable to YouTube and Partners line items.", - "Video of live events streamed over the internet. Only applicable to YouTube and Partners line items." + "YouTube videos embedded on websites outside of YouTube.com. Only applicable to YouTube and Partners line items. *Warning*: On **September 30, 2024**, this value will be sunset. [Read more about this announced change](/display-video/api/deprecations#features.yt_li_categories).", + "Video of live events streamed over the internet. Only applicable to YouTube and Partners line items. *Warning*: On **September 30, 2024**, this value will be sunset. [Read more about this announced change](/display-video/api/deprecations#features.yt_li_categories)." ], "readOnly": true, "type": "string" @@ -21048,7 +21048,7 @@ "type": "boolean" }, "enableOptimizedTargeting": { - "description": "Required. Whether to enable Optimized Targeting for the line item.", + "description": "Required. Whether to enable Optimized Targeting for the line item. *Warning*: Starting on **September 30, 2024**, optimized targeting will no longer be compatible with a subset of bid strategies. [Read more about this announced change](/display-video/api/deprecations#features.ot_bid_strategies).", "type": "boolean" } }, diff --git a/displayvideo/v3/displayvideo-gen.go b/displayvideo/v3/displayvideo-gen.go index 6658a26a2e9..9926dfd0f6b 100644 --- a/displayvideo/v3/displayvideo-gen.go +++ b/displayvideo/v3/displayvideo-gen.go @@ -9385,6 +9385,10 @@ type InsertionOrder struct { // be used. OptimizationObjective string `json:"optimizationObjective,omitempty"` // Pacing: Required. The budget spending speed setting of the insertion order. + // *Warning*: Starting on **November 5, 2024**, pacing_type `PACING_TYPE_ASAP` + // will no longer be compatible with pacing_period `PACING_PERIOD_FLIGHT`. Read + // more about this announced change + // (/display-video/api/deprecations#features.io_asap). Pacing *Pacing `json:"pacing,omitempty"` // PartnerCosts: The partner costs associated with the insertion order. If // absent or empty in CreateInsertionOrder method, the newly created insertion @@ -12713,7 +12717,10 @@ type Pacing struct { // flight duration. PacingPeriod string `json:"pacingPeriod,omitempty"` // PacingType: Required. The type of pacing that defines how the budget amount - // will be spent across the pacing_period. + // will be spent across the pacing_period. *Warning*: Starting on **November 5, + // 2024**, `PACING_TYPE_ASAP` will no longer be compatible with pacing_period + // `PACING_PERIOD_FLIGHT` for insertion orders. Read more about this announced + // change (/display-video/api/deprecations#features.io_asap). // // Possible values: // "PACING_TYPE_UNSPECIFIED" - Pacing mode value is not specified or is @@ -14256,8 +14263,14 @@ type SensitiveCategoryAssignedTargetingOptionDetails struct { // or disturbing, such as violent news stories, stunts, or toilet humor. // "SENSITIVE_CATEGORY_EMBEDDED_VIDEO" - YouTube videos embedded on websites // outside of YouTube.com. Only applicable to YouTube and Partners line items. + // *Warning*: On **September 30, 2024**, this value will be sunset. [Read more + // about this announced + // change](/display-video/api/deprecations#features.yt_li_categories). // "SENSITIVE_CATEGORY_LIVE_STREAMING_VIDEO" - Video of live events streamed // over the internet. Only applicable to YouTube and Partners line items. + // *Warning*: On **September 30, 2024**, this value will be sunset. [Read more + // about this announced + // change](/display-video/api/deprecations#features.yt_li_categories). ExcludedSensitiveCategory string `json:"excludedSensitiveCategory,omitempty"` // ForceSendFields is a list of field names (e.g. "ExcludedSensitiveCategory") // to unconditionally include in API requests. By default, fields with empty or @@ -14336,8 +14349,14 @@ type SensitiveCategoryTargetingOptionDetails struct { // or disturbing, such as violent news stories, stunts, or toilet humor. // "SENSITIVE_CATEGORY_EMBEDDED_VIDEO" - YouTube videos embedded on websites // outside of YouTube.com. Only applicable to YouTube and Partners line items. + // *Warning*: On **September 30, 2024**, this value will be sunset. [Read more + // about this announced + // change](/display-video/api/deprecations#features.yt_li_categories). // "SENSITIVE_CATEGORY_LIVE_STREAMING_VIDEO" - Video of live events streamed // over the internet. Only applicable to YouTube and Partners line items. + // *Warning*: On **September 30, 2024**, this value will be sunset. [Read more + // about this announced + // change](/display-video/api/deprecations#features.yt_li_categories). SensitiveCategory string `json:"sensitiveCategory,omitempty"` // ForceSendFields is a list of field names (e.g. "SensitiveCategory") to // unconditionally include in API requests. By default, fields with empty or @@ -14567,7 +14586,10 @@ type TargetingExpansionConfig struct { // item and ad group resources. AudienceExpansionSeedListExcluded bool `json:"audienceExpansionSeedListExcluded,omitempty"` // EnableOptimizedTargeting: Required. Whether to enable Optimized Targeting - // for the line item. + // for the line item. *Warning*: Starting on **September 30, 2024**, optimized + // targeting will no longer be compatible with a subset of bid strategies. Read + // more about this announced change + // (/display-video/api/deprecations#features.ot_bid_strategies). EnableOptimizedTargeting bool `json:"enableOptimizedTargeting,omitempty"` // ForceSendFields is a list of field names (e.g. "AudienceExpansionLevel") to // unconditionally include in API requests. By default, fields with empty or diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index aaf83d7070d..9195debcc16 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1042,7 +1042,7 @@ } } }, - "revision": "20240813", + "revision": "20240911", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -5166,3354 +5166,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiV1beta1Barcode": { - "description": "Encodes the detailed information of a barcode.", - "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.", - "type": "string" - }, - "rawValue": { - "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.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse": { - "description": "Response to an batch document processing request. This is returned in the LRO Operation after the operation is complete.", - "id": "GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse", - "properties": { - "responses": { - "description": "Responses for each individual document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1ProcessDocumentResponse" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1BoundingPoly": { - "description": "A bounding polygon for the detected image annotation.", - "id": "GoogleCloudDocumentaiV1beta1BoundingPoly", - "properties": { - "normalizedVertices": { - "description": "The bounding polygon normalized vertices.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1NormalizedVertex" - }, - "type": "array" - }, - "vertices": { - "description": "The bounding polygon vertices.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1Vertex" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1Document": { - "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", - "id": "GoogleCloudDocumentaiV1beta1Document", - "properties": { - "chunkedDocument": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", - "description": "Document chunked based on chunking config." - }, - "content": { - "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", - "format": "byte", - "type": "string" - }, - "documentLayout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", - "description": "Parsed layout of the document." - }, - "entities": { - "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntity" - }, - "type": "array" - }, - "entityRelations": { - "description": "Placeholder. Relationship among Document.entities.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntityRelation" - }, - "type": "array" - }, - "error": { - "$ref": "GoogleRpcStatus", - "description": "Any error that occurred while processing this document." - }, - "mimeType": { - "description": "An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).", - "type": "string" - }, - "pages": { - "description": "Visual page layout for the Document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPage" - }, - "type": "array" - }, - "revisions": { - "description": "Placeholder. Revision history of this document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentRevision" - }, - "type": "array" - }, - "shardInfo": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentShardInfo", - "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." - }, - "text": { - "description": "Optional. UTF-8 encoded text in reading order from the document.", - "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.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextChange" - }, - "type": "array" - }, - "textStyles": { - "deprecated": true, - "description": "Styles for the Document.text.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentStyle" - }, - "type": "array" - }, - "uri": { - "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument": { - "description": "Represents the chunks that the document is divided into.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", - "properties": { - "chunks": { - "description": "List of chunks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk": { - "description": "Represents a chunk.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk", - "properties": { - "chunkId": { - "description": "ID of the chunk.", - "type": "string" - }, - "content": { - "description": "Text content of the chunk.", - "type": "string" - }, - "pageFooters": { - "description": "Page footers associated with the chunk.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter" - }, - "type": "array" - }, - "pageHeaders": { - "description": "Page headers associated with the chunk.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader" - }, - "type": "array" - }, - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the chunk." - }, - "sourceBlockIds": { - "description": "Unused.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter": { - "description": "Represents the page footer associated with the chunk.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter", - "properties": { - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the footer." - }, - "text": { - "description": "Footer in text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader": { - "description": "Represents the page header associated with the chunk.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader", - "properties": { - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the header." - }, - "text": { - "description": "Header in text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan": { - "description": "Represents where the chunk starts and ends in the document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", - "properties": { - "pageEnd": { - "description": "Page where chunk ends in the document.", - "format": "int32", - "type": "integer" - }, - "pageStart": { - "description": "Page where chunk starts in the document.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout": { - "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", - "properties": { - "blocks": { - "description": "List of blocks in the document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock": { - "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock", - "properties": { - "blockId": { - "description": "ID of the block.", - "type": "string" - }, - "listBlock": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", - "description": "Block consisting of list content/structure." - }, - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", - "description": "Page span of the block." - }, - "tableBlock": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", - "description": "Block consisting of table content/structure." - }, - "textBlock": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", - "description": "Block consisting of text content." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { - "description": "Represents a list type block.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", - "properties": { - "listEntries": { - "description": "List entries that constitute a list block.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" - }, - "type": "array" - }, - "type": { - "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { - "description": "Represents an entry in the list.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", - "properties": { - "blocks": { - "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { - "description": "Represents where the block starts and ends in the document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", - "properties": { - "pageEnd": { - "description": "Page where block ends in the document.", - "format": "int32", - "type": "integer" - }, - "pageStart": { - "description": "Page where block starts in the document.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { - "description": "Represents a table type block.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", - "properties": { - "bodyRows": { - "description": "Body rows containing main table content.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" - }, - "type": "array" - }, - "caption": { - "description": "Table caption/title.", - "type": "string" - }, - "headerRows": { - "description": "Header rows at the top of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { - "description": "Represents a cell in a table row.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", - "properties": { - "blocks": { - "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - }, - "colSpan": { - "description": "How many columns this cell spans.", - "format": "int32", - "type": "integer" - }, - "rowSpan": { - "description": "How many rows this cell spans.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { - "description": "Represents a row in a table.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", - "properties": { - "cells": { - "description": "A table row is a list of table cells.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { - "description": "Represents a text type block.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", - "properties": { - "blocks": { - "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - }, - "text": { - "description": "Text content stored in the block.", - "type": "string" - }, - "type": { - "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentEntity": { - "description": "An entity that could be a 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.", - "id": "GoogleCloudDocumentaiV1beta1DocumentEntity", - "properties": { - "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "id": { - "description": "Optional. Canonical id. This will be a unique value in the entity list for this document.", - "type": "string" - }, - "mentionId": { - "description": "Optional. Deprecated. Use `id` field instead.", - "type": "string" - }, - "mentionText": { - "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", - "type": "string" - }, - "normalizedValue": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue", - "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." - }, - "pageAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageAnchor", - "description": "Optional. Represents the provenance of this entity wrt. the location on the page where it was found." - }, - "properties": { - "description": "Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntity" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "description": "Optional. The history of this annotation." - }, - "redacted": { - "description": "Optional. Whether the entity will be redacted for de-identification purposes.", - "type": "boolean" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." - }, - "type": { - "description": "Required. Entity type from a schema e.g. `Address`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue": { - "description": "Parsed and normalized entity value.", - "id": "GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue", - "properties": { - "addressValue": { - "$ref": "GoogleTypePostalAddress", - "description": "Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto" - }, - "booleanValue": { - "description": "Boolean value. Can be used for entities with binary values, or for checkboxes.", - "type": "boolean" - }, - "dateValue": { - "$ref": "GoogleTypeDate", - "description": "Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto" - }, - "datetimeValue": { - "$ref": "GoogleTypeDateTime", - "description": "DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto" - }, - "floatValue": { - "description": "Float value.", - "format": "float", - "type": "number" - }, - "integerValue": { - "description": "Integer value.", - "format": "int32", - "type": "integer" - }, - "moneyValue": { - "$ref": "GoogleTypeMoney", - "description": "Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto" - }, - "text": { - "description": "Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentEntityRelation": { - "description": "Relationship between Entities.", - "id": "GoogleCloudDocumentaiV1beta1DocumentEntityRelation", - "properties": { - "objectId": { - "description": "Object entity id.", - "type": "string" - }, - "relation": { - "description": "Relationship description.", - "type": "string" - }, - "subjectId": { - "description": "Subject entity id.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPage": { - "description": "A page in a Document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPage", - "properties": { - "blocks": { - "description": "A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageBlock" - }, - "type": "array" - }, - "detectedBarcodes": { - "description": "A list of detected barcodes.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode" - }, - "type": "array" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "dimension": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDimension", - "description": "Physical dimension of the page." - }, - "formFields": { - "description": "A list of visually detected form fields on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageFormField" - }, - "type": "array" - }, - "image": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImage", - "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." - }, - "imageQualityScores": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", - "description": "Image quality scores." - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for the page." - }, - "lines": { - "description": "A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLine" - }, - "type": "array" - }, - "pageNumber": { - "description": "1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.", - "format": "int32", - "type": "integer" - }, - "paragraphs": { - "description": "A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageParagraph" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this page." - }, - "symbols": { - "description": "A list of visually detected symbols on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol" - }, - "type": "array" - }, - "tables": { - "description": "A list of visually detected tables on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTable" - }, - "type": "array" - }, - "tokens": { - "description": "A list of visually detected tokens on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageToken" - }, - "type": "array" - }, - "transforms": { - "description": "Transformation matrices that were applied to the original document image to produce Page.image.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageMatrix" - }, - "type": "array" - }, - "visualElements": { - "description": "A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageVisualElement" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageAnchor": { - "description": "Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageAnchor", - "properties": { - "pageRefs": { - "description": "One or more references to visual page elements", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef": { - "description": "Represents a weak reference to a page element within a document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef", - "properties": { - "boundingPoly": { - "$ref": "GoogleCloudDocumentaiV1beta1BoundingPoly", - "description": "Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it's referring to." - }, - "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "layoutId": { - "deprecated": true, - "description": "Optional. Deprecated. Use PageRef.bounding_poly instead.", - "type": "string" - }, - "layoutType": { - "description": "Optional. The type of the layout element that is being referenced if any.", - "enum": [ - "LAYOUT_TYPE_UNSPECIFIED", - "BLOCK", - "PARAGRAPH", - "LINE", - "TOKEN", - "VISUAL_ELEMENT", - "TABLE", - "FORM_FIELD" - ], - "enumDescriptions": [ - "Layout Unspecified.", - "References a Page.blocks element.", - "References a Page.paragraphs element.", - "References a Page.lines element.", - "References a Page.tokens element.", - "References a Page.visual_elements element.", - "Refrrences a Page.tables element.", - "References a Page.form_fields element." - ], - "type": "string" - }, - "page": { - "description": "Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageBlock": { - "description": "A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageBlock", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Block." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode": { - "description": "A detected barcode.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode", - "properties": { - "barcode": { - "$ref": "GoogleCloudDocumentaiV1beta1Barcode", - "description": "Detailed barcode information of the DetectedBarcode." - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for DetectedBarcode." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage": { - "description": "Detected language for a structural component.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage", - "properties": { - "confidence": { - "description": "Confidence of detected language. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "languageCode": { - "description": "The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageDimension": { - "description": "Dimension for the page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageDimension", - "properties": { - "height": { - "description": "Page height.", - "format": "float", - "type": "number" - }, - "unit": { - "description": "Dimension unit.", - "type": "string" - }, - "width": { - "description": "Page width.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageFormField": { - "description": "A form field detected on the page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageFormField", - "properties": { - "correctedKeyText": { - "description": "Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.", - "type": "string" - }, - "correctedValueText": { - "description": "Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.", - "type": "string" - }, - "fieldName": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc." - }, - "fieldValue": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for the FormField value." - }, - "nameDetectedLanguages": { - "description": "A list of detected languages for name together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "description": "The history of this annotation." - }, - "valueDetectedLanguages": { - "description": "A list of detected languages for value together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "valueType": { - "description": "If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageImage": { - "description": "Rendered image contents for this page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageImage", - "properties": { - "content": { - "description": "Raw byte content of the image.", - "format": "byte", - "type": "string" - }, - "height": { - "description": "Height of the image in pixels.", - "format": "int32", - "type": "integer" - }, - "mimeType": { - "description": "Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.", - "type": "string" - }, - "width": { - "description": "Width of the image in pixels.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores": { - "description": "Image quality scores for the page image.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", - "properties": { - "detectedDefects": { - "description": "A list of detected defects.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect" - }, - "type": "array" - }, - "qualityScore": { - "description": "The overall quality score. Range `[0, 1]` where `1` is perfect quality.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect": { - "description": "Image Quality Defects", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect", - "properties": { - "confidence": { - "description": "Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence 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`", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageLayout": { - "description": "Visual element describing a layout unit on a page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "properties": { - "boundingPoly": { - "$ref": "GoogleCloudDocumentaiV1beta1BoundingPoly", - "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]`.", - "format": "float", - "type": "number" - }, - "orientation": { - "description": "Detected orientation for the Layout.", - "enum": [ - "ORIENTATION_UNSPECIFIED", - "PAGE_UP", - "PAGE_RIGHT", - "PAGE_DOWN", - "PAGE_LEFT" - ], - "enumDescriptions": [ - "Unspecified orientation.", - "Orientation is aligned with page up.", - "Orientation is aligned with page right. Turn the head 90 degrees clockwise from upright to read.", - "Orientation is aligned with page down. Turn the head 180 degrees from upright to read.", - "Orientation is aligned with page left. Turn the head 90 degrees counterclockwise from upright to read." - ], - "type": "string" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Text anchor indexing into the Document.text." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageLine": { - "description": "A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageLine", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Line." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageMatrix": { - "description": "Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageMatrix", - "properties": { - "cols": { - "description": "Number of columns in the matrix.", - "format": "int32", - "type": "integer" - }, - "data": { - "description": "The matrix data.", - "format": "byte", - "type": "string" - }, - "rows": { - "description": "Number of rows in the matrix.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageParagraph": { - "description": "A collection of lines that a human would perceive as a paragraph.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageParagraph", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Paragraph." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageSymbol": { - "description": "A detected symbol.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Symbol." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTable": { - "description": "A table representation similar to HTML table structure.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTable", - "properties": { - "bodyRows": { - "description": "Body rows of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow" - }, - "type": "array" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "headerRows": { - "description": "Header rows of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Table." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this table." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell": { - "description": "A cell representation inside the table.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell", - "properties": { - "colSpan": { - "description": "How many columns this cell spans.", - "format": "int32", - "type": "integer" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for TableCell." - }, - "rowSpan": { - "description": "How many rows this cell spans.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow": { - "description": "A row of table cells.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow", - "properties": { - "cells": { - "description": "Cells that make up this row.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageToken": { - "description": "A detected token.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageToken", - "properties": { - "detectedBreak": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak", - "description": "Detected break at the end of a Token." - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Token." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - }, - "styleInfo": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo", - "description": "Text style attributes." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak": { - "description": "Detected break at the end of a Token.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak", - "properties": { - "type": { - "description": "Detected break type.", - "enum": [ - "TYPE_UNSPECIFIED", - "SPACE", - "WIDE_SPACE", - "HYPHEN" - ], - "enumDescriptions": [ - "Unspecified break type.", - "A single whitespace.", - "A wider whitespace.", - "A hyphen that indicates that a token has been split across lines." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo": { - "description": "Font and other text style attributes.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo", - "properties": { - "backgroundColor": { - "$ref": "GoogleTypeColor", - "description": "Color of the background." - }, - "bold": { - "description": "Whether the text is bold (equivalent to font_weight is at least `700`).", - "type": "boolean" - }, - "fontSize": { - "description": "Font size in points (`1` point is `¹⁄₇₂` inches).", - "format": "int32", - "type": "integer" - }, - "fontType": { - "description": "Name or style of the font.", - "type": "string" - }, - "fontWeight": { - "description": "TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.", - "format": "int32", - "type": "integer" - }, - "handwritten": { - "description": "Whether the text is handwritten.", - "type": "boolean" - }, - "italic": { - "description": "Whether the text is italic.", - "type": "boolean" - }, - "letterSpacing": { - "description": "Letter spacing in points.", - "format": "double", - "type": "number" - }, - "pixelFontSize": { - "description": "Font size in pixels, equal to _unrounded font_size_ * _resolution_ Ć· `72.0`.", - "format": "double", - "type": "number" - }, - "smallcaps": { - "description": "Whether the text is in small caps. This feature is not supported yet.", - "type": "boolean" - }, - "strikeout": { - "description": "Whether the text is strikethrough. This feature is not supported yet.", - "type": "boolean" - }, - "subscript": { - "description": "Whether the text is a subscript. This feature is not supported yet.", - "type": "boolean" - }, - "superscript": { - "description": "Whether the text is a superscript. This feature is not supported yet.", - "type": "boolean" - }, - "textColor": { - "$ref": "GoogleTypeColor", - "description": "Color of the text." - }, - "underlined": { - "description": "Whether the text is underlined.", - "type": "boolean" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageVisualElement": { - "description": "Detected non-text visual elements e.g. checkbox, signature etc. on the page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageVisualElement", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for VisualElement." - }, - "type": { - "description": "Type of the VisualElement.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentProvenance": { - "description": "Structure to identify provenance relationships between annotations in different revisions.", - "id": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "properties": { - "id": { - "deprecated": true, - "description": "The Id of this operation. Needs to be unique within the scope of the revision.", - "format": "int32", - "type": "integer" - }, - "parents": { - "description": "References to the original elements that are replaced.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenanceParent" - }, - "type": "array" - }, - "revision": { - "deprecated": true, - "description": "The index of the revision that produced this element.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "The type of provenance operation.", - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "ADD", - "REMOVE", - "UPDATE", - "REPLACE", - "EVAL_REQUESTED", - "EVAL_APPROVED", - "EVAL_SKIPPED" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - true, - true, - true - ], - "enumDescriptions": [ - "Operation type unspecified. If no operation is specified a provenance entry is simply used to match against a `parent`.", - "Add an element.", - "Remove an element identified by `parent`.", - "Updates any fields within the given provenance scope of the message. It overwrites the fields rather than replacing them. Use this when you want to update a field value of an entity without also updating all the child properties.", - "Currently unused. Replace an element identified by `parent`.", - "Deprecated. Request human review for the element identified by `parent`.", - "Deprecated. Element is reviewed and approved at human review, confidence will be set to 1.0.", - "Deprecated. Element is skipped in the validation process." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentProvenanceParent": { - "description": "The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.", - "id": "GoogleCloudDocumentaiV1beta1DocumentProvenanceParent", - "properties": { - "id": { - "deprecated": true, - "description": "The id of the parent provenance.", - "format": "int32", - "type": "integer" - }, - "index": { - "description": "The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.", - "format": "int32", - "type": "integer" - }, - "revision": { - "description": "The index of the index into current revision's parent_ids list.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentRevision": { - "description": "Contains past or forward revisions of this document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentRevision", - "properties": { - "agent": { - "description": "If the change was made by a person specify the name or id of that person.", - "type": "string" - }, - "createTime": { - "description": "The time that the revision was created, internally generated by doc proto storage at the time of create.", - "format": "google-datetime", - "type": "string" - }, - "humanReview": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview", - "description": "Human Review information of this revision." - }, - "id": { - "description": "Id of the revision, internally generated by doc proto storage. Unique within the context of the document.", - "type": "string" - }, - "parent": { - "deprecated": true, - "description": "The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "parentIds": { - "description": "The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.", - "items": { - "type": "string" - }, - "type": "array" - }, - "processor": { - "description": "If the annotation was made by processor identify the processor by its resource name.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview": { - "description": "Human Review information of the document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview", - "properties": { - "state": { - "description": "Human review state. e.g. `requested`, `succeeded`, `rejected`.", - "type": "string" - }, - "stateMessage": { - "description": "A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentShardInfo": { - "description": "For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is.", - "id": "GoogleCloudDocumentaiV1beta1DocumentShardInfo", - "properties": { - "shardCount": { - "description": "Total number of shards.", - "format": "int64", - "type": "string" - }, - "shardIndex": { - "description": "The 0-based index of this shard.", - "format": "int64", - "type": "string" - }, - "textOffset": { - "description": "The index of the first character in Document.text in the overall document global text.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentStyle": { - "description": "Annotation for common text style attributes. This adheres to CSS conventions as much as possible.", - "id": "GoogleCloudDocumentaiV1beta1DocumentStyle", - "properties": { - "backgroundColor": { - "$ref": "GoogleTypeColor", - "description": "Text background color." - }, - "color": { - "$ref": "GoogleTypeColor", - "description": "Text color." - }, - "fontFamily": { - "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", - "type": "string" - }, - "fontSize": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentStyleFontSize", - "description": "Font size." - }, - "fontWeight": { - "description": "[Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.", - "type": "string" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Text anchor indexing into the Document.text." - }, - "textDecoration": { - "description": "[Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard. ", - "type": "string" - }, - "textStyle": { - "description": "[Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentStyleFontSize": { - "description": "Font size with unit.", - "id": "GoogleCloudDocumentaiV1beta1DocumentStyleFontSize", - "properties": { - "size": { - "description": "Font size for the text.", - "format": "float", - "type": "number" - }, - "unit": { - "description": "Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentTextAnchor": { - "description": "Text reference indexing into the Document.text.", - "id": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "properties": { - "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", - "type": "string" - }, - "textSegments": { - "description": "The text segments from the Document.text.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment": { - "description": "A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset", - "id": "GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment", - "properties": { - "endIndex": { - "description": "TextSegment half open end UTF-8 char index in the Document.text.", - "format": "int64", - "type": "string" - }, - "startIndex": { - "description": "TextSegment start UTF-8 char index in the Document.text.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentTextChange": { - "description": "This message is used for text changes aka. OCR corrections.", - "id": "GoogleCloudDocumentaiV1beta1DocumentTextChange", - "properties": { - "changedText": { - "description": "The text that replaces the text identified in the `text_anchor`.", - "type": "string" - }, - "provenance": { - "deprecated": true, - "description": "The history of this annotation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance" - }, - "type": "array" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1GcsDestination": { - "description": "The Google Cloud Storage location where the output file will be written to.", - "id": "GoogleCloudDocumentaiV1beta1GcsDestination", - "properties": { - "uri": { - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1GcsSource": { - "description": "The Google Cloud Storage location where the input file will be read from.", - "id": "GoogleCloudDocumentaiV1beta1GcsSource", - "properties": { - "uri": { - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1InputConfig": { - "description": "The desired input location and metadata.", - "id": "GoogleCloudDocumentaiV1beta1InputConfig", - "properties": { - "gcsSource": { - "$ref": "GoogleCloudDocumentaiV1beta1GcsSource", - "description": "The Google Cloud Storage location to read the input from. This must be a single file." - }, - "mimeType": { - "description": "Required. Mimetype of the input. Current supported mimetypes are application/pdf, image/tiff, and image/gif. In addition, application/json type is supported for requests with ProcessDocumentRequest.automl_params field set. The JSON file needs to be in Document format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1NormalizedVertex": { - "description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", - "id": "GoogleCloudDocumentaiV1beta1NormalizedVertex", - "properties": { - "x": { - "description": "X coordinate.", - "format": "float", - "type": "number" - }, - "y": { - "description": "Y coordinate (starts from the top of the image).", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1OperationMetadata": { - "description": "Contains metadata for the BatchProcessDocuments operation.", - "id": "GoogleCloudDocumentaiV1beta1OperationMetadata", - "properties": { - "createTime": { - "description": "The creation time of the operation.", - "format": "google-datetime", - "type": "string" - }, - "state": { - "description": "The state of the current batch processing.", - "enum": [ - "STATE_UNSPECIFIED", - "ACCEPTED", - "WAITING", - "RUNNING", - "SUCCEEDED", - "CANCELLED", - "FAILED" - ], - "enumDescriptions": [ - "The default value. This value is used if the state is omitted.", - "Request is received.", - "Request operation is waiting for scheduling.", - "Request is being processed.", - "The batch processing completed successfully.", - "The batch processing was cancelled.", - "The batch processing has failed." - ], - "type": "string" - }, - "stateMessage": { - "description": "A message providing more details about the current state of processing.", - "type": "string" - }, - "updateTime": { - "description": "The last update time of the operation.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1OutputConfig": { - "description": "The desired output location and metadata.", - "id": "GoogleCloudDocumentaiV1beta1OutputConfig", - "properties": { - "gcsDestination": { - "$ref": "GoogleCloudDocumentaiV1beta1GcsDestination", - "description": "The Google Cloud Storage location to write the output to." - }, - "pagesPerShard": { - "description": "The max number of pages to include into each output Document shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each containing 20 parsed pages will be written under the prefix OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1ProcessDocumentResponse": { - "description": "Response to a single document processing request.", - "id": "GoogleCloudDocumentaiV1beta1ProcessDocumentResponse", - "properties": { - "inputConfig": { - "$ref": "GoogleCloudDocumentaiV1beta1InputConfig", - "description": "Information about the input file. This is the same as the corresponding input config in the request." - }, - "outputConfig": { - "$ref": "GoogleCloudDocumentaiV1beta1OutputConfig", - "description": "The output location of the parsed responses. The responses are written to this location as JSON-serialized `Document` objects." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1Vertex": { - "description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", - "id": "GoogleCloudDocumentaiV1beta1Vertex", - "properties": { - "x": { - "description": "X coordinate.", - "format": "int32", - "type": "integer" - }, - "y": { - "description": "Y coordinate (starts from the top of the image).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2Barcode": { - "description": "Encodes the detailed information of a barcode.", - "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.", - "type": "string" - }, - "rawValue": { - "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.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse": { - "description": "Response to an batch document processing request. This is returned in the LRO Operation after the operation is complete.", - "id": "GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse", - "properties": { - "responses": { - "description": "Responses for each individual document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2ProcessDocumentResponse" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2BoundingPoly": { - "description": "A bounding polygon for the detected image annotation.", - "id": "GoogleCloudDocumentaiV1beta2BoundingPoly", - "properties": { - "normalizedVertices": { - "description": "The bounding polygon normalized vertices.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2NormalizedVertex" - }, - "type": "array" - }, - "vertices": { - "description": "The bounding polygon vertices.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2Vertex" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2Document": { - "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", - "id": "GoogleCloudDocumentaiV1beta2Document", - "properties": { - "chunkedDocument": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", - "description": "Document chunked based on chunking config." - }, - "content": { - "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", - "format": "byte", - "type": "string" - }, - "documentLayout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", - "description": "Parsed layout of the document." - }, - "entities": { - "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntity" - }, - "type": "array" - }, - "entityRelations": { - "description": "Placeholder. Relationship among Document.entities.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntityRelation" - }, - "type": "array" - }, - "error": { - "$ref": "GoogleRpcStatus", - "description": "Any error that occurred while processing this document." - }, - "labels": { - "description": "Labels for this document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentLabel" - }, - "type": "array" - }, - "mimeType": { - "description": "An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).", - "type": "string" - }, - "pages": { - "description": "Visual page layout for the Document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPage" - }, - "type": "array" - }, - "revisions": { - "description": "Placeholder. Revision history of this document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentRevision" - }, - "type": "array" - }, - "shardInfo": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentShardInfo", - "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." - }, - "text": { - "description": "Optional. UTF-8 encoded text in reading order from the document.", - "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.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextChange" - }, - "type": "array" - }, - "textStyles": { - "deprecated": true, - "description": "Styles for the Document.text.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentStyle" - }, - "type": "array" - }, - "uri": { - "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument": { - "description": "Represents the chunks that the document is divided into.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", - "properties": { - "chunks": { - "description": "List of chunks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk": { - "description": "Represents a chunk.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk", - "properties": { - "chunkId": { - "description": "ID of the chunk.", - "type": "string" - }, - "content": { - "description": "Text content of the chunk.", - "type": "string" - }, - "pageFooters": { - "description": "Page footers associated with the chunk.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter" - }, - "type": "array" - }, - "pageHeaders": { - "description": "Page headers associated with the chunk.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader" - }, - "type": "array" - }, - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the chunk." - }, - "sourceBlockIds": { - "description": "Unused.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter": { - "description": "Represents the page footer associated with the chunk.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter", - "properties": { - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the footer." - }, - "text": { - "description": "Footer in text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader": { - "description": "Represents the page header associated with the chunk.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader", - "properties": { - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the header." - }, - "text": { - "description": "Header in text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan": { - "description": "Represents where the chunk starts and ends in the document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", - "properties": { - "pageEnd": { - "description": "Page where chunk ends in the document.", - "format": "int32", - "type": "integer" - }, - "pageStart": { - "description": "Page where chunk starts in the document.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout": { - "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", - "properties": { - "blocks": { - "description": "List of blocks in the document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock": { - "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock", - "properties": { - "blockId": { - "description": "ID of the block.", - "type": "string" - }, - "listBlock": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", - "description": "Block consisting of list content/structure." - }, - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", - "description": "Page span of the block." - }, - "tableBlock": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", - "description": "Block consisting of table content/structure." - }, - "textBlock": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", - "description": "Block consisting of text content." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { - "description": "Represents a list type block.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", - "properties": { - "listEntries": { - "description": "List entries that constitute a list block.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" - }, - "type": "array" - }, - "type": { - "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { - "description": "Represents an entry in the list.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", - "properties": { - "blocks": { - "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { - "description": "Represents where the block starts and ends in the document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", - "properties": { - "pageEnd": { - "description": "Page where block ends in the document.", - "format": "int32", - "type": "integer" - }, - "pageStart": { - "description": "Page where block starts in the document.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { - "description": "Represents a table type block.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", - "properties": { - "bodyRows": { - "description": "Body rows containing main table content.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" - }, - "type": "array" - }, - "caption": { - "description": "Table caption/title.", - "type": "string" - }, - "headerRows": { - "description": "Header rows at the top of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { - "description": "Represents a cell in a table row.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", - "properties": { - "blocks": { - "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - }, - "colSpan": { - "description": "How many columns this cell spans.", - "format": "int32", - "type": "integer" - }, - "rowSpan": { - "description": "How many rows this cell spans.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { - "description": "Represents a row in a table.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", - "properties": { - "cells": { - "description": "A table row is a list of table cells.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { - "description": "Represents a text type block.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", - "properties": { - "blocks": { - "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - }, - "text": { - "description": "Text content stored in the block.", - "type": "string" - }, - "type": { - "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentEntity": { - "description": "An entity that could be a 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.", - "id": "GoogleCloudDocumentaiV1beta2DocumentEntity", - "properties": { - "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "id": { - "description": "Optional. Canonical id. This will be a unique value in the entity list for this document.", - "type": "string" - }, - "mentionId": { - "description": "Optional. Deprecated. Use `id` field instead.", - "type": "string" - }, - "mentionText": { - "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", - "type": "string" - }, - "normalizedValue": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue", - "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." - }, - "pageAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageAnchor", - "description": "Optional. Represents the provenance of this entity wrt. the location on the page where it was found." - }, - "properties": { - "description": "Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntity" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "description": "Optional. The history of this annotation." - }, - "redacted": { - "description": "Optional. Whether the entity will be redacted for de-identification purposes.", - "type": "boolean" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." - }, - "type": { - "description": "Required. Entity type from a schema e.g. `Address`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue": { - "description": "Parsed and normalized entity value.", - "id": "GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue", - "properties": { - "addressValue": { - "$ref": "GoogleTypePostalAddress", - "description": "Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto" - }, - "booleanValue": { - "description": "Boolean value. Can be used for entities with binary values, or for checkboxes.", - "type": "boolean" - }, - "dateValue": { - "$ref": "GoogleTypeDate", - "description": "Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto" - }, - "datetimeValue": { - "$ref": "GoogleTypeDateTime", - "description": "DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto" - }, - "floatValue": { - "description": "Float value.", - "format": "float", - "type": "number" - }, - "integerValue": { - "description": "Integer value.", - "format": "int32", - "type": "integer" - }, - "moneyValue": { - "$ref": "GoogleTypeMoney", - "description": "Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto" - }, - "text": { - "description": "Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentEntityRelation": { - "description": "Relationship between Entities.", - "id": "GoogleCloudDocumentaiV1beta2DocumentEntityRelation", - "properties": { - "objectId": { - "description": "Object entity id.", - "type": "string" - }, - "relation": { - "description": "Relationship description.", - "type": "string" - }, - "subjectId": { - "description": "Subject entity id.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentLabel": { - "description": "Label attaches schema information and/or other metadata to segments within a Document. Multiple Labels on a single field can denote either different labels, different instances of the same label created at different times, or some combination of both.", - "id": "GoogleCloudDocumentaiV1beta2DocumentLabel", - "properties": { - "automlModel": { - "description": "Label is generated AutoML model. This field stores the full resource name of the AutoML model. Format: `projects/{project-id}/locations/{location-id}/models/{model-id}`", - "type": "string" - }, - "confidence": { - "description": "Confidence score between 0 and 1 for label assignment.", - "format": "float", - "type": "number" - }, - "name": { - "description": "Name of the label. When the label is generated from AutoML Text Classification model, this field represents the name of the category.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPage": { - "description": "A page in a Document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPage", - "properties": { - "blocks": { - "description": "A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageBlock" - }, - "type": "array" - }, - "detectedBarcodes": { - "description": "A list of detected barcodes.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode" - }, - "type": "array" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "dimension": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDimension", - "description": "Physical dimension of the page." - }, - "formFields": { - "description": "A list of visually detected form fields on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageFormField" - }, - "type": "array" - }, - "image": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImage", - "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." - }, - "imageQualityScores": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", - "description": "Image quality scores." - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for the page." - }, - "lines": { - "description": "A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLine" - }, - "type": "array" - }, - "pageNumber": { - "description": "1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.", - "format": "int32", - "type": "integer" - }, - "paragraphs": { - "description": "A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageParagraph" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this page." - }, - "symbols": { - "description": "A list of visually detected symbols on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol" - }, - "type": "array" - }, - "tables": { - "description": "A list of visually detected tables on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTable" - }, - "type": "array" - }, - "tokens": { - "description": "A list of visually detected tokens on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageToken" - }, - "type": "array" - }, - "transforms": { - "description": "Transformation matrices that were applied to the original document image to produce Page.image.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageMatrix" - }, - "type": "array" - }, - "visualElements": { - "description": "A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageVisualElement" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageAnchor": { - "description": "Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageAnchor", - "properties": { - "pageRefs": { - "description": "One or more references to visual page elements", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef": { - "description": "Represents a weak reference to a page element within a document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef", - "properties": { - "boundingPoly": { - "$ref": "GoogleCloudDocumentaiV1beta2BoundingPoly", - "description": "Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it's referring to." - }, - "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "layoutId": { - "deprecated": true, - "description": "Optional. Deprecated. Use PageRef.bounding_poly instead.", - "type": "string" - }, - "layoutType": { - "description": "Optional. The type of the layout element that is being referenced if any.", - "enum": [ - "LAYOUT_TYPE_UNSPECIFIED", - "BLOCK", - "PARAGRAPH", - "LINE", - "TOKEN", - "VISUAL_ELEMENT", - "TABLE", - "FORM_FIELD" - ], - "enumDescriptions": [ - "Layout Unspecified.", - "References a Page.blocks element.", - "References a Page.paragraphs element.", - "References a Page.lines element.", - "References a Page.tokens element.", - "References a Page.visual_elements element.", - "Refrrences a Page.tables element.", - "References a Page.form_fields element." - ], - "type": "string" - }, - "page": { - "description": "Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageBlock": { - "description": "A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageBlock", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Block." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode": { - "description": "A detected barcode.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode", - "properties": { - "barcode": { - "$ref": "GoogleCloudDocumentaiV1beta2Barcode", - "description": "Detailed barcode information of the DetectedBarcode." - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for DetectedBarcode." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage": { - "description": "Detected language for a structural component.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage", - "properties": { - "confidence": { - "description": "Confidence of detected language. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "languageCode": { - "description": "The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageDimension": { - "description": "Dimension for the page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageDimension", - "properties": { - "height": { - "description": "Page height.", - "format": "float", - "type": "number" - }, - "unit": { - "description": "Dimension unit.", - "type": "string" - }, - "width": { - "description": "Page width.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageFormField": { - "description": "A form field detected on the page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageFormField", - "properties": { - "correctedKeyText": { - "description": "Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.", - "type": "string" - }, - "correctedValueText": { - "description": "Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.", - "type": "string" - }, - "fieldName": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc." - }, - "fieldValue": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for the FormField value." - }, - "nameDetectedLanguages": { - "description": "A list of detected languages for name together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "description": "The history of this annotation." - }, - "valueDetectedLanguages": { - "description": "A list of detected languages for value together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "valueType": { - "description": "If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageImage": { - "description": "Rendered image contents for this page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageImage", - "properties": { - "content": { - "description": "Raw byte content of the image.", - "format": "byte", - "type": "string" - }, - "height": { - "description": "Height of the image in pixels.", - "format": "int32", - "type": "integer" - }, - "mimeType": { - "description": "Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.", - "type": "string" - }, - "width": { - "description": "Width of the image in pixels.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores": { - "description": "Image quality scores for the page image.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", - "properties": { - "detectedDefects": { - "description": "A list of detected defects.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect" - }, - "type": "array" - }, - "qualityScore": { - "description": "The overall quality score. Range `[0, 1]` where `1` is perfect quality.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect": { - "description": "Image Quality Defects", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect", - "properties": { - "confidence": { - "description": "Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence 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`", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageLayout": { - "description": "Visual element describing a layout unit on a page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "properties": { - "boundingPoly": { - "$ref": "GoogleCloudDocumentaiV1beta2BoundingPoly", - "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]`.", - "format": "float", - "type": "number" - }, - "orientation": { - "description": "Detected orientation for the Layout.", - "enum": [ - "ORIENTATION_UNSPECIFIED", - "PAGE_UP", - "PAGE_RIGHT", - "PAGE_DOWN", - "PAGE_LEFT" - ], - "enumDescriptions": [ - "Unspecified orientation.", - "Orientation is aligned with page up.", - "Orientation is aligned with page right. Turn the head 90 degrees clockwise from upright to read.", - "Orientation is aligned with page down. Turn the head 180 degrees from upright to read.", - "Orientation is aligned with page left. Turn the head 90 degrees counterclockwise from upright to read." - ], - "type": "string" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Text anchor indexing into the Document.text." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageLine": { - "description": "A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageLine", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Line." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageMatrix": { - "description": "Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageMatrix", - "properties": { - "cols": { - "description": "Number of columns in the matrix.", - "format": "int32", - "type": "integer" - }, - "data": { - "description": "The matrix data.", - "format": "byte", - "type": "string" - }, - "rows": { - "description": "Number of rows in the matrix.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageParagraph": { - "description": "A collection of lines that a human would perceive as a paragraph.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageParagraph", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Paragraph." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageSymbol": { - "description": "A detected symbol.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Symbol." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTable": { - "description": "A table representation similar to HTML table structure.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTable", - "properties": { - "bodyRows": { - "description": "Body rows of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow" - }, - "type": "array" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "headerRows": { - "description": "Header rows of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Table." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this table." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell": { - "description": "A cell representation inside the table.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell", - "properties": { - "colSpan": { - "description": "How many columns this cell spans.", - "format": "int32", - "type": "integer" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for TableCell." - }, - "rowSpan": { - "description": "How many rows this cell spans.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow": { - "description": "A row of table cells.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow", - "properties": { - "cells": { - "description": "Cells that make up this row.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageToken": { - "description": "A detected token.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageToken", - "properties": { - "detectedBreak": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak", - "description": "Detected break at the end of a Token." - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Token." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - }, - "styleInfo": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo", - "description": "Text style attributes." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak": { - "description": "Detected break at the end of a Token.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak", - "properties": { - "type": { - "description": "Detected break type.", - "enum": [ - "TYPE_UNSPECIFIED", - "SPACE", - "WIDE_SPACE", - "HYPHEN" - ], - "enumDescriptions": [ - "Unspecified break type.", - "A single whitespace.", - "A wider whitespace.", - "A hyphen that indicates that a token has been split across lines." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo": { - "description": "Font and other text style attributes.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo", - "properties": { - "backgroundColor": { - "$ref": "GoogleTypeColor", - "description": "Color of the background." - }, - "bold": { - "description": "Whether the text is bold (equivalent to font_weight is at least `700`).", - "type": "boolean" - }, - "fontSize": { - "description": "Font size in points (`1` point is `¹⁄₇₂` inches).", - "format": "int32", - "type": "integer" - }, - "fontType": { - "description": "Name or style of the font.", - "type": "string" - }, - "fontWeight": { - "description": "TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.", - "format": "int32", - "type": "integer" - }, - "handwritten": { - "description": "Whether the text is handwritten.", - "type": "boolean" - }, - "italic": { - "description": "Whether the text is italic.", - "type": "boolean" - }, - "letterSpacing": { - "description": "Letter spacing in points.", - "format": "double", - "type": "number" - }, - "pixelFontSize": { - "description": "Font size in pixels, equal to _unrounded font_size_ * _resolution_ Ć· `72.0`.", - "format": "double", - "type": "number" - }, - "smallcaps": { - "description": "Whether the text is in small caps. This feature is not supported yet.", - "type": "boolean" - }, - "strikeout": { - "description": "Whether the text is strikethrough. This feature is not supported yet.", - "type": "boolean" - }, - "subscript": { - "description": "Whether the text is a subscript. This feature is not supported yet.", - "type": "boolean" - }, - "superscript": { - "description": "Whether the text is a superscript. This feature is not supported yet.", - "type": "boolean" - }, - "textColor": { - "$ref": "GoogleTypeColor", - "description": "Color of the text." - }, - "underlined": { - "description": "Whether the text is underlined.", - "type": "boolean" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageVisualElement": { - "description": "Detected non-text visual elements e.g. checkbox, signature etc. on the page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageVisualElement", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for VisualElement." - }, - "type": { - "description": "Type of the VisualElement.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentProvenance": { - "description": "Structure to identify provenance relationships between annotations in different revisions.", - "id": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "properties": { - "id": { - "deprecated": true, - "description": "The Id of this operation. Needs to be unique within the scope of the revision.", - "format": "int32", - "type": "integer" - }, - "parents": { - "description": "References to the original elements that are replaced.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenanceParent" - }, - "type": "array" - }, - "revision": { - "deprecated": true, - "description": "The index of the revision that produced this element.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "The type of provenance operation.", - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "ADD", - "REMOVE", - "UPDATE", - "REPLACE", - "EVAL_REQUESTED", - "EVAL_APPROVED", - "EVAL_SKIPPED" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - true, - true, - true - ], - "enumDescriptions": [ - "Operation type unspecified. If no operation is specified a provenance entry is simply used to match against a `parent`.", - "Add an element.", - "Remove an element identified by `parent`.", - "Updates any fields within the given provenance scope of the message. It overwrites the fields rather than replacing them. Use this when you want to update a field value of an entity without also updating all the child properties.", - "Currently unused. Replace an element identified by `parent`.", - "Deprecated. Request human review for the element identified by `parent`.", - "Deprecated. Element is reviewed and approved at human review, confidence will be set to 1.0.", - "Deprecated. Element is skipped in the validation process." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentProvenanceParent": { - "description": "The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.", - "id": "GoogleCloudDocumentaiV1beta2DocumentProvenanceParent", - "properties": { - "id": { - "deprecated": true, - "description": "The id of the parent provenance.", - "format": "int32", - "type": "integer" - }, - "index": { - "description": "The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.", - "format": "int32", - "type": "integer" - }, - "revision": { - "description": "The index of the index into current revision's parent_ids list.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentRevision": { - "description": "Contains past or forward revisions of this document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentRevision", - "properties": { - "agent": { - "description": "If the change was made by a person specify the name or id of that person.", - "type": "string" - }, - "createTime": { - "description": "The time that the revision was created, internally generated by doc proto storage at the time of create.", - "format": "google-datetime", - "type": "string" - }, - "humanReview": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview", - "description": "Human Review information of this revision." - }, - "id": { - "description": "Id of the revision, internally generated by doc proto storage. Unique within the context of the document.", - "type": "string" - }, - "parent": { - "deprecated": true, - "description": "The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "parentIds": { - "description": "The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.", - "items": { - "type": "string" - }, - "type": "array" - }, - "processor": { - "description": "If the annotation was made by processor identify the processor by its resource name.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview": { - "description": "Human Review information of the document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview", - "properties": { - "state": { - "description": "Human review state. e.g. `requested`, `succeeded`, `rejected`.", - "type": "string" - }, - "stateMessage": { - "description": "A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentShardInfo": { - "description": "For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is.", - "id": "GoogleCloudDocumentaiV1beta2DocumentShardInfo", - "properties": { - "shardCount": { - "description": "Total number of shards.", - "format": "int64", - "type": "string" - }, - "shardIndex": { - "description": "The 0-based index of this shard.", - "format": "int64", - "type": "string" - }, - "textOffset": { - "description": "The index of the first character in Document.text in the overall document global text.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentStyle": { - "description": "Annotation for common text style attributes. This adheres to CSS conventions as much as possible.", - "id": "GoogleCloudDocumentaiV1beta2DocumentStyle", - "properties": { - "backgroundColor": { - "$ref": "GoogleTypeColor", - "description": "Text background color." - }, - "color": { - "$ref": "GoogleTypeColor", - "description": "Text color." - }, - "fontFamily": { - "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", - "type": "string" - }, - "fontSize": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentStyleFontSize", - "description": "Font size." - }, - "fontWeight": { - "description": "[Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.", - "type": "string" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Text anchor indexing into the Document.text." - }, - "textDecoration": { - "description": "[Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard. ", - "type": "string" - }, - "textStyle": { - "description": "[Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentStyleFontSize": { - "description": "Font size with unit.", - "id": "GoogleCloudDocumentaiV1beta2DocumentStyleFontSize", - "properties": { - "size": { - "description": "Font size for the text.", - "format": "float", - "type": "number" - }, - "unit": { - "description": "Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentTextAnchor": { - "description": "Text reference indexing into the Document.text.", - "id": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "properties": { - "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", - "type": "string" - }, - "textSegments": { - "description": "The text segments from the Document.text.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment": { - "description": "A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset", - "id": "GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment", - "properties": { - "endIndex": { - "description": "TextSegment half open end UTF-8 char index in the Document.text.", - "format": "int64", - "type": "string" - }, - "startIndex": { - "description": "TextSegment start UTF-8 char index in the Document.text.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentTextChange": { - "description": "This message is used for text changes aka. OCR corrections.", - "id": "GoogleCloudDocumentaiV1beta2DocumentTextChange", - "properties": { - "changedText": { - "description": "The text that replaces the text identified in the `text_anchor`.", - "type": "string" - }, - "provenance": { - "deprecated": true, - "description": "The history of this annotation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance" - }, - "type": "array" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2GcsDestination": { - "description": "The Google Cloud Storage location where the output file will be written to.", - "id": "GoogleCloudDocumentaiV1beta2GcsDestination", - "properties": { - "uri": { - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2GcsSource": { - "description": "The Google Cloud Storage location where the input file will be read from.", - "id": "GoogleCloudDocumentaiV1beta2GcsSource", - "properties": { - "uri": { - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2InputConfig": { - "description": "The desired input location and metadata.", - "id": "GoogleCloudDocumentaiV1beta2InputConfig", - "properties": { - "contents": { - "description": "Content in bytes, represented as a stream of bytes. Note: As with all `bytes` fields, proto buffer messages use a pure binary representation, whereas JSON representations use base64. This field only works for synchronous ProcessDocument method.", - "format": "byte", - "type": "string" - }, - "gcsSource": { - "$ref": "GoogleCloudDocumentaiV1beta2GcsSource", - "description": "The Google Cloud Storage location to read the input from. This must be a single file." - }, - "mimeType": { - "description": "Required. Mimetype of the input. Current supported mimetypes are application/pdf, image/tiff, and image/gif. In addition, application/json type is supported for requests with ProcessDocumentRequest.automl_params field set. The JSON file needs to be in Document format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2NormalizedVertex": { - "description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", - "id": "GoogleCloudDocumentaiV1beta2NormalizedVertex", - "properties": { - "x": { - "description": "X coordinate.", - "format": "float", - "type": "number" - }, - "y": { - "description": "Y coordinate (starts from the top of the image).", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2OperationMetadata": { - "description": "Contains metadata for the BatchProcessDocuments operation.", - "id": "GoogleCloudDocumentaiV1beta2OperationMetadata", - "properties": { - "createTime": { - "description": "The creation time of the operation.", - "format": "google-datetime", - "type": "string" - }, - "state": { - "description": "The state of the current batch processing.", - "enum": [ - "STATE_UNSPECIFIED", - "ACCEPTED", - "WAITING", - "RUNNING", - "SUCCEEDED", - "CANCELLED", - "FAILED" - ], - "enumDescriptions": [ - "The default value. This value is used if the state is omitted.", - "Request is received.", - "Request operation is waiting for scheduling.", - "Request is being processed.", - "The batch processing completed successfully.", - "The batch processing was cancelled.", - "The batch processing has failed." - ], - "type": "string" - }, - "stateMessage": { - "description": "A message providing more details about the current state of processing.", - "type": "string" - }, - "updateTime": { - "description": "The last update time of the operation.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2OutputConfig": { - "description": "The desired output location and metadata.", - "id": "GoogleCloudDocumentaiV1beta2OutputConfig", - "properties": { - "gcsDestination": { - "$ref": "GoogleCloudDocumentaiV1beta2GcsDestination", - "description": "The Google Cloud Storage location to write the output to." - }, - "pagesPerShard": { - "description": "The max number of pages to include into each output Document shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each containing 20 parsed pages will be written under the prefix OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2ProcessDocumentResponse": { - "description": "Response to a single document processing request.", - "id": "GoogleCloudDocumentaiV1beta2ProcessDocumentResponse", - "properties": { - "inputConfig": { - "$ref": "GoogleCloudDocumentaiV1beta2InputConfig", - "description": "Information about the input file. This is the same as the corresponding input config in the request." - }, - "outputConfig": { - "$ref": "GoogleCloudDocumentaiV1beta2OutputConfig", - "description": "The output location of the parsed responses. The responses are written to this location as JSON-serialized `Document` objects." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2Vertex": { - "description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", - "id": "GoogleCloudDocumentaiV1beta2Vertex", - "properties": { - "x": { - "description": "X coordinate.", - "format": "int32", - "type": "integer" - }, - "y": { - "description": "Y coordinate (starts from the top of the image).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadata": { "id": "GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadata", "properties": { diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index 46af4f9b57f..7df745d5287 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -5750,4283 +5750,6 @@ func (s GoogleCloudDocumentaiV1Vertex) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 string `json:"format,omitempty"` - // 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. - ValueFormat string `json:"valueFormat,omitempty"` - // ForceSendFields is a list of field names (e.g. "Format") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Format") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1Barcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1Barcode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse: Response to an -// batch document processing request. This is returned in the LRO Operation -// after the operation is complete. -type GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse struct { - // Responses: Responses for each individual document. - Responses []*GoogleCloudDocumentaiV1beta1ProcessDocumentResponse `json:"responses,omitempty"` - // ForceSendFields is a list of field names (e.g. "Responses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Responses") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1BoundingPoly: A bounding polygon for the -// detected image annotation. -type GoogleCloudDocumentaiV1beta1BoundingPoly struct { - // NormalizedVertices: The bounding polygon normalized vertices. - NormalizedVertices []*GoogleCloudDocumentaiV1beta1NormalizedVertex `json:"normalizedVertices,omitempty"` - // Vertices: The bounding polygon vertices. - Vertices []*GoogleCloudDocumentaiV1beta1Vertex `json:"vertices,omitempty"` - // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NormalizedVertices") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1BoundingPoly - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1Document: Document represents the canonical -// document resource in Document AI. It is an interchange format that provides -// insights into documents and allows for collaboration between users and -// Document AI to iterate and optimize for quality. -type GoogleCloudDocumentaiV1beta1Document struct { - // ChunkedDocument: Document chunked based on chunking config. - ChunkedDocument *GoogleCloudDocumentaiV1beta1DocumentChunkedDocument `json:"chunkedDocument,omitempty"` - // Content: Optional. Inline document content, represented as a stream of - // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - Content string `json:"content,omitempty"` - // DocumentLayout: Parsed layout of the document. - DocumentLayout *GoogleCloudDocumentaiV1beta1DocumentDocumentLayout `json:"documentLayout,omitempty"` - // Entities: A list of entities detected on Document.text. For document shards, - // entities in this list may cross shard boundaries. - Entities []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"entities,omitempty"` - // EntityRelations: Placeholder. Relationship among Document.entities. - EntityRelations []*GoogleCloudDocumentaiV1beta1DocumentEntityRelation `json:"entityRelations,omitempty"` - // Error: Any error that occurred while processing this document. - Error *GoogleRpcStatus `json:"error,omitempty"` - // MimeType: An IANA published media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml). - MimeType string `json:"mimeType,omitempty"` - // Pages: Visual page layout for the Document. - Pages []*GoogleCloudDocumentaiV1beta1DocumentPage `json:"pages,omitempty"` - // Revisions: Placeholder. Revision history of this document. - Revisions []*GoogleCloudDocumentaiV1beta1DocumentRevision `json:"revisions,omitempty"` - // ShardInfo: Information about the sharding if this document is sharded part - // of a larger document. If the document is not sharded, this message is not - // specified. - ShardInfo *GoogleCloudDocumentaiV1beta1DocumentShardInfo `json:"shardInfo,omitempty"` - // Text: Optional. UTF-8 encoded text in reading order from the document. - 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. - TextChanges []*GoogleCloudDocumentaiV1beta1DocumentTextChange `json:"textChanges,omitempty"` - // TextStyles: Styles for the Document.text. - TextStyles []*GoogleCloudDocumentaiV1beta1DocumentStyle `json:"textStyles,omitempty"` - // Uri: Optional. Currently supports Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. For more - // information, refer to Google Cloud Storage Request URIs - // (https://cloud.google.com/storage/docs/reference-uris). - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkedDocument") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1Document - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocument: Represents the chunks -// that the document is divided into. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocument struct { - // Chunks: List of chunks. - Chunks []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk `json:"chunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Chunks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocument - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk: Represents a -// chunk. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk struct { - // ChunkId: ID of the chunk. - ChunkId string `json:"chunkId,omitempty"` - // Content: Text content of the chunk. - Content string `json:"content,omitempty"` - // PageFooters: Page footers associated with the chunk. - PageFooters []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` - // PageHeaders: Page headers associated with the chunk. - PageHeaders []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` - // PageSpan: Page span of the chunk. - PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // SourceBlockIds: Unused. - SourceBlockIds []string `json:"sourceBlockIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter: -// Represents the page footer associated with the chunk. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter struct { - // PageSpan: Page span of the footer. - PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // Text: Footer in text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSpan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader: -// Represents the page header associated with the chunk. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader struct { - // PageSpan: Page span of the header. - PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // Text: Header in text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSpan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan: -// Represents where the chunk starts and ends in the document. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan struct { - // PageEnd: Page where chunk ends in the document. - PageEnd int64 `json:"pageEnd,omitempty"` - // PageStart: Page where chunk starts in the document. - PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayout: Represents the parsed -// layout of a document as a collection of blocks that the document is divided -// into. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayout struct { - // Blocks: List of blocks in the document. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayout) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock: -// Represents a block. A block could be one of the various types (text, table, -// list) supported. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock struct { - // BlockId: ID of the block. - BlockId string `json:"blockId,omitempty"` - // ListBlock: Block consisting of list content/structure. - ListBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` - // PageSpan: Page span of the block. - PageSpan *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` - // TableBlock: Block consisting of table content/structure. - TableBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` - // TextBlock: Block consisting of text content. - TextBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlockId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi -// stBlock: Represents a list type block. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { - // ListEntries: List entries that constitute a list block. - ListEntries []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` - // Type: Type of the list_entries (if exist). Available options are `ordered` - // and `unordered`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ListEntries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ListEntries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi -// stEntry: Represents an entry in the list. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { - // Blocks: A list entry is a list of blocks. Repeated blocks support further - // hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPa -// geSpan: Represents where the block starts and ends in the document. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { - // PageEnd: Page where block ends in the document. - PageEnd int64 `json:"pageEnd,omitempty"` - // PageStart: Page where block starts in the document. - PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleBlock: Represents a table type block. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { - // BodyRows: Body rows containing main table content. - BodyRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` - // Caption: Table caption/title. - Caption string `json:"caption,omitempty"` - // HeaderRows: Header rows at the top of the table. - HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` - // ForceSendFields is a list of field names (e.g. "BodyRows") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BodyRows") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleCell: Represents a cell in a table row. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { - // Blocks: A table cell is a list of blocks. Repeated blocks support further - // hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ColSpan: How many columns this cell spans. - ColSpan int64 `json:"colSpan,omitempty"` - // RowSpan: How many rows this cell spans. - RowSpan int64 `json:"rowSpan,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleRow: Represents a row in a table. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { - // Cells: A table row is a list of table cells. - Cells []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTe -// xtBlock: Represents a text type block. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { - // Blocks: A text block could further have child blocks. Repeated blocks - // support further hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // Text: Text content stored in the block. - Text string `json:"text,omitempty"` - // Type: Type of the text in the block. Available options are: `paragraph`, - // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, - // `header`, `footer`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentEntity: An entity that could be a 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 float64 `json:"confidence,omitempty"` - // Id: Optional. Canonical id. This will be a unique value in the entity list - // for this document. - Id string `json:"id,omitempty"` - // MentionId: Optional. Deprecated. Use `id` field instead. - MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre - // Pkwy`. - MentionText string `json:"mentionText,omitempty"` - // NormalizedValue: Optional. Normalized entity value. Absent if the extracted - // value could not be converted or the type (e.g. address) is not supported for - // certain parsers. This field is also only populated for certain supported - // document types. - NormalizedValue *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` - // PageAnchor: Optional. Represents the provenance of this entity wrt. the - // location on the page where it was found. - PageAnchor *GoogleCloudDocumentaiV1beta1DocumentPageAnchor `json:"pageAnchor,omitempty"` - // Properties: Optional. Entities can be nested to form a hierarchical data - // structure representing the content in the document. - Properties []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"properties,omitempty"` - // Provenance: Optional. The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // Redacted: Optional. Whether the entity will be redacted for - // de-identification purposes. - Redacted bool `json:"redacted,omitempty"` - // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into - // the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Required. Entity type from a schema e.g. `Address`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentEntity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue: Parsed and -// normalized entity value. -type GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue struct { - // AddressValue: Postal address. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto - AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` - // BooleanValue: Boolean value. Can be used for entities with binary values, or - // for checkboxes. - BooleanValue bool `json:"booleanValue,omitempty"` - // DateValue: Date value. Includes year, month, day. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto - DateValue *GoogleTypeDate `json:"dateValue,omitempty"` - // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto - DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` - // FloatValue: Float value. - FloatValue float64 `json:"floatValue,omitempty"` - // IntegerValue: Integer value. - IntegerValue int64 `json:"integerValue,omitempty"` - // MoneyValue: Money value. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto - MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` - // Text: Optional. An optional field to store a normalized string. For some - // entity types, one of respective `structured_value` fields may also be - // populated. Also not all the types of `structured_value` will be normalized. - // For example, some processors may not generate `float` or `integer` - // normalized text by default. Below are sample formats mapped to structured - // values. - Money/Currency type (`money_value`) is in the ISO 4217 text - // format. - Date type (`date_value`) is in the ISO 8601 text format. - - // Datetime type (`datetime_value`) is in the ISO 8601 text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddressValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentEntityRelation: Relationship between -// Entities. -type GoogleCloudDocumentaiV1beta1DocumentEntityRelation struct { - // ObjectId: Object entity id. - ObjectId string `json:"objectId,omitempty"` - // Relation: Relationship description. - Relation string `json:"relation,omitempty"` - // SubjectId: Subject entity id. - SubjectId string `json:"subjectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ObjectId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ObjectId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentEntityRelation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityRelation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPage: A page in a Document. -type GoogleCloudDocumentaiV1beta1DocumentPage struct { - // Blocks: A list of visually detected text blocks on the page. A block has a - // set of lines (collected into paragraphs) that have a common line-spacing and - // orientation. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentPageBlock `json:"blocks,omitempty"` - // DetectedBarcodes: A list of detected barcodes. - DetectedBarcodes []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Dimension: Physical dimension of the page. - Dimension *GoogleCloudDocumentaiV1beta1DocumentPageDimension `json:"dimension,omitempty"` - // FormFields: A list of visually detected form fields on the page. - FormFields []*GoogleCloudDocumentaiV1beta1DocumentPageFormField `json:"formFields,omitempty"` - // Image: Rendered image for this page. This image is preprocessed to remove - // any skew, rotation, and distortions such that the annotation bounding boxes - // can be upright and axis-aligned. - Image *GoogleCloudDocumentaiV1beta1DocumentPageImage `json:"image,omitempty"` - // ImageQualityScores: Image quality scores. - ImageQualityScores *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` - // Layout: Layout for the page. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Lines: A list of visually detected text lines on the page. A collection of - // tokens that a human would perceive as a line. - Lines []*GoogleCloudDocumentaiV1beta1DocumentPageLine `json:"lines,omitempty"` - // PageNumber: 1-based index for current Page in a parent Document. Useful when - // a page is taken out of a Document for individual processing. - PageNumber int64 `json:"pageNumber,omitempty"` - // Paragraphs: A list of visually detected text paragraphs on the page. A - // collection of lines that a human would perceive as a paragraph. - Paragraphs []*GoogleCloudDocumentaiV1beta1DocumentPageParagraph `json:"paragraphs,omitempty"` - // Provenance: The history of this page. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // Symbols: A list of visually detected symbols on the page. - Symbols []*GoogleCloudDocumentaiV1beta1DocumentPageSymbol `json:"symbols,omitempty"` - // Tables: A list of visually detected tables on the page. - Tables []*GoogleCloudDocumentaiV1beta1DocumentPageTable `json:"tables,omitempty"` - // Tokens: A list of visually detected tokens on the page. - Tokens []*GoogleCloudDocumentaiV1beta1DocumentPageToken `json:"tokens,omitempty"` - // Transforms: Transformation matrices that were applied to the original - // document image to produce Page.image. - Transforms []*GoogleCloudDocumentaiV1beta1DocumentPageMatrix `json:"transforms,omitempty"` - // VisualElements: A list of detected non-text visual elements e.g. checkbox, - // signature etc. on the page. - VisualElements []*GoogleCloudDocumentaiV1beta1DocumentPageVisualElement `json:"visualElements,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageAnchor: Referencing the visual -// context of the entity in the Document.pages. Page anchors can be cross-page, -// consist of multiple bounding polygons and optionally reference specific -// layout element types. -type GoogleCloudDocumentaiV1beta1DocumentPageAnchor struct { - // PageRefs: One or more references to visual page elements - PageRefs []*GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageRefs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageRefs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef: Represents a weak -// reference to a page element within a document. -type GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef struct { - // BoundingPoly: Optional. Identifies the bounding polygon of a layout element - // on the page. If `layout_type` is set, the bounding polygon must be exactly - // the same to the layout element it's referring to. - BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` - // Confidence: Optional. Confidence of detected page element, if applicable. - // Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. - LayoutId string `json:"layoutId,omitempty"` - // LayoutType: Optional. The type of the layout element that is being - // referenced if any. - // - // Possible values: - // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. - // "BLOCK" - References a Page.blocks element. - // "PARAGRAPH" - References a Page.paragraphs element. - // "LINE" - References a Page.lines element. - // "TOKEN" - References a Page.tokens element. - // "VISUAL_ELEMENT" - References a Page.visual_elements element. - // "TABLE" - Refrrences a Page.tables element. - // "FORM_FIELD" - References a Page.form_fields element. - LayoutType string `json:"layoutType,omitempty"` - // Page: Required. Index into the Document.pages element, for example using - // `Document.pages` to locate the related page element. This field is skipped - // when its value is the default `0`. See - // https://developers.google.com/protocol-buffers/docs/proto3#json. - Page int64 `json:"page,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageBlock: A block has a set of lines -// (collected into paragraphs) that have a common line-spacing and orientation. -type GoogleCloudDocumentaiV1beta1DocumentPageBlock struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Block. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode: A detected barcode. -type GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode struct { - // Barcode: Detailed barcode information of the DetectedBarcode. - Barcode *GoogleCloudDocumentaiV1beta1Barcode `json:"barcode,omitempty"` - // Layout: Layout for DetectedBarcode. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Barcode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected language -// for a structural component. -type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code - // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as - // `en-US` or `sr-Latn`. - LanguageCode string `json:"languageCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageDimension: Dimension for the page. -type GoogleCloudDocumentaiV1beta1DocumentPageDimension struct { - // Height: Page height. - Height float64 `json:"height,omitempty"` - // Unit: Dimension unit. - Unit string `json:"unit,omitempty"` - // Width: Page width. - Width float64 `json:"width,omitempty"` - // ForceSendFields is a list of field names (e.g. "Height") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Height") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageDimension) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension - var s1 struct { - Height gensupport.JSONFloat64 `json:"height"` - Width gensupport.JSONFloat64 `json:"width"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Height = float64(s1.Height) - s.Width = float64(s1.Width) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageFormField: A form field detected on -// the page. -type GoogleCloudDocumentaiV1beta1DocumentPageFormField struct { - // CorrectedKeyText: Created for Labeling UI to export key text. If corrections - // were made to the text identified by the `field_name.text_anchor`, this field - // will contain the correction. - CorrectedKeyText string `json:"correctedKeyText,omitempty"` - // CorrectedValueText: Created for Labeling UI to export value text. If - // corrections were made to the text identified by the - // `field_value.text_anchor`, this field will contain the correction. - CorrectedValueText string `json:"correctedValueText,omitempty"` - // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand - // total`, `Phone number`, etc. - FieldName *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldName,omitempty"` - // FieldValue: Layout for the FormField value. - FieldValue *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldValue,omitempty"` - // NameDetectedLanguages: A list of detected languages for name together with - // confidence. - NameDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ValueDetectedLanguages: A list of detected languages for value together with - // confidence. - ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` - // ValueType: If the value is non-textual, this field represents the type. - // Current valid values are: - blank (this indicates the `field_value` is - // normal text) - `unfilled_checkbox` - `filled_checkbox` - ValueType string `json:"valueType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageFormField) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageFormField - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageImage: Rendered image contents for -// this page. -type GoogleCloudDocumentaiV1beta1DocumentPageImage struct { - // Content: Raw byte content of the image. - Content string `json:"content,omitempty"` - // Height: Height of the image in pixels. - Height int64 `json:"height,omitempty"` - // MimeType: Encoding media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the - // image. - MimeType string `json:"mimeType,omitempty"` - // Width: Width of the image in pixels. - Width int64 `json:"width,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageImage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores: Image quality -// scores for the page image. -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 perfect - // quality. - QualityScore float64 `json:"qualityScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedDefects") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedDefects") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores - var s1 struct { - QualityScore gensupport.JSONFloat64 `json:"qualityScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.QualityScore = float64(s1.QualityScore) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect: -// Image Quality Defects -type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` - // indicates strong confidence 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 string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageLayout: Visual element describing a -// layout unit on a page. -type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { - // BoundingPoly: The bounding polygon for the Layout. - BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` - // 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]`. - Confidence float64 `json:"confidence,omitempty"` - // Orientation: Detected orientation for the Layout. - // - // Possible values: - // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. - // "PAGE_UP" - Orientation is aligned with page up. - // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 - // degrees clockwise from upright to read. - // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 - // degrees from upright to read. - // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 - // degrees counterclockwise from upright to read. - Orientation string `json:"orientation,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageLayout) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageLine: A collection of tokens that a -// human would perceive as a line. Does not cross column boundaries, can be -// horizontal, vertical, etc. -type GoogleCloudDocumentaiV1beta1DocumentPageLine struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Line. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageLine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLine - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageMatrix: Representation for -// transformation matrix, intended to be compatible and used with OpenCV format -// for image manipulation. -type GoogleCloudDocumentaiV1beta1DocumentPageMatrix struct { - // Cols: Number of columns in the matrix. - Cols int64 `json:"cols,omitempty"` - // Data: The matrix data. - Data string `json:"data,omitempty"` - // Rows: Number of rows in the matrix. - Rows int64 `json:"rows,omitempty"` - // Type: This encodes information about what data type the matrix uses. For - // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV - // primitive data types, please refer to - // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html - Type int64 `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cols") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageMatrix) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageMatrix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageParagraph: A collection of lines -// that a human would perceive as a paragraph. -type GoogleCloudDocumentaiV1beta1DocumentPageParagraph struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Paragraph. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageParagraph) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageParagraph - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageSymbol: A detected symbol. -type GoogleCloudDocumentaiV1beta1DocumentPageSymbol struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Symbol. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageSymbol) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageSymbol - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTable: A table representation -// similar to HTML table structure. -type GoogleCloudDocumentaiV1beta1DocumentPageTable struct { - // BodyRows: Body rows of the table. - BodyRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"bodyRows,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // HeaderRows: Header rows of the table. - HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"headerRows,omitempty"` - // Layout: Layout for Table. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this table. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "BodyRows") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BodyRows") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTable) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell: A cell -// representation inside the table. -type GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell struct { - // ColSpan: How many columns this cell spans. - ColSpan int64 `json:"colSpan,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for TableCell. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // RowSpan: How many rows this cell spans. - RowSpan int64 `json:"rowSpan,omitempty"` - // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ColSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow: A row of table cells. -type GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow struct { - // Cells: Cells that make up this row. - Cells []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageToken: A detected token. -type GoogleCloudDocumentaiV1beta1DocumentPageToken struct { - // DetectedBreak: Detected break at the end of a Token. - DetectedBreak *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Token. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // StyleInfo: Text style attributes. - StyleInfo *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedBreak") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedBreak") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageToken) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageToken - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak: Detected break -// at the end of a Token. -type GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak struct { - // Type: Detected break type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified break type. - // "SPACE" - A single whitespace. - // "WIDE_SPACE" - A wider whitespace. - // "HYPHEN" - A hyphen that indicates that a token has been split across - // lines. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo: Font and other text -// style attributes. -type GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo struct { - // BackgroundColor: Color of the background. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Bold: Whether the text is bold (equivalent to font_weight is at least - // `700`). - Bold bool `json:"bold,omitempty"` - // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). - FontSize int64 `json:"fontSize,omitempty"` - // FontType: Name or style of the font. - FontType string `json:"fontType,omitempty"` - // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). - // Normal is `400`, bold is `700`. - FontWeight int64 `json:"fontWeight,omitempty"` - // Handwritten: Whether the text is handwritten. - Handwritten bool `json:"handwritten,omitempty"` - // Italic: Whether the text is italic. - Italic bool `json:"italic,omitempty"` - // LetterSpacing: Letter spacing in points. - LetterSpacing float64 `json:"letterSpacing,omitempty"` - // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * - // _resolution_ Ć· `72.0`. - PixelFontSize float64 `json:"pixelFontSize,omitempty"` - // Smallcaps: Whether the text is in small caps. This feature is not supported - // yet. - Smallcaps bool `json:"smallcaps,omitempty"` - // Strikeout: Whether the text is strikethrough. This feature is not supported - // yet. - Strikeout bool `json:"strikeout,omitempty"` - // Subscript: Whether the text is a subscript. This feature is not supported - // yet. - Subscript bool `json:"subscript,omitempty"` - // Superscript: Whether the text is a superscript. This feature is not - // supported yet. - Superscript bool `json:"superscript,omitempty"` - // TextColor: Color of the text. - TextColor *GoogleTypeColor `json:"textColor,omitempty"` - // Underlined: Whether the text is underlined. - Underlined bool `json:"underlined,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo - var s1 struct { - LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` - PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LetterSpacing = float64(s1.LetterSpacing) - s.PixelFontSize = float64(s1.PixelFontSize) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageVisualElement: Detected non-text -// visual elements e.g. checkbox, signature etc. on the page. -type GoogleCloudDocumentaiV1beta1DocumentPageVisualElement struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for VisualElement. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Type: Type of the VisualElement. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageVisualElement) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageVisualElement - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentProvenance: Structure to identify -// provenance relationships between annotations in different revisions. -type GoogleCloudDocumentaiV1beta1DocumentProvenance struct { - // Id: The Id of this operation. Needs to be unique within the scope of the - // revision. - Id int64 `json:"id,omitempty"` - // Parents: References to the original elements that are replaced. - Parents []*GoogleCloudDocumentaiV1beta1DocumentProvenanceParent `json:"parents,omitempty"` - // Revision: The index of the revision that produced this element. - Revision int64 `json:"revision,omitempty"` - // Type: The type of provenance operation. - // - // Possible values: - // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation - // is specified a provenance entry is simply used to match against a `parent`. - // "ADD" - Add an element. - // "REMOVE" - Remove an element identified by `parent`. - // "UPDATE" - Updates any fields within the given provenance scope of the - // message. It overwrites the fields rather than replacing them. Use this when - // you want to update a field value of an entity without also updating all the - // child properties. - // "REPLACE" - Currently unused. Replace an element identified by `parent`. - // "EVAL_REQUESTED" - Deprecated. Request human review for the element - // identified by `parent`. - // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human - // review, confidence will be set to 1.0. - // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentProvenance) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentProvenanceParent: The parent element the -// current element is based on. Used for referencing/aligning, removal and -// replacement operations. -type GoogleCloudDocumentaiV1beta1DocumentProvenanceParent struct { - // Id: The id of the parent provenance. - Id int64 `json:"id,omitempty"` - // Index: The index of the parent item in the corresponding item list (eg. list - // of entities, properties within entities, etc.) in the parent revision. - Index int64 `json:"index,omitempty"` - // Revision: The index of the index into current revision's parent_ids list. - Revision int64 `json:"revision,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentProvenanceParent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenanceParent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentRevision: Contains past or forward -// revisions of this document. -type GoogleCloudDocumentaiV1beta1DocumentRevision struct { - // Agent: If the change was made by a person specify the name or id of that - // person. - Agent string `json:"agent,omitempty"` - // CreateTime: The time that the revision was created, internally generated by - // doc proto storage at the time of create. - CreateTime string `json:"createTime,omitempty"` - // HumanReview: Human Review information of this revision. - HumanReview *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview `json:"humanReview,omitempty"` - // Id: Id of the revision, internally generated by doc proto storage. Unique - // within the context of the document. - Id string `json:"id,omitempty"` - // Parent: The revisions that this revision is based on. This can include one - // or more parent (when documents are merged.) This field represents the index - // into the `revisions` field. - Parent []int64 `json:"parent,omitempty"` - // ParentIds: The revisions that this revision is based on. Must include all - // the ids that have anything to do with this revision - eg. there are - // `provenance.parent.revision` fields that index into this field. - ParentIds []string `json:"parentIds,omitempty"` - // Processor: If the annotation was made by processor identify the processor by - // its resource name. - Processor string `json:"processor,omitempty"` - // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Agent") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentRevision) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevision - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview: Human Review -// information of the document. -type GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview struct { - // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. - State string `json:"state,omitempty"` - // StateMessage: A message providing more details about the current state of - // processing. For example, the rejection reason when the state is `rejected`. - StateMessage string `json:"stateMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentShardInfo: For a large document, -// sharding may be performed to produce several document shards. Each document -// shard contains this field to detail which shard it is. -type GoogleCloudDocumentaiV1beta1DocumentShardInfo struct { - // ShardCount: Total number of shards. - ShardCount int64 `json:"shardCount,omitempty,string"` - // ShardIndex: The 0-based index of this shard. - ShardIndex int64 `json:"shardIndex,omitempty,string"` - // TextOffset: The index of the first character in Document.text in the overall - // document global text. - TextOffset int64 `json:"textOffset,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ShardCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ShardCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentShardInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentShardInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentStyle: Annotation for common text style -// attributes. This adheres to CSS conventions as much as possible. -type GoogleCloudDocumentaiV1beta1DocumentStyle struct { - // BackgroundColor: Text background color. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Color: Text color. - Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as `Arial`, `Times New Roman`. - // https://www.w3schools.com/cssref/pr_font_font-family.asp - FontFamily string `json:"fontFamily,omitempty"` - // FontSize: Font size. - FontSize *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize `json:"fontSize,omitempty"` - // FontWeight: Font weight - // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are - // `normal`, `bold`, `bolder`, and `lighter`. - FontWeight string `json:"fontWeight,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // TextDecoration: Text decoration - // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS - // standard. - TextDecoration string `json:"textDecoration,omitempty"` - // TextStyle: Text style - // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values - // are `normal`, `italic`, and `oblique`. - TextStyle string `json:"textStyle,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentStyle) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentStyleFontSize: Font size with unit. -type GoogleCloudDocumentaiV1beta1DocumentStyleFontSize struct { - // Size: Font size for the text. - Size float64 `json:"size,omitempty"` - // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and - // `pt`). - Unit string `json:"unit,omitempty"` - // ForceSendFields is a list of field names (e.g. "Size") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Size") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize - var s1 struct { - Size gensupport.JSONFloat64 `json:"size"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Size = float64(s1.Size) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentTextAnchor: Text reference indexing into -// the Document.text. -type GoogleCloudDocumentaiV1beta1DocumentTextAnchor struct { - // Content: Contains the content of the text span so that users do not have to - // look it up in the text_segments. It is always populated for formFields. - Content string `json:"content,omitempty"` - // TextSegments: The text segments from the Document.text. - TextSegments []*GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment `json:"textSegments,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentTextAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment: A text segment in -// the Document.text. The indices may be out of bounds which indicate that the -// text extends into another document shard for large sharded documents. See -// ShardInfo.text_offset -type GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment struct { - // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. - EndIndex int64 `json:"endIndex,omitempty,string"` - // StartIndex: TextSegment start UTF-8 char index in the Document.text. - StartIndex int64 `json:"startIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EndIndex") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndIndex") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentTextChange: This message is used for -// text changes aka. OCR corrections. -type GoogleCloudDocumentaiV1beta1DocumentTextChange struct { - // ChangedText: The text that replaces the text identified in the - // `text_anchor`. - ChangedText string `json:"changedText,omitempty"` - // Provenance: The history of this annotation. - Provenance []*GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // TextAnchor: Provenance of the correction. Text anchor indexing into the - // Document.text. There can only be a single `TextAnchor.text_segments` - // element. If the start and end index of the text segment are the same, the - // text change is inserted before that index. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChangedText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChangedText") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentTextChange) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextChange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1GcsDestination: The Google Cloud Storage -// location where the output file will be written to. -type GoogleCloudDocumentaiV1beta1GcsDestination struct { - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1GcsDestination) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1GcsDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1GcsSource: The Google Cloud Storage location -// where the input file will be read from. -type GoogleCloudDocumentaiV1beta1GcsSource struct { - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1GcsSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1GcsSource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1InputConfig: The desired input location and -// metadata. -type GoogleCloudDocumentaiV1beta1InputConfig struct { - // GcsSource: The Google Cloud Storage location to read the input from. This - // must be a single file. - GcsSource *GoogleCloudDocumentaiV1beta1GcsSource `json:"gcsSource,omitempty"` - // MimeType: Required. Mimetype of the input. Current supported mimetypes are - // application/pdf, image/tiff, and image/gif. In addition, application/json - // type is supported for requests with ProcessDocumentRequest.automl_params - // field set. The JSON file needs to be in Document format. - MimeType string `json:"mimeType,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsSource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsSource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1InputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1InputConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1NormalizedVertex: A vertex represents a 2D point -// in the image. NOTE: the normalized vertex coordinates are relative to the -// original image and range from 0 to 1. -type GoogleCloudDocumentaiV1beta1NormalizedVertex struct { - // X: X coordinate. - X float64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y float64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1NormalizedVertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex - var s1 struct { - X gensupport.JSONFloat64 `json:"x"` - Y gensupport.JSONFloat64 `json:"y"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.X = float64(s1.X) - s.Y = float64(s1.Y) - return nil -} - -// GoogleCloudDocumentaiV1beta1OperationMetadata: Contains metadata for the -// BatchProcessDocuments operation. -type GoogleCloudDocumentaiV1beta1OperationMetadata struct { - // CreateTime: The creation time of the operation. - CreateTime string `json:"createTime,omitempty"` - // State: The state of the current batch processing. - // - // Possible values: - // "STATE_UNSPECIFIED" - The default value. This value is used if the state - // is omitted. - // "ACCEPTED" - Request is received. - // "WAITING" - Request operation is waiting for scheduling. - // "RUNNING" - Request is being processed. - // "SUCCEEDED" - The batch processing completed successfully. - // "CANCELLED" - The batch processing was cancelled. - // "FAILED" - The batch processing has failed. - State string `json:"state,omitempty"` - // StateMessage: A message providing more details about the current state of - // processing. - StateMessage string `json:"stateMessage,omitempty"` - // UpdateTime: The last update time of the operation. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1OutputConfig: The desired output location and -// metadata. -type GoogleCloudDocumentaiV1beta1OutputConfig struct { - // GcsDestination: The Google Cloud Storage location to write the output to. - GcsDestination *GoogleCloudDocumentaiV1beta1GcsDestination `json:"gcsDestination,omitempty"` - // PagesPerShard: The max number of pages to include into each output Document - // shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not - // specified, the default value is 20. For example, for one pdf file with 100 - // pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 - // Document shard JSON files each containing 20 parsed pages will be written - // under the prefix OutputConfig.gcs_destination.uri and suffix - // pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS - // outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json - // pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json - PagesPerShard int64 `json:"pagesPerShard,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsDestination") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsDestination") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1OutputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1OutputConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1ProcessDocumentResponse: Response to a single -// document processing request. -type GoogleCloudDocumentaiV1beta1ProcessDocumentResponse struct { - // InputConfig: Information about the input file. This is the same as the - // corresponding input config in the request. - InputConfig *GoogleCloudDocumentaiV1beta1InputConfig `json:"inputConfig,omitempty"` - // OutputConfig: The output location of the parsed responses. The responses are - // written to this location as JSON-serialized `Document` objects. - OutputConfig *GoogleCloudDocumentaiV1beta1OutputConfig `json:"outputConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "InputConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1ProcessDocumentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1ProcessDocumentResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1Vertex: A vertex represents a 2D point in the -// image. NOTE: the vertex coordinates are in the same scale as the original -// image. -type GoogleCloudDocumentaiV1beta1Vertex struct { - // X: X coordinate. - X int64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y int64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1Vertex - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// 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 string `json:"format,omitempty"` - // 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. - ValueFormat string `json:"valueFormat,omitempty"` - // ForceSendFields is a list of field names (e.g. "Format") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Format") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2Barcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Barcode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse: Response to an -// batch document processing request. This is returned in the LRO Operation -// after the operation is complete. -type GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse struct { - // Responses: Responses for each individual document. - Responses []*GoogleCloudDocumentaiV1beta2ProcessDocumentResponse `json:"responses,omitempty"` - // ForceSendFields is a list of field names (e.g. "Responses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Responses") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2BoundingPoly: A bounding polygon for the -// detected image annotation. -type GoogleCloudDocumentaiV1beta2BoundingPoly struct { - // NormalizedVertices: The bounding polygon normalized vertices. - NormalizedVertices []*GoogleCloudDocumentaiV1beta2NormalizedVertex `json:"normalizedVertices,omitempty"` - // Vertices: The bounding polygon vertices. - Vertices []*GoogleCloudDocumentaiV1beta2Vertex `json:"vertices,omitempty"` - // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NormalizedVertices") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2BoundingPoly - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2Document: Document represents the canonical -// document resource in Document AI. It is an interchange format that provides -// insights into documents and allows for collaboration between users and -// Document AI to iterate and optimize for quality. -type GoogleCloudDocumentaiV1beta2Document struct { - // ChunkedDocument: Document chunked based on chunking config. - ChunkedDocument *GoogleCloudDocumentaiV1beta2DocumentChunkedDocument `json:"chunkedDocument,omitempty"` - // Content: Optional. Inline document content, represented as a stream of - // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - Content string `json:"content,omitempty"` - // DocumentLayout: Parsed layout of the document. - DocumentLayout *GoogleCloudDocumentaiV1beta2DocumentDocumentLayout `json:"documentLayout,omitempty"` - // Entities: A list of entities detected on Document.text. For document shards, - // entities in this list may cross shard boundaries. - Entities []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"entities,omitempty"` - // EntityRelations: Placeholder. Relationship among Document.entities. - EntityRelations []*GoogleCloudDocumentaiV1beta2DocumentEntityRelation `json:"entityRelations,omitempty"` - // Error: Any error that occurred while processing this document. - Error *GoogleRpcStatus `json:"error,omitempty"` - // Labels: Labels for this document. - Labels []*GoogleCloudDocumentaiV1beta2DocumentLabel `json:"labels,omitempty"` - // MimeType: An IANA published media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml). - MimeType string `json:"mimeType,omitempty"` - // Pages: Visual page layout for the Document. - Pages []*GoogleCloudDocumentaiV1beta2DocumentPage `json:"pages,omitempty"` - // Revisions: Placeholder. Revision history of this document. - Revisions []*GoogleCloudDocumentaiV1beta2DocumentRevision `json:"revisions,omitempty"` - // ShardInfo: Information about the sharding if this document is sharded part - // of a larger document. If the document is not sharded, this message is not - // specified. - ShardInfo *GoogleCloudDocumentaiV1beta2DocumentShardInfo `json:"shardInfo,omitempty"` - // Text: Optional. UTF-8 encoded text in reading order from the document. - 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. - TextChanges []*GoogleCloudDocumentaiV1beta2DocumentTextChange `json:"textChanges,omitempty"` - // TextStyles: Styles for the Document.text. - TextStyles []*GoogleCloudDocumentaiV1beta2DocumentStyle `json:"textStyles,omitempty"` - // Uri: Optional. Currently supports Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. For more - // information, refer to Google Cloud Storage Request URIs - // (https://cloud.google.com/storage/docs/reference-uris). - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkedDocument") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Document - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocument: Represents the chunks -// that the document is divided into. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocument struct { - // Chunks: List of chunks. - Chunks []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk `json:"chunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Chunks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocument - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk: Represents a -// chunk. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk struct { - // ChunkId: ID of the chunk. - ChunkId string `json:"chunkId,omitempty"` - // Content: Text content of the chunk. - Content string `json:"content,omitempty"` - // PageFooters: Page footers associated with the chunk. - PageFooters []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` - // PageHeaders: Page headers associated with the chunk. - PageHeaders []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` - // PageSpan: Page span of the chunk. - PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // SourceBlockIds: Unused. - SourceBlockIds []string `json:"sourceBlockIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter: -// Represents the page footer associated with the chunk. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter struct { - // PageSpan: Page span of the footer. - PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // Text: Footer in text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSpan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader: -// Represents the page header associated with the chunk. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader struct { - // PageSpan: Page span of the header. - PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // Text: Header in text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSpan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan: -// Represents where the chunk starts and ends in the document. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan struct { - // PageEnd: Page where chunk ends in the document. - PageEnd int64 `json:"pageEnd,omitempty"` - // PageStart: Page where chunk starts in the document. - PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayout: Represents the parsed -// layout of a document as a collection of blocks that the document is divided -// into. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayout struct { - // Blocks: List of blocks in the document. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayout) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock: -// Represents a block. A block could be one of the various types (text, table, -// list) supported. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock struct { - // BlockId: ID of the block. - BlockId string `json:"blockId,omitempty"` - // ListBlock: Block consisting of list content/structure. - ListBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` - // PageSpan: Page span of the block. - PageSpan *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` - // TableBlock: Block consisting of table content/structure. - TableBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` - // TextBlock: Block consisting of text content. - TextBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlockId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi -// stBlock: Represents a list type block. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { - // ListEntries: List entries that constitute a list block. - ListEntries []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` - // Type: Type of the list_entries (if exist). Available options are `ordered` - // and `unordered`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ListEntries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ListEntries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi -// stEntry: Represents an entry in the list. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { - // Blocks: A list entry is a list of blocks. Repeated blocks support further - // hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPa -// geSpan: Represents where the block starts and ends in the document. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { - // PageEnd: Page where block ends in the document. - PageEnd int64 `json:"pageEnd,omitempty"` - // PageStart: Page where block starts in the document. - PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleBlock: Represents a table type block. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { - // BodyRows: Body rows containing main table content. - BodyRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` - // Caption: Table caption/title. - Caption string `json:"caption,omitempty"` - // HeaderRows: Header rows at the top of the table. - HeaderRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` - // ForceSendFields is a list of field names (e.g. "BodyRows") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BodyRows") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleCell: Represents a cell in a table row. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { - // Blocks: A table cell is a list of blocks. Repeated blocks support further - // hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ColSpan: How many columns this cell spans. - ColSpan int64 `json:"colSpan,omitempty"` - // RowSpan: How many rows this cell spans. - RowSpan int64 `json:"rowSpan,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleRow: Represents a row in a table. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { - // Cells: A table row is a list of table cells. - Cells []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTe -// xtBlock: Represents a text type block. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { - // Blocks: A text block could further have child blocks. Repeated blocks - // support further hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // Text: Text content stored in the block. - Text string `json:"text,omitempty"` - // Type: Type of the text in the block. Available options are: `paragraph`, - // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, - // `header`, `footer`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentEntity: An entity that could be a 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 float64 `json:"confidence,omitempty"` - // Id: Optional. Canonical id. This will be a unique value in the entity list - // for this document. - Id string `json:"id,omitempty"` - // MentionId: Optional. Deprecated. Use `id` field instead. - MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre - // Pkwy`. - MentionText string `json:"mentionText,omitempty"` - // NormalizedValue: Optional. Normalized entity value. Absent if the extracted - // value could not be converted or the type (e.g. address) is not supported for - // certain parsers. This field is also only populated for certain supported - // document types. - NormalizedValue *GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` - // PageAnchor: Optional. Represents the provenance of this entity wrt. the - // location on the page where it was found. - PageAnchor *GoogleCloudDocumentaiV1beta2DocumentPageAnchor `json:"pageAnchor,omitempty"` - // Properties: Optional. Entities can be nested to form a hierarchical data - // structure representing the content in the document. - Properties []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"properties,omitempty"` - // Provenance: Optional. The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // Redacted: Optional. Whether the entity will be redacted for - // de-identification purposes. - Redacted bool `json:"redacted,omitempty"` - // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into - // the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Required. Entity type from a schema e.g. `Address`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentEntity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentEntity) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntity - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue: Parsed and -// normalized entity value. -type GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue struct { - // AddressValue: Postal address. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto - AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` - // BooleanValue: Boolean value. Can be used for entities with binary values, or - // for checkboxes. - BooleanValue bool `json:"booleanValue,omitempty"` - // DateValue: Date value. Includes year, month, day. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto - DateValue *GoogleTypeDate `json:"dateValue,omitempty"` - // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto - DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` - // FloatValue: Float value. - FloatValue float64 `json:"floatValue,omitempty"` - // IntegerValue: Integer value. - IntegerValue int64 `json:"integerValue,omitempty"` - // MoneyValue: Money value. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto - MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` - // Text: Optional. An optional field to store a normalized string. For some - // entity types, one of respective `structured_value` fields may also be - // populated. Also not all the types of `structured_value` will be normalized. - // For example, some processors may not generate `float` or `integer` - // normalized text by default. Below are sample formats mapped to structured - // values. - Money/Currency type (`money_value`) is in the ISO 4217 text - // format. - Date type (`date_value`) is in the ISO 8601 text format. - - // Datetime type (`datetime_value`) is in the ISO 8601 text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddressValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentEntityRelation: Relationship between -// Entities. -type GoogleCloudDocumentaiV1beta2DocumentEntityRelation struct { - // ObjectId: Object entity id. - ObjectId string `json:"objectId,omitempty"` - // Relation: Relationship description. - Relation string `json:"relation,omitempty"` - // SubjectId: Subject entity id. - SubjectId string `json:"subjectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ObjectId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ObjectId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentEntityRelation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityRelation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentLabel: Label attaches schema information -// and/or other metadata to segments within a Document. Multiple Labels on a -// single field can denote either different labels, different instances of the -// same label created at different times, or some combination of both. -type GoogleCloudDocumentaiV1beta2DocumentLabel struct { - // AutomlModel: Label is generated AutoML model. This field stores the full - // resource name of the AutoML model. Format: - // `projects/{project-id}/locations/{location-id}/models/{model-id}` - AutomlModel string `json:"automlModel,omitempty"` - // Confidence: Confidence score between 0 and 1 for label assignment. - Confidence float64 `json:"confidence,omitempty"` - // Name: Name of the label. When the label is generated from AutoML Text - // Classification model, this field represents the name of the category. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutomlModel") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutomlModel") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentLabel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentLabel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentLabel) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentLabel - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPage: A page in a Document. -type GoogleCloudDocumentaiV1beta2DocumentPage struct { - // Blocks: A list of visually detected text blocks on the page. A block has a - // set of lines (collected into paragraphs) that have a common line-spacing and - // orientation. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentPageBlock `json:"blocks,omitempty"` - // DetectedBarcodes: A list of detected barcodes. - DetectedBarcodes []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Dimension: Physical dimension of the page. - Dimension *GoogleCloudDocumentaiV1beta2DocumentPageDimension `json:"dimension,omitempty"` - // FormFields: A list of visually detected form fields on the page. - FormFields []*GoogleCloudDocumentaiV1beta2DocumentPageFormField `json:"formFields,omitempty"` - // Image: Rendered image for this page. This image is preprocessed to remove - // any skew, rotation, and distortions such that the annotation bounding boxes - // can be upright and axis-aligned. - Image *GoogleCloudDocumentaiV1beta2DocumentPageImage `json:"image,omitempty"` - // ImageQualityScores: Image quality scores. - ImageQualityScores *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` - // Layout: Layout for the page. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Lines: A list of visually detected text lines on the page. A collection of - // tokens that a human would perceive as a line. - Lines []*GoogleCloudDocumentaiV1beta2DocumentPageLine `json:"lines,omitempty"` - // PageNumber: 1-based index for current Page in a parent Document. Useful when - // a page is taken out of a Document for individual processing. - PageNumber int64 `json:"pageNumber,omitempty"` - // Paragraphs: A list of visually detected text paragraphs on the page. A - // collection of lines that a human would perceive as a paragraph. - Paragraphs []*GoogleCloudDocumentaiV1beta2DocumentPageParagraph `json:"paragraphs,omitempty"` - // Provenance: The history of this page. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // Symbols: A list of visually detected symbols on the page. - Symbols []*GoogleCloudDocumentaiV1beta2DocumentPageSymbol `json:"symbols,omitempty"` - // Tables: A list of visually detected tables on the page. - Tables []*GoogleCloudDocumentaiV1beta2DocumentPageTable `json:"tables,omitempty"` - // Tokens: A list of visually detected tokens on the page. - Tokens []*GoogleCloudDocumentaiV1beta2DocumentPageToken `json:"tokens,omitempty"` - // Transforms: Transformation matrices that were applied to the original - // document image to produce Page.image. - Transforms []*GoogleCloudDocumentaiV1beta2DocumentPageMatrix `json:"transforms,omitempty"` - // VisualElements: A list of detected non-text visual elements e.g. checkbox, - // signature etc. on the page. - VisualElements []*GoogleCloudDocumentaiV1beta2DocumentPageVisualElement `json:"visualElements,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageAnchor: Referencing the visual -// context of the entity in the Document.pages. Page anchors can be cross-page, -// consist of multiple bounding polygons and optionally reference specific -// layout element types. -type GoogleCloudDocumentaiV1beta2DocumentPageAnchor struct { - // PageRefs: One or more references to visual page elements - PageRefs []*GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageRefs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageRefs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef: Represents a weak -// reference to a page element within a document. -type GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef struct { - // BoundingPoly: Optional. Identifies the bounding polygon of a layout element - // on the page. If `layout_type` is set, the bounding polygon must be exactly - // the same to the layout element it's referring to. - BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"` - // Confidence: Optional. Confidence of detected page element, if applicable. - // Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. - LayoutId string `json:"layoutId,omitempty"` - // LayoutType: Optional. The type of the layout element that is being - // referenced if any. - // - // Possible values: - // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. - // "BLOCK" - References a Page.blocks element. - // "PARAGRAPH" - References a Page.paragraphs element. - // "LINE" - References a Page.lines element. - // "TOKEN" - References a Page.tokens element. - // "VISUAL_ELEMENT" - References a Page.visual_elements element. - // "TABLE" - Refrrences a Page.tables element. - // "FORM_FIELD" - References a Page.form_fields element. - LayoutType string `json:"layoutType,omitempty"` - // Page: Required. Index into the Document.pages element, for example using - // `Document.pages` to locate the related page element. This field is skipped - // when its value is the default `0`. See - // https://developers.google.com/protocol-buffers/docs/proto3#json. - Page int64 `json:"page,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageBlock: A block has a set of lines -// (collected into paragraphs) that have a common line-spacing and orientation. -type GoogleCloudDocumentaiV1beta2DocumentPageBlock struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Block. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode: A detected barcode. -type GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode struct { - // Barcode: Detailed barcode information of the DetectedBarcode. - Barcode *GoogleCloudDocumentaiV1beta2Barcode `json:"barcode,omitempty"` - // Layout: Layout for DetectedBarcode. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Barcode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected language -// for a structural component. -type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code - // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as - // `en-US` or `sr-Latn`. - LanguageCode string `json:"languageCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageDimension: Dimension for the page. -type GoogleCloudDocumentaiV1beta2DocumentPageDimension struct { - // Height: Page height. - Height float64 `json:"height,omitempty"` - // Unit: Dimension unit. - Unit string `json:"unit,omitempty"` - // Width: Page width. - Width float64 `json:"width,omitempty"` - // ForceSendFields is a list of field names (e.g. "Height") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Height") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageDimension) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDimension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageDimension) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDimension - var s1 struct { - Height gensupport.JSONFloat64 `json:"height"` - Width gensupport.JSONFloat64 `json:"width"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Height = float64(s1.Height) - s.Width = float64(s1.Width) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageFormField: A form field detected on -// the page. -type GoogleCloudDocumentaiV1beta2DocumentPageFormField struct { - // CorrectedKeyText: Created for Labeling UI to export key text. If corrections - // were made to the text identified by the `field_name.text_anchor`, this field - // will contain the correction. - CorrectedKeyText string `json:"correctedKeyText,omitempty"` - // CorrectedValueText: Created for Labeling UI to export value text. If - // corrections were made to the text identified by the - // `field_value.text_anchor`, this field will contain the correction. - CorrectedValueText string `json:"correctedValueText,omitempty"` - // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand - // total`, `Phone number`, etc. - FieldName *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"fieldName,omitempty"` - // FieldValue: Layout for the FormField value. - FieldValue *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"fieldValue,omitempty"` - // NameDetectedLanguages: A list of detected languages for name together with - // confidence. - NameDetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ValueDetectedLanguages: A list of detected languages for value together with - // confidence. - ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` - // ValueType: If the value is non-textual, this field represents the type. - // Current valid values are: - blank (this indicates the `field_value` is - // normal text) - `unfilled_checkbox` - `filled_checkbox` - ValueType string `json:"valueType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageFormField) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageFormField - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageImage: Rendered image contents for -// this page. -type GoogleCloudDocumentaiV1beta2DocumentPageImage struct { - // Content: Raw byte content of the image. - Content string `json:"content,omitempty"` - // Height: Height of the image in pixels. - Height int64 `json:"height,omitempty"` - // MimeType: Encoding media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the - // image. - MimeType string `json:"mimeType,omitempty"` - // Width: Width of the image in pixels. - Width int64 `json:"width,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageImage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores: Image quality -// scores for the page image. -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 perfect - // quality. - QualityScore float64 `json:"qualityScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedDefects") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedDefects") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores - var s1 struct { - QualityScore gensupport.JSONFloat64 `json:"qualityScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.QualityScore = float64(s1.QualityScore) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect: -// Image Quality Defects -type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` - // indicates strong confidence 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 string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageLayout: Visual element describing a -// layout unit on a page. -type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct { - // BoundingPoly: The bounding polygon for the Layout. - BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"` - // 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]`. - Confidence float64 `json:"confidence,omitempty"` - // Orientation: Detected orientation for the Layout. - // - // Possible values: - // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. - // "PAGE_UP" - Orientation is aligned with page up. - // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 - // degrees clockwise from upright to read. - // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 - // degrees from upright to read. - // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 - // degrees counterclockwise from upright to read. - Orientation string `json:"orientation,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageLayout) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLayout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageLayout) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLayout - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageLine: A collection of tokens that a -// human would perceive as a line. Does not cross column boundaries, can be -// horizontal, vertical, etc. -type GoogleCloudDocumentaiV1beta2DocumentPageLine struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Line. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageLine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLine - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageMatrix: Representation for -// transformation matrix, intended to be compatible and used with OpenCV format -// for image manipulation. -type GoogleCloudDocumentaiV1beta2DocumentPageMatrix struct { - // Cols: Number of columns in the matrix. - Cols int64 `json:"cols,omitempty"` - // Data: The matrix data. - Data string `json:"data,omitempty"` - // Rows: Number of rows in the matrix. - Rows int64 `json:"rows,omitempty"` - // Type: This encodes information about what data type the matrix uses. For - // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV - // primitive data types, please refer to - // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html - Type int64 `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cols") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageMatrix) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageMatrix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageParagraph: A collection of lines -// that a human would perceive as a paragraph. -type GoogleCloudDocumentaiV1beta2DocumentPageParagraph struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Paragraph. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageParagraph) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageParagraph - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageSymbol: A detected symbol. -type GoogleCloudDocumentaiV1beta2DocumentPageSymbol struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Symbol. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageSymbol) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageSymbol - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTable: A table representation -// similar to HTML table structure. -type GoogleCloudDocumentaiV1beta2DocumentPageTable struct { - // BodyRows: Body rows of the table. - BodyRows []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow `json:"bodyRows,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // HeaderRows: Header rows of the table. - HeaderRows []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow `json:"headerRows,omitempty"` - // Layout: Layout for Table. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this table. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "BodyRows") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BodyRows") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTable) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell: A cell -// representation inside the table. -type GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell struct { - // ColSpan: How many columns this cell spans. - ColSpan int64 `json:"colSpan,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for TableCell. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // RowSpan: How many rows this cell spans. - RowSpan int64 `json:"rowSpan,omitempty"` - // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ColSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow: A row of table cells. -type GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow struct { - // Cells: Cells that make up this row. - Cells []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageToken: A detected token. -type GoogleCloudDocumentaiV1beta2DocumentPageToken struct { - // DetectedBreak: Detected break at the end of a Token. - DetectedBreak *GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Token. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // StyleInfo: Text style attributes. - StyleInfo *GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedBreak") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedBreak") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageToken) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageToken - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak: Detected break -// at the end of a Token. -type GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak struct { - // Type: Detected break type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified break type. - // "SPACE" - A single whitespace. - // "WIDE_SPACE" - A wider whitespace. - // "HYPHEN" - A hyphen that indicates that a token has been split across - // lines. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo: Font and other text -// style attributes. -type GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo struct { - // BackgroundColor: Color of the background. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Bold: Whether the text is bold (equivalent to font_weight is at least - // `700`). - Bold bool `json:"bold,omitempty"` - // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). - FontSize int64 `json:"fontSize,omitempty"` - // FontType: Name or style of the font. - FontType string `json:"fontType,omitempty"` - // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). - // Normal is `400`, bold is `700`. - FontWeight int64 `json:"fontWeight,omitempty"` - // Handwritten: Whether the text is handwritten. - Handwritten bool `json:"handwritten,omitempty"` - // Italic: Whether the text is italic. - Italic bool `json:"italic,omitempty"` - // LetterSpacing: Letter spacing in points. - LetterSpacing float64 `json:"letterSpacing,omitempty"` - // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * - // _resolution_ Ć· `72.0`. - PixelFontSize float64 `json:"pixelFontSize,omitempty"` - // Smallcaps: Whether the text is in small caps. This feature is not supported - // yet. - Smallcaps bool `json:"smallcaps,omitempty"` - // Strikeout: Whether the text is strikethrough. This feature is not supported - // yet. - Strikeout bool `json:"strikeout,omitempty"` - // Subscript: Whether the text is a subscript. This feature is not supported - // yet. - Subscript bool `json:"subscript,omitempty"` - // Superscript: Whether the text is a superscript. This feature is not - // supported yet. - Superscript bool `json:"superscript,omitempty"` - // TextColor: Color of the text. - TextColor *GoogleTypeColor `json:"textColor,omitempty"` - // Underlined: Whether the text is underlined. - Underlined bool `json:"underlined,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo - var s1 struct { - LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` - PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LetterSpacing = float64(s1.LetterSpacing) - s.PixelFontSize = float64(s1.PixelFontSize) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageVisualElement: Detected non-text -// visual elements e.g. checkbox, signature etc. on the page. -type GoogleCloudDocumentaiV1beta2DocumentPageVisualElement struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for VisualElement. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Type: Type of the VisualElement. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageVisualElement) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageVisualElement - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentProvenance: Structure to identify -// provenance relationships between annotations in different revisions. -type GoogleCloudDocumentaiV1beta2DocumentProvenance struct { - // Id: The Id of this operation. Needs to be unique within the scope of the - // revision. - Id int64 `json:"id,omitempty"` - // Parents: References to the original elements that are replaced. - Parents []*GoogleCloudDocumentaiV1beta2DocumentProvenanceParent `json:"parents,omitempty"` - // Revision: The index of the revision that produced this element. - Revision int64 `json:"revision,omitempty"` - // Type: The type of provenance operation. - // - // Possible values: - // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation - // is specified a provenance entry is simply used to match against a `parent`. - // "ADD" - Add an element. - // "REMOVE" - Remove an element identified by `parent`. - // "UPDATE" - Updates any fields within the given provenance scope of the - // message. It overwrites the fields rather than replacing them. Use this when - // you want to update a field value of an entity without also updating all the - // child properties. - // "REPLACE" - Currently unused. Replace an element identified by `parent`. - // "EVAL_REQUESTED" - Deprecated. Request human review for the element - // identified by `parent`. - // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human - // review, confidence will be set to 1.0. - // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentProvenance) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentProvenance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentProvenanceParent: The parent element the -// current element is based on. Used for referencing/aligning, removal and -// replacement operations. -type GoogleCloudDocumentaiV1beta2DocumentProvenanceParent struct { - // Id: The id of the parent provenance. - Id int64 `json:"id,omitempty"` - // Index: The index of the parent item in the corresponding item list (eg. list - // of entities, properties within entities, etc.) in the parent revision. - Index int64 `json:"index,omitempty"` - // Revision: The index of the index into current revision's parent_ids list. - Revision int64 `json:"revision,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentProvenanceParent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentProvenanceParent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentRevision: Contains past or forward -// revisions of this document. -type GoogleCloudDocumentaiV1beta2DocumentRevision struct { - // Agent: If the change was made by a person specify the name or id of that - // person. - Agent string `json:"agent,omitempty"` - // CreateTime: The time that the revision was created, internally generated by - // doc proto storage at the time of create. - CreateTime string `json:"createTime,omitempty"` - // HumanReview: Human Review information of this revision. - HumanReview *GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview `json:"humanReview,omitempty"` - // Id: Id of the revision, internally generated by doc proto storage. Unique - // within the context of the document. - Id string `json:"id,omitempty"` - // Parent: The revisions that this revision is based on. This can include one - // or more parent (when documents are merged.) This field represents the index - // into the `revisions` field. - Parent []int64 `json:"parent,omitempty"` - // ParentIds: The revisions that this revision is based on. Must include all - // the ids that have anything to do with this revision - eg. there are - // `provenance.parent.revision` fields that index into this field. - ParentIds []string `json:"parentIds,omitempty"` - // Processor: If the annotation was made by processor identify the processor by - // its resource name. - Processor string `json:"processor,omitempty"` - // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Agent") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentRevision) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentRevision - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview: Human Review -// information of the document. -type GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview struct { - // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. - State string `json:"state,omitempty"` - // StateMessage: A message providing more details about the current state of - // processing. For example, the rejection reason when the state is `rejected`. - StateMessage string `json:"stateMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentShardInfo: For a large document, -// sharding may be performed to produce several document shards. Each document -// shard contains this field to detail which shard it is. -type GoogleCloudDocumentaiV1beta2DocumentShardInfo struct { - // ShardCount: Total number of shards. - ShardCount int64 `json:"shardCount,omitempty,string"` - // ShardIndex: The 0-based index of this shard. - ShardIndex int64 `json:"shardIndex,omitempty,string"` - // TextOffset: The index of the first character in Document.text in the overall - // document global text. - TextOffset int64 `json:"textOffset,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ShardCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ShardCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentShardInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentShardInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentStyle: Annotation for common text style -// attributes. This adheres to CSS conventions as much as possible. -type GoogleCloudDocumentaiV1beta2DocumentStyle struct { - // BackgroundColor: Text background color. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Color: Text color. - Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as `Arial`, `Times New Roman`. - // https://www.w3schools.com/cssref/pr_font_font-family.asp - FontFamily string `json:"fontFamily,omitempty"` - // FontSize: Font size. - FontSize *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize `json:"fontSize,omitempty"` - // FontWeight: Font weight - // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are - // `normal`, `bold`, `bolder`, and `lighter`. - FontWeight string `json:"fontWeight,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // TextDecoration: Text decoration - // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS - // standard. - TextDecoration string `json:"textDecoration,omitempty"` - // TextStyle: Text style - // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values - // are `normal`, `italic`, and `oblique`. - TextStyle string `json:"textStyle,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentStyle) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentStyle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentStyleFontSize: Font size with unit. -type GoogleCloudDocumentaiV1beta2DocumentStyleFontSize struct { - // Size: Font size for the text. - Size float64 `json:"size,omitempty"` - // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and - // `pt`). - Unit string `json:"unit,omitempty"` - // ForceSendFields is a list of field names (e.g. "Size") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Size") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentStyleFontSize) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentStyleFontSize - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentStyleFontSize - var s1 struct { - Size gensupport.JSONFloat64 `json:"size"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Size = float64(s1.Size) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentTextAnchor: Text reference indexing into -// the Document.text. -type GoogleCloudDocumentaiV1beta2DocumentTextAnchor struct { - // Content: Contains the content of the text span so that users do not have to - // look it up in the text_segments. It is always populated for formFields. - Content string `json:"content,omitempty"` - // TextSegments: The text segments from the Document.text. - TextSegments []*GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment `json:"textSegments,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentTextAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentTextAnchor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment: A text segment in -// the Document.text. The indices may be out of bounds which indicate that the -// text extends into another document shard for large sharded documents. See -// ShardInfo.text_offset -type GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment struct { - // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. - EndIndex int64 `json:"endIndex,omitempty,string"` - // StartIndex: TextSegment start UTF-8 char index in the Document.text. - StartIndex int64 `json:"startIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EndIndex") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndIndex") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentTextChange: This message is used for -// text changes aka. OCR corrections. -type GoogleCloudDocumentaiV1beta2DocumentTextChange struct { - // ChangedText: The text that replaces the text identified in the - // `text_anchor`. - ChangedText string `json:"changedText,omitempty"` - // Provenance: The history of this annotation. - Provenance []*GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // TextAnchor: Provenance of the correction. Text anchor indexing into the - // Document.text. There can only be a single `TextAnchor.text_segments` - // element. If the start and end index of the text segment are the same, the - // text change is inserted before that index. - TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChangedText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChangedText") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentTextChange) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentTextChange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2GcsDestination: The Google Cloud Storage -// location where the output file will be written to. -type GoogleCloudDocumentaiV1beta2GcsDestination struct { - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2GcsDestination) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2GcsDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2GcsSource: The Google Cloud Storage location -// where the input file will be read from. -type GoogleCloudDocumentaiV1beta2GcsSource struct { - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2GcsSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2GcsSource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2InputConfig: The desired input location and -// metadata. -type GoogleCloudDocumentaiV1beta2InputConfig struct { - // Contents: Content in bytes, represented as a stream of bytes. Note: As with - // all `bytes` fields, proto buffer messages use a pure binary representation, - // whereas JSON representations use base64. This field only works for - // synchronous ProcessDocument method. - Contents string `json:"contents,omitempty"` - // GcsSource: The Google Cloud Storage location to read the input from. This - // must be a single file. - GcsSource *GoogleCloudDocumentaiV1beta2GcsSource `json:"gcsSource,omitempty"` - // MimeType: Required. Mimetype of the input. Current supported mimetypes are - // application/pdf, image/tiff, and image/gif. In addition, application/json - // type is supported for requests with ProcessDocumentRequest.automl_params - // field set. The JSON file needs to be in Document format. - MimeType string `json:"mimeType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Contents") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2InputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2InputConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2NormalizedVertex: A vertex represents a 2D point -// in the image. NOTE: the normalized vertex coordinates are relative to the -// original image and range from 0 to 1. -type GoogleCloudDocumentaiV1beta2NormalizedVertex struct { - // X: X coordinate. - X float64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y float64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2NormalizedVertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2NormalizedVertex - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2NormalizedVertex) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2NormalizedVertex - var s1 struct { - X gensupport.JSONFloat64 `json:"x"` - Y gensupport.JSONFloat64 `json:"y"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.X = float64(s1.X) - s.Y = float64(s1.Y) - return nil -} - -// GoogleCloudDocumentaiV1beta2OperationMetadata: Contains metadata for the -// BatchProcessDocuments operation. -type GoogleCloudDocumentaiV1beta2OperationMetadata struct { - // CreateTime: The creation time of the operation. - CreateTime string `json:"createTime,omitempty"` - // State: The state of the current batch processing. - // - // Possible values: - // "STATE_UNSPECIFIED" - The default value. This value is used if the state - // is omitted. - // "ACCEPTED" - Request is received. - // "WAITING" - Request operation is waiting for scheduling. - // "RUNNING" - Request is being processed. - // "SUCCEEDED" - The batch processing completed successfully. - // "CANCELLED" - The batch processing was cancelled. - // "FAILED" - The batch processing has failed. - State string `json:"state,omitempty"` - // StateMessage: A message providing more details about the current state of - // processing. - StateMessage string `json:"stateMessage,omitempty"` - // UpdateTime: The last update time of the operation. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2OutputConfig: The desired output location and -// metadata. -type GoogleCloudDocumentaiV1beta2OutputConfig struct { - // GcsDestination: The Google Cloud Storage location to write the output to. - GcsDestination *GoogleCloudDocumentaiV1beta2GcsDestination `json:"gcsDestination,omitempty"` - // PagesPerShard: The max number of pages to include into each output Document - // shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not - // specified, the default value is 20. For example, for one pdf file with 100 - // pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 - // Document shard JSON files each containing 20 parsed pages will be written - // under the prefix OutputConfig.gcs_destination.uri and suffix - // pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS - // outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json - // pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json - PagesPerShard int64 `json:"pagesPerShard,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsDestination") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsDestination") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2OutputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2OutputConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2ProcessDocumentResponse: Response to a single -// document processing request. -type GoogleCloudDocumentaiV1beta2ProcessDocumentResponse struct { - // InputConfig: Information about the input file. This is the same as the - // corresponding input config in the request. - InputConfig *GoogleCloudDocumentaiV1beta2InputConfig `json:"inputConfig,omitempty"` - // OutputConfig: The output location of the parsed responses. The responses are - // written to this location as JSON-serialized `Document` objects. - OutputConfig *GoogleCloudDocumentaiV1beta2OutputConfig `json:"outputConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "InputConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2ProcessDocumentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2ProcessDocumentResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2Vertex: A vertex represents a 2D point in the -// image. NOTE: the vertex coordinates are in the same scale as the original -// image. -type GoogleCloudDocumentaiV1beta2Vertex struct { - // X: X coordinate. - X int64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y int64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2Vertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Vertex - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadata struct { // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 90f48fb6a5f..76c71247efc 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -1284,7 +1284,7 @@ } } }, - "revision": "20240813", + "revision": "20240911", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -2569,3354 +2569,6 @@ "properties": {}, "type": "object" }, - "GoogleCloudDocumentaiV1beta1Barcode": { - "description": "Encodes the detailed information of a barcode.", - "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.", - "type": "string" - }, - "rawValue": { - "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.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse": { - "description": "Response to an batch document processing request. This is returned in the LRO Operation after the operation is complete.", - "id": "GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse", - "properties": { - "responses": { - "description": "Responses for each individual document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1ProcessDocumentResponse" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1BoundingPoly": { - "description": "A bounding polygon for the detected image annotation.", - "id": "GoogleCloudDocumentaiV1beta1BoundingPoly", - "properties": { - "normalizedVertices": { - "description": "The bounding polygon normalized vertices.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1NormalizedVertex" - }, - "type": "array" - }, - "vertices": { - "description": "The bounding polygon vertices.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1Vertex" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1Document": { - "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", - "id": "GoogleCloudDocumentaiV1beta1Document", - "properties": { - "chunkedDocument": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", - "description": "Document chunked based on chunking config." - }, - "content": { - "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", - "format": "byte", - "type": "string" - }, - "documentLayout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", - "description": "Parsed layout of the document." - }, - "entities": { - "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntity" - }, - "type": "array" - }, - "entityRelations": { - "description": "Placeholder. Relationship among Document.entities.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntityRelation" - }, - "type": "array" - }, - "error": { - "$ref": "GoogleRpcStatus", - "description": "Any error that occurred while processing this document." - }, - "mimeType": { - "description": "An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).", - "type": "string" - }, - "pages": { - "description": "Visual page layout for the Document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPage" - }, - "type": "array" - }, - "revisions": { - "description": "Placeholder. Revision history of this document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentRevision" - }, - "type": "array" - }, - "shardInfo": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentShardInfo", - "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." - }, - "text": { - "description": "Optional. UTF-8 encoded text in reading order from the document.", - "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.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextChange" - }, - "type": "array" - }, - "textStyles": { - "deprecated": true, - "description": "Styles for the Document.text.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentStyle" - }, - "type": "array" - }, - "uri": { - "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument": { - "description": "Represents the chunks that the document is divided into.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocument", - "properties": { - "chunks": { - "description": "List of chunks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk": { - "description": "Represents a chunk.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk", - "properties": { - "chunkId": { - "description": "ID of the chunk.", - "type": "string" - }, - "content": { - "description": "Text content of the chunk.", - "type": "string" - }, - "pageFooters": { - "description": "Page footers associated with the chunk.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter" - }, - "type": "array" - }, - "pageHeaders": { - "description": "Page headers associated with the chunk.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader" - }, - "type": "array" - }, - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the chunk." - }, - "sourceBlockIds": { - "description": "Unused.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter": { - "description": "Represents the page footer associated with the chunk.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter", - "properties": { - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the footer." - }, - "text": { - "description": "Footer in text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader": { - "description": "Represents the page header associated with the chunk.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader", - "properties": { - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the header." - }, - "text": { - "description": "Header in text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan": { - "description": "Represents where the chunk starts and ends in the document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan", - "properties": { - "pageEnd": { - "description": "Page where chunk ends in the document.", - "format": "int32", - "type": "integer" - }, - "pageStart": { - "description": "Page where chunk starts in the document.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout": { - "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayout", - "properties": { - "blocks": { - "description": "List of blocks in the document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock": { - "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock", - "properties": { - "blockId": { - "description": "ID of the block.", - "type": "string" - }, - "listBlock": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", - "description": "Block consisting of list content/structure." - }, - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", - "description": "Page span of the block." - }, - "tableBlock": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", - "description": "Block consisting of table content/structure." - }, - "textBlock": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", - "description": "Block consisting of text content." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { - "description": "Represents a list type block.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", - "properties": { - "listEntries": { - "description": "List entries that constitute a list block.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" - }, - "type": "array" - }, - "type": { - "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { - "description": "Represents an entry in the list.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", - "properties": { - "blocks": { - "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { - "description": "Represents where the block starts and ends in the document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", - "properties": { - "pageEnd": { - "description": "Page where block ends in the document.", - "format": "int32", - "type": "integer" - }, - "pageStart": { - "description": "Page where block starts in the document.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { - "description": "Represents a table type block.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", - "properties": { - "bodyRows": { - "description": "Body rows containing main table content.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" - }, - "type": "array" - }, - "caption": { - "description": "Table caption/title.", - "type": "string" - }, - "headerRows": { - "description": "Header rows at the top of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { - "description": "Represents a cell in a table row.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", - "properties": { - "blocks": { - "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - }, - "colSpan": { - "description": "How many columns this cell spans.", - "format": "int32", - "type": "integer" - }, - "rowSpan": { - "description": "How many rows this cell spans.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { - "description": "Represents a row in a table.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", - "properties": { - "cells": { - "description": "A table row is a list of table cells.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { - "description": "Represents a text type block.", - "id": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", - "properties": { - "blocks": { - "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - }, - "text": { - "description": "Text content stored in the block.", - "type": "string" - }, - "type": { - "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentEntity": { - "description": "An entity that could be a 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.", - "id": "GoogleCloudDocumentaiV1beta1DocumentEntity", - "properties": { - "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "id": { - "description": "Optional. Canonical id. This will be a unique value in the entity list for this document.", - "type": "string" - }, - "mentionId": { - "description": "Optional. Deprecated. Use `id` field instead.", - "type": "string" - }, - "mentionText": { - "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", - "type": "string" - }, - "normalizedValue": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue", - "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." - }, - "pageAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageAnchor", - "description": "Optional. Represents the provenance of this entity wrt. the location on the page where it was found." - }, - "properties": { - "description": "Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentEntity" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "description": "Optional. The history of this annotation." - }, - "redacted": { - "description": "Optional. Whether the entity will be redacted for de-identification purposes.", - "type": "boolean" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." - }, - "type": { - "description": "Required. Entity type from a schema e.g. `Address`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue": { - "description": "Parsed and normalized entity value.", - "id": "GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue", - "properties": { - "addressValue": { - "$ref": "GoogleTypePostalAddress", - "description": "Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto" - }, - "booleanValue": { - "description": "Boolean value. Can be used for entities with binary values, or for checkboxes.", - "type": "boolean" - }, - "dateValue": { - "$ref": "GoogleTypeDate", - "description": "Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto" - }, - "datetimeValue": { - "$ref": "GoogleTypeDateTime", - "description": "DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto" - }, - "floatValue": { - "description": "Float value.", - "format": "float", - "type": "number" - }, - "integerValue": { - "description": "Integer value.", - "format": "int32", - "type": "integer" - }, - "moneyValue": { - "$ref": "GoogleTypeMoney", - "description": "Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto" - }, - "text": { - "description": "Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentEntityRelation": { - "description": "Relationship between Entities.", - "id": "GoogleCloudDocumentaiV1beta1DocumentEntityRelation", - "properties": { - "objectId": { - "description": "Object entity id.", - "type": "string" - }, - "relation": { - "description": "Relationship description.", - "type": "string" - }, - "subjectId": { - "description": "Subject entity id.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPage": { - "description": "A page in a Document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPage", - "properties": { - "blocks": { - "description": "A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageBlock" - }, - "type": "array" - }, - "detectedBarcodes": { - "description": "A list of detected barcodes.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode" - }, - "type": "array" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "dimension": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDimension", - "description": "Physical dimension of the page." - }, - "formFields": { - "description": "A list of visually detected form fields on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageFormField" - }, - "type": "array" - }, - "image": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImage", - "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." - }, - "imageQualityScores": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", - "description": "Image quality scores." - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for the page." - }, - "lines": { - "description": "A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLine" - }, - "type": "array" - }, - "pageNumber": { - "description": "1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.", - "format": "int32", - "type": "integer" - }, - "paragraphs": { - "description": "A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageParagraph" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this page." - }, - "symbols": { - "description": "A list of visually detected symbols on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol" - }, - "type": "array" - }, - "tables": { - "description": "A list of visually detected tables on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTable" - }, - "type": "array" - }, - "tokens": { - "description": "A list of visually detected tokens on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageToken" - }, - "type": "array" - }, - "transforms": { - "description": "Transformation matrices that were applied to the original document image to produce Page.image.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageMatrix" - }, - "type": "array" - }, - "visualElements": { - "description": "A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageVisualElement" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageAnchor": { - "description": "Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageAnchor", - "properties": { - "pageRefs": { - "description": "One or more references to visual page elements", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef": { - "description": "Represents a weak reference to a page element within a document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef", - "properties": { - "boundingPoly": { - "$ref": "GoogleCloudDocumentaiV1beta1BoundingPoly", - "description": "Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it's referring to." - }, - "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "layoutId": { - "deprecated": true, - "description": "Optional. Deprecated. Use PageRef.bounding_poly instead.", - "type": "string" - }, - "layoutType": { - "description": "Optional. The type of the layout element that is being referenced if any.", - "enum": [ - "LAYOUT_TYPE_UNSPECIFIED", - "BLOCK", - "PARAGRAPH", - "LINE", - "TOKEN", - "VISUAL_ELEMENT", - "TABLE", - "FORM_FIELD" - ], - "enumDescriptions": [ - "Layout Unspecified.", - "References a Page.blocks element.", - "References a Page.paragraphs element.", - "References a Page.lines element.", - "References a Page.tokens element.", - "References a Page.visual_elements element.", - "Refrrences a Page.tables element.", - "References a Page.form_fields element." - ], - "type": "string" - }, - "page": { - "description": "Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageBlock": { - "description": "A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageBlock", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Block." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode": { - "description": "A detected barcode.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode", - "properties": { - "barcode": { - "$ref": "GoogleCloudDocumentaiV1beta1Barcode", - "description": "Detailed barcode information of the DetectedBarcode." - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for DetectedBarcode." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage": { - "description": "Detected language for a structural component.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage", - "properties": { - "confidence": { - "description": "Confidence of detected language. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "languageCode": { - "description": "The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageDimension": { - "description": "Dimension for the page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageDimension", - "properties": { - "height": { - "description": "Page height.", - "format": "float", - "type": "number" - }, - "unit": { - "description": "Dimension unit.", - "type": "string" - }, - "width": { - "description": "Page width.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageFormField": { - "description": "A form field detected on the page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageFormField", - "properties": { - "correctedKeyText": { - "description": "Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.", - "type": "string" - }, - "correctedValueText": { - "description": "Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.", - "type": "string" - }, - "fieldName": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc." - }, - "fieldValue": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for the FormField value." - }, - "nameDetectedLanguages": { - "description": "A list of detected languages for name together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "description": "The history of this annotation." - }, - "valueDetectedLanguages": { - "description": "A list of detected languages for value together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "valueType": { - "description": "If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageImage": { - "description": "Rendered image contents for this page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageImage", - "properties": { - "content": { - "description": "Raw byte content of the image.", - "format": "byte", - "type": "string" - }, - "height": { - "description": "Height of the image in pixels.", - "format": "int32", - "type": "integer" - }, - "mimeType": { - "description": "Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.", - "type": "string" - }, - "width": { - "description": "Width of the image in pixels.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores": { - "description": "Image quality scores for the page image.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores", - "properties": { - "detectedDefects": { - "description": "A list of detected defects.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect" - }, - "type": "array" - }, - "qualityScore": { - "description": "The overall quality score. Range `[0, 1]` where `1` is perfect quality.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect": { - "description": "Image Quality Defects", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect", - "properties": { - "confidence": { - "description": "Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence 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`", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageLayout": { - "description": "Visual element describing a layout unit on a page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "properties": { - "boundingPoly": { - "$ref": "GoogleCloudDocumentaiV1beta1BoundingPoly", - "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]`.", - "format": "float", - "type": "number" - }, - "orientation": { - "description": "Detected orientation for the Layout.", - "enum": [ - "ORIENTATION_UNSPECIFIED", - "PAGE_UP", - "PAGE_RIGHT", - "PAGE_DOWN", - "PAGE_LEFT" - ], - "enumDescriptions": [ - "Unspecified orientation.", - "Orientation is aligned with page up.", - "Orientation is aligned with page right. Turn the head 90 degrees clockwise from upright to read.", - "Orientation is aligned with page down. Turn the head 180 degrees from upright to read.", - "Orientation is aligned with page left. Turn the head 90 degrees counterclockwise from upright to read." - ], - "type": "string" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Text anchor indexing into the Document.text." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageLine": { - "description": "A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageLine", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Line." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageMatrix": { - "description": "Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageMatrix", - "properties": { - "cols": { - "description": "Number of columns in the matrix.", - "format": "int32", - "type": "integer" - }, - "data": { - "description": "The matrix data.", - "format": "byte", - "type": "string" - }, - "rows": { - "description": "Number of rows in the matrix.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageParagraph": { - "description": "A collection of lines that a human would perceive as a paragraph.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageParagraph", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Paragraph." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageSymbol": { - "description": "A detected symbol.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageSymbol", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Symbol." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTable": { - "description": "A table representation similar to HTML table structure.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTable", - "properties": { - "bodyRows": { - "description": "Body rows of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow" - }, - "type": "array" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "headerRows": { - "description": "Header rows of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Table." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this table." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell": { - "description": "A cell representation inside the table.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell", - "properties": { - "colSpan": { - "description": "How many columns this cell spans.", - "format": "int32", - "type": "integer" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for TableCell." - }, - "rowSpan": { - "description": "How many rows this cell spans.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow": { - "description": "A row of table cells.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow", - "properties": { - "cells": { - "description": "Cells that make up this row.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageToken": { - "description": "A detected token.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageToken", - "properties": { - "detectedBreak": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak", - "description": "Detected break at the end of a Token." - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for Token." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - }, - "styleInfo": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo", - "description": "Text style attributes." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak": { - "description": "Detected break at the end of a Token.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak", - "properties": { - "type": { - "description": "Detected break type.", - "enum": [ - "TYPE_UNSPECIFIED", - "SPACE", - "WIDE_SPACE", - "HYPHEN" - ], - "enumDescriptions": [ - "Unspecified break type.", - "A single whitespace.", - "A wider whitespace.", - "A hyphen that indicates that a token has been split across lines." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo": { - "description": "Font and other text style attributes.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo", - "properties": { - "backgroundColor": { - "$ref": "GoogleTypeColor", - "description": "Color of the background." - }, - "bold": { - "description": "Whether the text is bold (equivalent to font_weight is at least `700`).", - "type": "boolean" - }, - "fontSize": { - "description": "Font size in points (`1` point is `¹⁄₇₂` inches).", - "format": "int32", - "type": "integer" - }, - "fontType": { - "description": "Name or style of the font.", - "type": "string" - }, - "fontWeight": { - "description": "TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.", - "format": "int32", - "type": "integer" - }, - "handwritten": { - "description": "Whether the text is handwritten.", - "type": "boolean" - }, - "italic": { - "description": "Whether the text is italic.", - "type": "boolean" - }, - "letterSpacing": { - "description": "Letter spacing in points.", - "format": "double", - "type": "number" - }, - "pixelFontSize": { - "description": "Font size in pixels, equal to _unrounded font_size_ * _resolution_ Ć· `72.0`.", - "format": "double", - "type": "number" - }, - "smallcaps": { - "description": "Whether the text is in small caps. This feature is not supported yet.", - "type": "boolean" - }, - "strikeout": { - "description": "Whether the text is strikethrough. This feature is not supported yet.", - "type": "boolean" - }, - "subscript": { - "description": "Whether the text is a subscript. This feature is not supported yet.", - "type": "boolean" - }, - "superscript": { - "description": "Whether the text is a superscript. This feature is not supported yet.", - "type": "boolean" - }, - "textColor": { - "$ref": "GoogleTypeColor", - "description": "Color of the text." - }, - "underlined": { - "description": "Whether the text is underlined.", - "type": "boolean" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentPageVisualElement": { - "description": "Detected non-text visual elements e.g. checkbox, signature etc. on the page.", - "id": "GoogleCloudDocumentaiV1beta1DocumentPageVisualElement", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentPageLayout", - "description": "Layout for VisualElement." - }, - "type": { - "description": "Type of the VisualElement.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentProvenance": { - "description": "Structure to identify provenance relationships between annotations in different revisions.", - "id": "GoogleCloudDocumentaiV1beta1DocumentProvenance", - "properties": { - "id": { - "deprecated": true, - "description": "The Id of this operation. Needs to be unique within the scope of the revision.", - "format": "int32", - "type": "integer" - }, - "parents": { - "description": "References to the original elements that are replaced.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenanceParent" - }, - "type": "array" - }, - "revision": { - "deprecated": true, - "description": "The index of the revision that produced this element.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "The type of provenance operation.", - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "ADD", - "REMOVE", - "UPDATE", - "REPLACE", - "EVAL_REQUESTED", - "EVAL_APPROVED", - "EVAL_SKIPPED" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - true, - true, - true - ], - "enumDescriptions": [ - "Operation type unspecified. If no operation is specified a provenance entry is simply used to match against a `parent`.", - "Add an element.", - "Remove an element identified by `parent`.", - "Updates any fields within the given provenance scope of the message. It overwrites the fields rather than replacing them. Use this when you want to update a field value of an entity without also updating all the child properties.", - "Currently unused. Replace an element identified by `parent`.", - "Deprecated. Request human review for the element identified by `parent`.", - "Deprecated. Element is reviewed and approved at human review, confidence will be set to 1.0.", - "Deprecated. Element is skipped in the validation process." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentProvenanceParent": { - "description": "The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.", - "id": "GoogleCloudDocumentaiV1beta1DocumentProvenanceParent", - "properties": { - "id": { - "deprecated": true, - "description": "The id of the parent provenance.", - "format": "int32", - "type": "integer" - }, - "index": { - "description": "The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.", - "format": "int32", - "type": "integer" - }, - "revision": { - "description": "The index of the index into current revision's parent_ids list.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentRevision": { - "description": "Contains past or forward revisions of this document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentRevision", - "properties": { - "agent": { - "description": "If the change was made by a person specify the name or id of that person.", - "type": "string" - }, - "createTime": { - "description": "The time that the revision was created, internally generated by doc proto storage at the time of create.", - "format": "google-datetime", - "type": "string" - }, - "humanReview": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview", - "description": "Human Review information of this revision." - }, - "id": { - "description": "Id of the revision, internally generated by doc proto storage. Unique within the context of the document.", - "type": "string" - }, - "parent": { - "deprecated": true, - "description": "The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "parentIds": { - "description": "The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.", - "items": { - "type": "string" - }, - "type": "array" - }, - "processor": { - "description": "If the annotation was made by processor identify the processor by its resource name.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview": { - "description": "Human Review information of the document.", - "id": "GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview", - "properties": { - "state": { - "description": "Human review state. e.g. `requested`, `succeeded`, `rejected`.", - "type": "string" - }, - "stateMessage": { - "description": "A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentShardInfo": { - "description": "For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is.", - "id": "GoogleCloudDocumentaiV1beta1DocumentShardInfo", - "properties": { - "shardCount": { - "description": "Total number of shards.", - "format": "int64", - "type": "string" - }, - "shardIndex": { - "description": "The 0-based index of this shard.", - "format": "int64", - "type": "string" - }, - "textOffset": { - "description": "The index of the first character in Document.text in the overall document global text.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentStyle": { - "description": "Annotation for common text style attributes. This adheres to CSS conventions as much as possible.", - "id": "GoogleCloudDocumentaiV1beta1DocumentStyle", - "properties": { - "backgroundColor": { - "$ref": "GoogleTypeColor", - "description": "Text background color." - }, - "color": { - "$ref": "GoogleTypeColor", - "description": "Text color." - }, - "fontFamily": { - "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", - "type": "string" - }, - "fontSize": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentStyleFontSize", - "description": "Font size." - }, - "fontWeight": { - "description": "[Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.", - "type": "string" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Text anchor indexing into the Document.text." - }, - "textDecoration": { - "description": "[Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard. ", - "type": "string" - }, - "textStyle": { - "description": "[Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentStyleFontSize": { - "description": "Font size with unit.", - "id": "GoogleCloudDocumentaiV1beta1DocumentStyleFontSize", - "properties": { - "size": { - "description": "Font size for the text.", - "format": "float", - "type": "number" - }, - "unit": { - "description": "Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentTextAnchor": { - "description": "Text reference indexing into the Document.text.", - "id": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "properties": { - "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", - "type": "string" - }, - "textSegments": { - "description": "The text segments from the Document.text.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment": { - "description": "A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset", - "id": "GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment", - "properties": { - "endIndex": { - "description": "TextSegment half open end UTF-8 char index in the Document.text.", - "format": "int64", - "type": "string" - }, - "startIndex": { - "description": "TextSegment start UTF-8 char index in the Document.text.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1DocumentTextChange": { - "description": "This message is used for text changes aka. OCR corrections.", - "id": "GoogleCloudDocumentaiV1beta1DocumentTextChange", - "properties": { - "changedText": { - "description": "The text that replaces the text identified in the `text_anchor`.", - "type": "string" - }, - "provenance": { - "deprecated": true, - "description": "The history of this annotation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentProvenance" - }, - "type": "array" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta1DocumentTextAnchor", - "description": "Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1GcsDestination": { - "description": "The Google Cloud Storage location where the output file will be written to.", - "id": "GoogleCloudDocumentaiV1beta1GcsDestination", - "properties": { - "uri": { - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1GcsSource": { - "description": "The Google Cloud Storage location where the input file will be read from.", - "id": "GoogleCloudDocumentaiV1beta1GcsSource", - "properties": { - "uri": { - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1InputConfig": { - "description": "The desired input location and metadata.", - "id": "GoogleCloudDocumentaiV1beta1InputConfig", - "properties": { - "gcsSource": { - "$ref": "GoogleCloudDocumentaiV1beta1GcsSource", - "description": "The Google Cloud Storage location to read the input from. This must be a single file." - }, - "mimeType": { - "description": "Required. Mimetype of the input. Current supported mimetypes are application/pdf, image/tiff, and image/gif. In addition, application/json type is supported for requests with ProcessDocumentRequest.automl_params field set. The JSON file needs to be in Document format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1NormalizedVertex": { - "description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", - "id": "GoogleCloudDocumentaiV1beta1NormalizedVertex", - "properties": { - "x": { - "description": "X coordinate.", - "format": "float", - "type": "number" - }, - "y": { - "description": "Y coordinate (starts from the top of the image).", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1OperationMetadata": { - "description": "Contains metadata for the BatchProcessDocuments operation.", - "id": "GoogleCloudDocumentaiV1beta1OperationMetadata", - "properties": { - "createTime": { - "description": "The creation time of the operation.", - "format": "google-datetime", - "type": "string" - }, - "state": { - "description": "The state of the current batch processing.", - "enum": [ - "STATE_UNSPECIFIED", - "ACCEPTED", - "WAITING", - "RUNNING", - "SUCCEEDED", - "CANCELLED", - "FAILED" - ], - "enumDescriptions": [ - "The default value. This value is used if the state is omitted.", - "Request is received.", - "Request operation is waiting for scheduling.", - "Request is being processed.", - "The batch processing completed successfully.", - "The batch processing was cancelled.", - "The batch processing has failed." - ], - "type": "string" - }, - "stateMessage": { - "description": "A message providing more details about the current state of processing.", - "type": "string" - }, - "updateTime": { - "description": "The last update time of the operation.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1OutputConfig": { - "description": "The desired output location and metadata.", - "id": "GoogleCloudDocumentaiV1beta1OutputConfig", - "properties": { - "gcsDestination": { - "$ref": "GoogleCloudDocumentaiV1beta1GcsDestination", - "description": "The Google Cloud Storage location to write the output to." - }, - "pagesPerShard": { - "description": "The max number of pages to include into each output Document shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each containing 20 parsed pages will be written under the prefix OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1ProcessDocumentResponse": { - "description": "Response to a single document processing request.", - "id": "GoogleCloudDocumentaiV1beta1ProcessDocumentResponse", - "properties": { - "inputConfig": { - "$ref": "GoogleCloudDocumentaiV1beta1InputConfig", - "description": "Information about the input file. This is the same as the corresponding input config in the request." - }, - "outputConfig": { - "$ref": "GoogleCloudDocumentaiV1beta1OutputConfig", - "description": "The output location of the parsed responses. The responses are written to this location as JSON-serialized `Document` objects." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta1Vertex": { - "description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", - "id": "GoogleCloudDocumentaiV1beta1Vertex", - "properties": { - "x": { - "description": "X coordinate.", - "format": "int32", - "type": "integer" - }, - "y": { - "description": "Y coordinate (starts from the top of the image).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2Barcode": { - "description": "Encodes the detailed information of a barcode.", - "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.", - "type": "string" - }, - "rawValue": { - "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.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse": { - "description": "Response to an batch document processing request. This is returned in the LRO Operation after the operation is complete.", - "id": "GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse", - "properties": { - "responses": { - "description": "Responses for each individual document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2ProcessDocumentResponse" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2BoundingPoly": { - "description": "A bounding polygon for the detected image annotation.", - "id": "GoogleCloudDocumentaiV1beta2BoundingPoly", - "properties": { - "normalizedVertices": { - "description": "The bounding polygon normalized vertices.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2NormalizedVertex" - }, - "type": "array" - }, - "vertices": { - "description": "The bounding polygon vertices.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2Vertex" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2Document": { - "description": "Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.", - "id": "GoogleCloudDocumentaiV1beta2Document", - "properties": { - "chunkedDocument": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", - "description": "Document chunked based on chunking config." - }, - "content": { - "description": "Optional. Inline document content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", - "format": "byte", - "type": "string" - }, - "documentLayout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", - "description": "Parsed layout of the document." - }, - "entities": { - "description": "A list of entities detected on Document.text. For document shards, entities in this list may cross shard boundaries.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntity" - }, - "type": "array" - }, - "entityRelations": { - "description": "Placeholder. Relationship among Document.entities.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntityRelation" - }, - "type": "array" - }, - "error": { - "$ref": "GoogleRpcStatus", - "description": "Any error that occurred while processing this document." - }, - "labels": { - "description": "Labels for this document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentLabel" - }, - "type": "array" - }, - "mimeType": { - "description": "An IANA published [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml).", - "type": "string" - }, - "pages": { - "description": "Visual page layout for the Document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPage" - }, - "type": "array" - }, - "revisions": { - "description": "Placeholder. Revision history of this document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentRevision" - }, - "type": "array" - }, - "shardInfo": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentShardInfo", - "description": "Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified." - }, - "text": { - "description": "Optional. UTF-8 encoded text in reading order from the document.", - "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.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextChange" - }, - "type": "array" - }, - "textStyles": { - "deprecated": true, - "description": "Styles for the Document.text.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentStyle" - }, - "type": "array" - }, - "uri": { - "description": "Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. For more information, refer to [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument": { - "description": "Represents the chunks that the document is divided into.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocument", - "properties": { - "chunks": { - "description": "List of chunks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk": { - "description": "Represents a chunk.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk", - "properties": { - "chunkId": { - "description": "ID of the chunk.", - "type": "string" - }, - "content": { - "description": "Text content of the chunk.", - "type": "string" - }, - "pageFooters": { - "description": "Page footers associated with the chunk.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter" - }, - "type": "array" - }, - "pageHeaders": { - "description": "Page headers associated with the chunk.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader" - }, - "type": "array" - }, - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the chunk." - }, - "sourceBlockIds": { - "description": "Unused.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter": { - "description": "Represents the page footer associated with the chunk.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter", - "properties": { - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the footer." - }, - "text": { - "description": "Footer in text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader": { - "description": "Represents the page header associated with the chunk.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader", - "properties": { - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", - "description": "Page span of the header." - }, - "text": { - "description": "Header in text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan": { - "description": "Represents where the chunk starts and ends in the document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan", - "properties": { - "pageEnd": { - "description": "Page where chunk ends in the document.", - "format": "int32", - "type": "integer" - }, - "pageStart": { - "description": "Page where chunk starts in the document.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout": { - "description": "Represents the parsed layout of a document as a collection of blocks that the document is divided into.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayout", - "properties": { - "blocks": { - "description": "List of blocks in the document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock": { - "description": "Represents a block. A block could be one of the various types (text, table, list) supported.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock", - "properties": { - "blockId": { - "description": "ID of the block.", - "type": "string" - }, - "listBlock": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", - "description": "Block consisting of list content/structure." - }, - "pageSpan": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", - "description": "Page span of the block." - }, - "tableBlock": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", - "description": "Block consisting of table content/structure." - }, - "textBlock": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", - "description": "Block consisting of text content." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock": { - "description": "Represents a list type block.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock", - "properties": { - "listEntries": { - "description": "List entries that constitute a list block.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry" - }, - "type": "array" - }, - "type": { - "description": "Type of the list_entries (if exist). Available options are `ordered` and `unordered`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry": { - "description": "Represents an entry in the list.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry", - "properties": { - "blocks": { - "description": "A list entry is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan": { - "description": "Represents where the block starts and ends in the document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan", - "properties": { - "pageEnd": { - "description": "Page where block ends in the document.", - "format": "int32", - "type": "integer" - }, - "pageStart": { - "description": "Page where block starts in the document.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock": { - "description": "Represents a table type block.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock", - "properties": { - "bodyRows": { - "description": "Body rows containing main table content.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" - }, - "type": "array" - }, - "caption": { - "description": "Table caption/title.", - "type": "string" - }, - "headerRows": { - "description": "Header rows at the top of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell": { - "description": "Represents a cell in a table row.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell", - "properties": { - "blocks": { - "description": "A table cell is a list of blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - }, - "colSpan": { - "description": "How many columns this cell spans.", - "format": "int32", - "type": "integer" - }, - "rowSpan": { - "description": "How many rows this cell spans.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow": { - "description": "Represents a row in a table.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow", - "properties": { - "cells": { - "description": "A table row is a list of table cells.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock": { - "description": "Represents a text type block.", - "id": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock", - "properties": { - "blocks": { - "description": "A text block could further have child blocks. Repeated blocks support further hierarchies and nested blocks.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock" - }, - "type": "array" - }, - "text": { - "description": "Text content stored in the block.", - "type": "string" - }, - "type": { - "description": "Type of the text in the block. Available options are: `paragraph`, `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, `header`, `footer`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentEntity": { - "description": "An entity that could be a 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.", - "id": "GoogleCloudDocumentaiV1beta2DocumentEntity", - "properties": { - "confidence": { - "description": "Optional. Confidence of detected Schema entity. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "id": { - "description": "Optional. Canonical id. This will be a unique value in the entity list for this document.", - "type": "string" - }, - "mentionId": { - "description": "Optional. Deprecated. Use `id` field instead.", - "type": "string" - }, - "mentionText": { - "description": "Optional. Text value of the entity e.g. `1600 Amphitheatre Pkwy`.", - "type": "string" - }, - "normalizedValue": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue", - "description": "Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only populated for certain supported document types." - }, - "pageAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageAnchor", - "description": "Optional. Represents the provenance of this entity wrt. the location on the page where it was found." - }, - "properties": { - "description": "Optional. Entities can be nested to form a hierarchical data structure representing the content in the document.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentEntity" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "description": "Optional. The history of this annotation." - }, - "redacted": { - "description": "Optional. Whether the entity will be redacted for de-identification purposes.", - "type": "boolean" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Optional. Provenance of the entity. Text anchor indexing into the Document.text." - }, - "type": { - "description": "Required. Entity type from a schema e.g. `Address`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue": { - "description": "Parsed and normalized entity value.", - "id": "GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue", - "properties": { - "addressValue": { - "$ref": "GoogleTypePostalAddress", - "description": "Postal address. See also: https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto" - }, - "booleanValue": { - "description": "Boolean value. Can be used for entities with binary values, or for checkboxes.", - "type": "boolean" - }, - "dateValue": { - "$ref": "GoogleTypeDate", - "description": "Date value. Includes year, month, day. See also: https://github.com/googleapis/googleapis/blob/master/google/type/date.proto" - }, - "datetimeValue": { - "$ref": "GoogleTypeDateTime", - "description": "DateTime value. Includes date, time, and timezone. See also: https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto" - }, - "floatValue": { - "description": "Float value.", - "format": "float", - "type": "number" - }, - "integerValue": { - "description": "Integer value.", - "format": "int32", - "type": "integer" - }, - "moneyValue": { - "$ref": "GoogleTypeMoney", - "description": "Money value. See also: https://github.com/googleapis/googleapis/blob/master/google/type/money.proto" - }, - "text": { - "description": "Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601 text format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentEntityRelation": { - "description": "Relationship between Entities.", - "id": "GoogleCloudDocumentaiV1beta2DocumentEntityRelation", - "properties": { - "objectId": { - "description": "Object entity id.", - "type": "string" - }, - "relation": { - "description": "Relationship description.", - "type": "string" - }, - "subjectId": { - "description": "Subject entity id.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentLabel": { - "description": "Label attaches schema information and/or other metadata to segments within a Document. Multiple Labels on a single field can denote either different labels, different instances of the same label created at different times, or some combination of both.", - "id": "GoogleCloudDocumentaiV1beta2DocumentLabel", - "properties": { - "automlModel": { - "description": "Label is generated AutoML model. This field stores the full resource name of the AutoML model. Format: `projects/{project-id}/locations/{location-id}/models/{model-id}`", - "type": "string" - }, - "confidence": { - "description": "Confidence score between 0 and 1 for label assignment.", - "format": "float", - "type": "number" - }, - "name": { - "description": "Name of the label. When the label is generated from AutoML Text Classification model, this field represents the name of the category.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPage": { - "description": "A page in a Document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPage", - "properties": { - "blocks": { - "description": "A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageBlock" - }, - "type": "array" - }, - "detectedBarcodes": { - "description": "A list of detected barcodes.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode" - }, - "type": "array" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "dimension": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDimension", - "description": "Physical dimension of the page." - }, - "formFields": { - "description": "A list of visually detected form fields on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageFormField" - }, - "type": "array" - }, - "image": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImage", - "description": "Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned." - }, - "imageQualityScores": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", - "description": "Image quality scores." - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for the page." - }, - "lines": { - "description": "A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLine" - }, - "type": "array" - }, - "pageNumber": { - "description": "1-based index for current Page in a parent Document. Useful when a page is taken out of a Document for individual processing.", - "format": "int32", - "type": "integer" - }, - "paragraphs": { - "description": "A list of visually detected text paragraphs on the page. A collection of lines that a human would perceive as a paragraph.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageParagraph" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this page." - }, - "symbols": { - "description": "A list of visually detected symbols on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol" - }, - "type": "array" - }, - "tables": { - "description": "A list of visually detected tables on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTable" - }, - "type": "array" - }, - "tokens": { - "description": "A list of visually detected tokens on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageToken" - }, - "type": "array" - }, - "transforms": { - "description": "Transformation matrices that were applied to the original document image to produce Page.image.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageMatrix" - }, - "type": "array" - }, - "visualElements": { - "description": "A list of detected non-text visual elements e.g. checkbox, signature etc. on the page.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageVisualElement" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageAnchor": { - "description": "Referencing the visual context of the entity in the Document.pages. Page anchors can be cross-page, consist of multiple bounding polygons and optionally reference specific layout element types.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageAnchor", - "properties": { - "pageRefs": { - "description": "One or more references to visual page elements", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef": { - "description": "Represents a weak reference to a page element within a document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef", - "properties": { - "boundingPoly": { - "$ref": "GoogleCloudDocumentaiV1beta2BoundingPoly", - "description": "Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it's referring to." - }, - "confidence": { - "description": "Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "layoutId": { - "deprecated": true, - "description": "Optional. Deprecated. Use PageRef.bounding_poly instead.", - "type": "string" - }, - "layoutType": { - "description": "Optional. The type of the layout element that is being referenced if any.", - "enum": [ - "LAYOUT_TYPE_UNSPECIFIED", - "BLOCK", - "PARAGRAPH", - "LINE", - "TOKEN", - "VISUAL_ELEMENT", - "TABLE", - "FORM_FIELD" - ], - "enumDescriptions": [ - "Layout Unspecified.", - "References a Page.blocks element.", - "References a Page.paragraphs element.", - "References a Page.lines element.", - "References a Page.tokens element.", - "References a Page.visual_elements element.", - "Refrrences a Page.tables element.", - "References a Page.form_fields element." - ], - "type": "string" - }, - "page": { - "description": "Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageBlock": { - "description": "A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageBlock", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Block." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode": { - "description": "A detected barcode.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode", - "properties": { - "barcode": { - "$ref": "GoogleCloudDocumentaiV1beta2Barcode", - "description": "Detailed barcode information of the DetectedBarcode." - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for DetectedBarcode." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage": { - "description": "Detected language for a structural component.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage", - "properties": { - "confidence": { - "description": "Confidence of detected language. Range `[0, 1]`.", - "format": "float", - "type": "number" - }, - "languageCode": { - "description": "The [BCP-47 language code](https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as `en-US` or `sr-Latn`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageDimension": { - "description": "Dimension for the page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageDimension", - "properties": { - "height": { - "description": "Page height.", - "format": "float", - "type": "number" - }, - "unit": { - "description": "Dimension unit.", - "type": "string" - }, - "width": { - "description": "Page width.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageFormField": { - "description": "A form field detected on the page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageFormField", - "properties": { - "correctedKeyText": { - "description": "Created for Labeling UI to export key text. If corrections were made to the text identified by the `field_name.text_anchor`, this field will contain the correction.", - "type": "string" - }, - "correctedValueText": { - "description": "Created for Labeling UI to export value text. If corrections were made to the text identified by the `field_value.text_anchor`, this field will contain the correction.", - "type": "string" - }, - "fieldName": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for the FormField name. e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc." - }, - "fieldValue": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for the FormField value." - }, - "nameDetectedLanguages": { - "description": "A list of detected languages for name together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "description": "The history of this annotation." - }, - "valueDetectedLanguages": { - "description": "A list of detected languages for value together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "valueType": { - "description": "If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` - `filled_checkbox`", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageImage": { - "description": "Rendered image contents for this page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageImage", - "properties": { - "content": { - "description": "Raw byte content of the image.", - "format": "byte", - "type": "string" - }, - "height": { - "description": "Height of the image in pixels.", - "format": "int32", - "type": "integer" - }, - "mimeType": { - "description": "Encoding [media type (MIME type)](https://www.iana.org/assignments/media-types/media-types.xhtml) for the image.", - "type": "string" - }, - "width": { - "description": "Width of the image in pixels.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores": { - "description": "Image quality scores for the page image.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores", - "properties": { - "detectedDefects": { - "description": "A list of detected defects.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect" - }, - "type": "array" - }, - "qualityScore": { - "description": "The overall quality score. Range `[0, 1]` where `1` is perfect quality.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect": { - "description": "Image Quality Defects", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect", - "properties": { - "confidence": { - "description": "Confidence of detected defect. Range `[0, 1]` where `1` indicates strong confidence 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`", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageLayout": { - "description": "Visual element describing a layout unit on a page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "properties": { - "boundingPoly": { - "$ref": "GoogleCloudDocumentaiV1beta2BoundingPoly", - "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]`.", - "format": "float", - "type": "number" - }, - "orientation": { - "description": "Detected orientation for the Layout.", - "enum": [ - "ORIENTATION_UNSPECIFIED", - "PAGE_UP", - "PAGE_RIGHT", - "PAGE_DOWN", - "PAGE_LEFT" - ], - "enumDescriptions": [ - "Unspecified orientation.", - "Orientation is aligned with page up.", - "Orientation is aligned with page right. Turn the head 90 degrees clockwise from upright to read.", - "Orientation is aligned with page down. Turn the head 180 degrees from upright to read.", - "Orientation is aligned with page left. Turn the head 90 degrees counterclockwise from upright to read." - ], - "type": "string" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Text anchor indexing into the Document.text." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageLine": { - "description": "A collection of tokens that a human would perceive as a line. Does not cross column boundaries, can be horizontal, vertical, etc.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageLine", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Line." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageMatrix": { - "description": "Representation for transformation matrix, intended to be compatible and used with OpenCV format for image manipulation.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageMatrix", - "properties": { - "cols": { - "description": "Number of columns in the matrix.", - "format": "int32", - "type": "integer" - }, - "data": { - "description": "The matrix data.", - "format": "byte", - "type": "string" - }, - "rows": { - "description": "Number of rows in the matrix.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "This encodes information about what data type the matrix uses. For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV primitive data types, please refer to https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageParagraph": { - "description": "A collection of lines that a human would perceive as a paragraph.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageParagraph", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Paragraph." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageSymbol": { - "description": "A detected symbol.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageSymbol", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Symbol." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTable": { - "description": "A table representation similar to HTML table structure.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTable", - "properties": { - "bodyRows": { - "description": "Body rows of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow" - }, - "type": "array" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "headerRows": { - "description": "Header rows of the table.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Table." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this table." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell": { - "description": "A cell representation inside the table.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell", - "properties": { - "colSpan": { - "description": "How many columns this cell spans.", - "format": "int32", - "type": "integer" - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for TableCell." - }, - "rowSpan": { - "description": "How many rows this cell spans.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow": { - "description": "A row of table cells.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow", - "properties": { - "cells": { - "description": "Cells that make up this row.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageToken": { - "description": "A detected token.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageToken", - "properties": { - "detectedBreak": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak", - "description": "Detected break at the end of a Token." - }, - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for Token." - }, - "provenance": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "deprecated": true, - "description": "The history of this annotation." - }, - "styleInfo": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo", - "description": "Text style attributes." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak": { - "description": "Detected break at the end of a Token.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak", - "properties": { - "type": { - "description": "Detected break type.", - "enum": [ - "TYPE_UNSPECIFIED", - "SPACE", - "WIDE_SPACE", - "HYPHEN" - ], - "enumDescriptions": [ - "Unspecified break type.", - "A single whitespace.", - "A wider whitespace.", - "A hyphen that indicates that a token has been split across lines." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo": { - "description": "Font and other text style attributes.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo", - "properties": { - "backgroundColor": { - "$ref": "GoogleTypeColor", - "description": "Color of the background." - }, - "bold": { - "description": "Whether the text is bold (equivalent to font_weight is at least `700`).", - "type": "boolean" - }, - "fontSize": { - "description": "Font size in points (`1` point is `¹⁄₇₂` inches).", - "format": "int32", - "type": "integer" - }, - "fontType": { - "description": "Name or style of the font.", - "type": "string" - }, - "fontWeight": { - "description": "TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). Normal is `400`, bold is `700`.", - "format": "int32", - "type": "integer" - }, - "handwritten": { - "description": "Whether the text is handwritten.", - "type": "boolean" - }, - "italic": { - "description": "Whether the text is italic.", - "type": "boolean" - }, - "letterSpacing": { - "description": "Letter spacing in points.", - "format": "double", - "type": "number" - }, - "pixelFontSize": { - "description": "Font size in pixels, equal to _unrounded font_size_ * _resolution_ Ć· `72.0`.", - "format": "double", - "type": "number" - }, - "smallcaps": { - "description": "Whether the text is in small caps. This feature is not supported yet.", - "type": "boolean" - }, - "strikeout": { - "description": "Whether the text is strikethrough. This feature is not supported yet.", - "type": "boolean" - }, - "subscript": { - "description": "Whether the text is a subscript. This feature is not supported yet.", - "type": "boolean" - }, - "superscript": { - "description": "Whether the text is a superscript. This feature is not supported yet.", - "type": "boolean" - }, - "textColor": { - "$ref": "GoogleTypeColor", - "description": "Color of the text." - }, - "underlined": { - "description": "Whether the text is underlined.", - "type": "boolean" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentPageVisualElement": { - "description": "Detected non-text visual elements e.g. checkbox, signature etc. on the page.", - "id": "GoogleCloudDocumentaiV1beta2DocumentPageVisualElement", - "properties": { - "detectedLanguages": { - "description": "A list of detected languages together with confidence.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage" - }, - "type": "array" - }, - "layout": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentPageLayout", - "description": "Layout for VisualElement." - }, - "type": { - "description": "Type of the VisualElement.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentProvenance": { - "description": "Structure to identify provenance relationships between annotations in different revisions.", - "id": "GoogleCloudDocumentaiV1beta2DocumentProvenance", - "properties": { - "id": { - "deprecated": true, - "description": "The Id of this operation. Needs to be unique within the scope of the revision.", - "format": "int32", - "type": "integer" - }, - "parents": { - "description": "References to the original elements that are replaced.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenanceParent" - }, - "type": "array" - }, - "revision": { - "deprecated": true, - "description": "The index of the revision that produced this element.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "The type of provenance operation.", - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "ADD", - "REMOVE", - "UPDATE", - "REPLACE", - "EVAL_REQUESTED", - "EVAL_APPROVED", - "EVAL_SKIPPED" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - true, - true, - true - ], - "enumDescriptions": [ - "Operation type unspecified. If no operation is specified a provenance entry is simply used to match against a `parent`.", - "Add an element.", - "Remove an element identified by `parent`.", - "Updates any fields within the given provenance scope of the message. It overwrites the fields rather than replacing them. Use this when you want to update a field value of an entity without also updating all the child properties.", - "Currently unused. Replace an element identified by `parent`.", - "Deprecated. Request human review for the element identified by `parent`.", - "Deprecated. Element is reviewed and approved at human review, confidence will be set to 1.0.", - "Deprecated. Element is skipped in the validation process." - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentProvenanceParent": { - "description": "The parent element the current element is based on. Used for referencing/aligning, removal and replacement operations.", - "id": "GoogleCloudDocumentaiV1beta2DocumentProvenanceParent", - "properties": { - "id": { - "deprecated": true, - "description": "The id of the parent provenance.", - "format": "int32", - "type": "integer" - }, - "index": { - "description": "The index of the parent item in the corresponding item list (eg. list of entities, properties within entities, etc.) in the parent revision.", - "format": "int32", - "type": "integer" - }, - "revision": { - "description": "The index of the index into current revision's parent_ids list.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentRevision": { - "description": "Contains past or forward revisions of this document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentRevision", - "properties": { - "agent": { - "description": "If the change was made by a person specify the name or id of that person.", - "type": "string" - }, - "createTime": { - "description": "The time that the revision was created, internally generated by doc proto storage at the time of create.", - "format": "google-datetime", - "type": "string" - }, - "humanReview": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview", - "description": "Human Review information of this revision." - }, - "id": { - "description": "Id of the revision, internally generated by doc proto storage. Unique within the context of the document.", - "type": "string" - }, - "parent": { - "deprecated": true, - "description": "The revisions that this revision is based on. This can include one or more parent (when documents are merged.) This field represents the index into the `revisions` field.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "parentIds": { - "description": "The revisions that this revision is based on. Must include all the ids that have anything to do with this revision - eg. there are `provenance.parent.revision` fields that index into this field.", - "items": { - "type": "string" - }, - "type": "array" - }, - "processor": { - "description": "If the annotation was made by processor identify the processor by its resource name.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview": { - "description": "Human Review information of the document.", - "id": "GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview", - "properties": { - "state": { - "description": "Human review state. e.g. `requested`, `succeeded`, `rejected`.", - "type": "string" - }, - "stateMessage": { - "description": "A message providing more details about the current state of processing. For example, the rejection reason when the state is `rejected`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentShardInfo": { - "description": "For a large document, sharding may be performed to produce several document shards. Each document shard contains this field to detail which shard it is.", - "id": "GoogleCloudDocumentaiV1beta2DocumentShardInfo", - "properties": { - "shardCount": { - "description": "Total number of shards.", - "format": "int64", - "type": "string" - }, - "shardIndex": { - "description": "The 0-based index of this shard.", - "format": "int64", - "type": "string" - }, - "textOffset": { - "description": "The index of the first character in Document.text in the overall document global text.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentStyle": { - "description": "Annotation for common text style attributes. This adheres to CSS conventions as much as possible.", - "id": "GoogleCloudDocumentaiV1beta2DocumentStyle", - "properties": { - "backgroundColor": { - "$ref": "GoogleTypeColor", - "description": "Text background color." - }, - "color": { - "$ref": "GoogleTypeColor", - "description": "Text color." - }, - "fontFamily": { - "description": "Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp", - "type": "string" - }, - "fontSize": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentStyleFontSize", - "description": "Font size." - }, - "fontWeight": { - "description": "[Font weight](https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are `normal`, `bold`, `bolder`, and `lighter`.", - "type": "string" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Text anchor indexing into the Document.text." - }, - "textDecoration": { - "description": "[Text decoration](https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS standard. ", - "type": "string" - }, - "textStyle": { - "description": "[Text style](https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values are `normal`, `italic`, and `oblique`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentStyleFontSize": { - "description": "Font size with unit.", - "id": "GoogleCloudDocumentaiV1beta2DocumentStyleFontSize", - "properties": { - "size": { - "description": "Font size for the text.", - "format": "float", - "type": "number" - }, - "unit": { - "description": "Unit for the font size. Follows CSS naming (such as `in`, `px`, and `pt`).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentTextAnchor": { - "description": "Text reference indexing into the Document.text.", - "id": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "properties": { - "content": { - "description": "Contains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.", - "type": "string" - }, - "textSegments": { - "description": "The text segments from the Document.text.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment": { - "description": "A text segment in the Document.text. The indices may be out of bounds which indicate that the text extends into another document shard for large sharded documents. See ShardInfo.text_offset", - "id": "GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment", - "properties": { - "endIndex": { - "description": "TextSegment half open end UTF-8 char index in the Document.text.", - "format": "int64", - "type": "string" - }, - "startIndex": { - "description": "TextSegment start UTF-8 char index in the Document.text.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2DocumentTextChange": { - "description": "This message is used for text changes aka. OCR corrections.", - "id": "GoogleCloudDocumentaiV1beta2DocumentTextChange", - "properties": { - "changedText": { - "description": "The text that replaces the text identified in the `text_anchor`.", - "type": "string" - }, - "provenance": { - "deprecated": true, - "description": "The history of this annotation.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentProvenance" - }, - "type": "array" - }, - "textAnchor": { - "$ref": "GoogleCloudDocumentaiV1beta2DocumentTextAnchor", - "description": "Provenance of the correction. Text anchor indexing into the Document.text. There can only be a single `TextAnchor.text_segments` element. If the start and end index of the text segment are the same, the text change is inserted before that index." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2GcsDestination": { - "description": "The Google Cloud Storage location where the output file will be written to.", - "id": "GoogleCloudDocumentaiV1beta2GcsDestination", - "properties": { - "uri": { - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2GcsSource": { - "description": "The Google Cloud Storage location where the input file will be read from.", - "id": "GoogleCloudDocumentaiV1beta2GcsSource", - "properties": { - "uri": { - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2InputConfig": { - "description": "The desired input location and metadata.", - "id": "GoogleCloudDocumentaiV1beta2InputConfig", - "properties": { - "contents": { - "description": "Content in bytes, represented as a stream of bytes. Note: As with all `bytes` fields, proto buffer messages use a pure binary representation, whereas JSON representations use base64. This field only works for synchronous ProcessDocument method.", - "format": "byte", - "type": "string" - }, - "gcsSource": { - "$ref": "GoogleCloudDocumentaiV1beta2GcsSource", - "description": "The Google Cloud Storage location to read the input from. This must be a single file." - }, - "mimeType": { - "description": "Required. Mimetype of the input. Current supported mimetypes are application/pdf, image/tiff, and image/gif. In addition, application/json type is supported for requests with ProcessDocumentRequest.automl_params field set. The JSON file needs to be in Document format.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2NormalizedVertex": { - "description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", - "id": "GoogleCloudDocumentaiV1beta2NormalizedVertex", - "properties": { - "x": { - "description": "X coordinate.", - "format": "float", - "type": "number" - }, - "y": { - "description": "Y coordinate (starts from the top of the image).", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2OperationMetadata": { - "description": "Contains metadata for the BatchProcessDocuments operation.", - "id": "GoogleCloudDocumentaiV1beta2OperationMetadata", - "properties": { - "createTime": { - "description": "The creation time of the operation.", - "format": "google-datetime", - "type": "string" - }, - "state": { - "description": "The state of the current batch processing.", - "enum": [ - "STATE_UNSPECIFIED", - "ACCEPTED", - "WAITING", - "RUNNING", - "SUCCEEDED", - "CANCELLED", - "FAILED" - ], - "enumDescriptions": [ - "The default value. This value is used if the state is omitted.", - "Request is received.", - "Request operation is waiting for scheduling.", - "Request is being processed.", - "The batch processing completed successfully.", - "The batch processing was cancelled.", - "The batch processing has failed." - ], - "type": "string" - }, - "stateMessage": { - "description": "A message providing more details about the current state of processing.", - "type": "string" - }, - "updateTime": { - "description": "The last update time of the operation.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2OutputConfig": { - "description": "The desired output location and metadata.", - "id": "GoogleCloudDocumentaiV1beta2OutputConfig", - "properties": { - "gcsDestination": { - "$ref": "GoogleCloudDocumentaiV1beta2GcsDestination", - "description": "The Google Cloud Storage location to write the output to." - }, - "pagesPerShard": { - "description": "The max number of pages to include into each output Document shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 Document shard JSON files each containing 20 parsed pages will be written under the prefix OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2ProcessDocumentResponse": { - "description": "Response to a single document processing request.", - "id": "GoogleCloudDocumentaiV1beta2ProcessDocumentResponse", - "properties": { - "inputConfig": { - "$ref": "GoogleCloudDocumentaiV1beta2InputConfig", - "description": "Information about the input file. This is the same as the corresponding input config in the request." - }, - "outputConfig": { - "$ref": "GoogleCloudDocumentaiV1beta2OutputConfig", - "description": "The output location of the parsed responses. The responses are written to this location as JSON-serialized `Document` objects." - } - }, - "type": "object" - }, - "GoogleCloudDocumentaiV1beta2Vertex": { - "description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", - "id": "GoogleCloudDocumentaiV1beta2Vertex", - "properties": { - "x": { - "description": "X coordinate.", - "format": "int32", - "type": "integer" - }, - "y": { - "description": "Y coordinate (starts from the top of the image).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "GoogleCloudDocumentaiV1beta3Barcode": { "description": "Encodes the detailed information of a barcode.", "id": "GoogleCloudDocumentaiV1beta3Barcode", @@ -7945,6 +4597,10 @@ }, "type": "array" }, + "description": { + "description": "The description of the entity type. Could be used to provide more information about the entity type for model calls.", + "type": "string" + }, "displayName": { "description": "User defined name for the type.", "type": "string" @@ -7989,6 +4645,10 @@ "description": "Defines properties that can be part of the entity type.", "id": "GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty", "properties": { + "description": { + "description": "The description of the property. Could be used to provide more information about the property for model calls.", + "type": "string" + }, "displayName": { "description": "User defined name for the property.", "type": "string" diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index dac275c3bc6..24f06cdc39a 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -2080,4283 +2080,6 @@ func (s GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata) MarshalJSON() ( type GoogleCloudDocumentaiV1UndeployProcessorVersionResponse struct { } -// 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 string `json:"format,omitempty"` - // 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. - ValueFormat string `json:"valueFormat,omitempty"` - // ForceSendFields is a list of field names (e.g. "Format") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Format") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1Barcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1Barcode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse: Response to an -// batch document processing request. This is returned in the LRO Operation -// after the operation is complete. -type GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse struct { - // Responses: Responses for each individual document. - Responses []*GoogleCloudDocumentaiV1beta1ProcessDocumentResponse `json:"responses,omitempty"` - // ForceSendFields is a list of field names (e.g. "Responses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Responses") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1BoundingPoly: A bounding polygon for the -// detected image annotation. -type GoogleCloudDocumentaiV1beta1BoundingPoly struct { - // NormalizedVertices: The bounding polygon normalized vertices. - NormalizedVertices []*GoogleCloudDocumentaiV1beta1NormalizedVertex `json:"normalizedVertices,omitempty"` - // Vertices: The bounding polygon vertices. - Vertices []*GoogleCloudDocumentaiV1beta1Vertex `json:"vertices,omitempty"` - // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NormalizedVertices") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1BoundingPoly - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1Document: Document represents the canonical -// document resource in Document AI. It is an interchange format that provides -// insights into documents and allows for collaboration between users and -// Document AI to iterate and optimize for quality. -type GoogleCloudDocumentaiV1beta1Document struct { - // ChunkedDocument: Document chunked based on chunking config. - ChunkedDocument *GoogleCloudDocumentaiV1beta1DocumentChunkedDocument `json:"chunkedDocument,omitempty"` - // Content: Optional. Inline document content, represented as a stream of - // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - Content string `json:"content,omitempty"` - // DocumentLayout: Parsed layout of the document. - DocumentLayout *GoogleCloudDocumentaiV1beta1DocumentDocumentLayout `json:"documentLayout,omitempty"` - // Entities: A list of entities detected on Document.text. For document shards, - // entities in this list may cross shard boundaries. - Entities []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"entities,omitempty"` - // EntityRelations: Placeholder. Relationship among Document.entities. - EntityRelations []*GoogleCloudDocumentaiV1beta1DocumentEntityRelation `json:"entityRelations,omitempty"` - // Error: Any error that occurred while processing this document. - Error *GoogleRpcStatus `json:"error,omitempty"` - // MimeType: An IANA published media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml). - MimeType string `json:"mimeType,omitempty"` - // Pages: Visual page layout for the Document. - Pages []*GoogleCloudDocumentaiV1beta1DocumentPage `json:"pages,omitempty"` - // Revisions: Placeholder. Revision history of this document. - Revisions []*GoogleCloudDocumentaiV1beta1DocumentRevision `json:"revisions,omitempty"` - // ShardInfo: Information about the sharding if this document is sharded part - // of a larger document. If the document is not sharded, this message is not - // specified. - ShardInfo *GoogleCloudDocumentaiV1beta1DocumentShardInfo `json:"shardInfo,omitempty"` - // Text: Optional. UTF-8 encoded text in reading order from the document. - 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. - TextChanges []*GoogleCloudDocumentaiV1beta1DocumentTextChange `json:"textChanges,omitempty"` - // TextStyles: Styles for the Document.text. - TextStyles []*GoogleCloudDocumentaiV1beta1DocumentStyle `json:"textStyles,omitempty"` - // Uri: Optional. Currently supports Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. For more - // information, refer to Google Cloud Storage Request URIs - // (https://cloud.google.com/storage/docs/reference-uris). - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkedDocument") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1Document - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocument: Represents the chunks -// that the document is divided into. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocument struct { - // Chunks: List of chunks. - Chunks []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk `json:"chunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Chunks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocument - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk: Represents a -// chunk. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk struct { - // ChunkId: ID of the chunk. - ChunkId string `json:"chunkId,omitempty"` - // Content: Text content of the chunk. - Content string `json:"content,omitempty"` - // PageFooters: Page footers associated with the chunk. - PageFooters []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` - // PageHeaders: Page headers associated with the chunk. - PageHeaders []*GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` - // PageSpan: Page span of the chunk. - PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // SourceBlockIds: Unused. - SourceBlockIds []string `json:"sourceBlockIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter: -// Represents the page footer associated with the chunk. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter struct { - // PageSpan: Page span of the footer. - PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // Text: Footer in text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSpan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageFooter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader: -// Represents the page header associated with the chunk. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader struct { - // PageSpan: Page span of the header. - PageSpan *GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // Text: Header in text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSpan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan: -// Represents where the chunk starts and ends in the document. -type GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan struct { - // PageEnd: Page where chunk ends in the document. - PageEnd int64 `json:"pageEnd,omitempty"` - // PageStart: Page where chunk starts in the document. - PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentChunkedDocumentChunkChunkPageSpan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayout: Represents the parsed -// layout of a document as a collection of blocks that the document is divided -// into. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayout struct { - // Blocks: List of blocks in the document. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayout) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock: -// Represents a block. A block could be one of the various types (text, table, -// list) supported. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock struct { - // BlockId: ID of the block. - BlockId string `json:"blockId,omitempty"` - // ListBlock: Block consisting of list content/structure. - ListBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` - // PageSpan: Page span of the block. - PageSpan *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` - // TableBlock: Block consisting of table content/structure. - TableBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` - // TextBlock: Block consisting of text content. - TextBlock *GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlockId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi -// stBlock: Represents a list type block. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { - // ListEntries: List entries that constitute a list block. - ListEntries []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` - // Type: Type of the list_entries (if exist). Available options are `ordered` - // and `unordered`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ListEntries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ListEntries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutLi -// stEntry: Represents an entry in the list. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { - // Blocks: A list entry is a list of blocks. Repeated blocks support further - // hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPa -// geSpan: Represents where the block starts and ends in the document. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { - // PageEnd: Page where block ends in the document. - PageEnd int64 `json:"pageEnd,omitempty"` - // PageStart: Page where block starts in the document. - PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleBlock: Represents a table type block. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { - // BodyRows: Body rows containing main table content. - BodyRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` - // Caption: Table caption/title. - Caption string `json:"caption,omitempty"` - // HeaderRows: Header rows at the top of the table. - HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` - // ForceSendFields is a list of field names (e.g. "BodyRows") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BodyRows") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleCell: Represents a cell in a table row. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { - // Blocks: A table cell is a list of blocks. Repeated blocks support further - // hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ColSpan: How many columns this cell spans. - ColSpan int64 `json:"colSpan,omitempty"` - // RowSpan: How many rows this cell spans. - RowSpan int64 `json:"rowSpan,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleRow: Represents a row in a table. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { - // Cells: A table row is a list of table cells. - Cells []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTe -// xtBlock: Represents a text type block. -type GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { - // Blocks: A text block could further have child blocks. Repeated blocks - // support further hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // Text: Text content stored in the block. - Text string `json:"text,omitempty"` - // Type: Type of the text in the block. Available options are: `paragraph`, - // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, - // `header`, `footer`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentEntity: An entity that could be a 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 float64 `json:"confidence,omitempty"` - // Id: Optional. Canonical id. This will be a unique value in the entity list - // for this document. - Id string `json:"id,omitempty"` - // MentionId: Optional. Deprecated. Use `id` field instead. - MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre - // Pkwy`. - MentionText string `json:"mentionText,omitempty"` - // NormalizedValue: Optional. Normalized entity value. Absent if the extracted - // value could not be converted or the type (e.g. address) is not supported for - // certain parsers. This field is also only populated for certain supported - // document types. - NormalizedValue *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` - // PageAnchor: Optional. Represents the provenance of this entity wrt. the - // location on the page where it was found. - PageAnchor *GoogleCloudDocumentaiV1beta1DocumentPageAnchor `json:"pageAnchor,omitempty"` - // Properties: Optional. Entities can be nested to form a hierarchical data - // structure representing the content in the document. - Properties []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"properties,omitempty"` - // Provenance: Optional. The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // Redacted: Optional. Whether the entity will be redacted for - // de-identification purposes. - Redacted bool `json:"redacted,omitempty"` - // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into - // the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Required. Entity type from a schema e.g. `Address`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentEntity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue: Parsed and -// normalized entity value. -type GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue struct { - // AddressValue: Postal address. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto - AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` - // BooleanValue: Boolean value. Can be used for entities with binary values, or - // for checkboxes. - BooleanValue bool `json:"booleanValue,omitempty"` - // DateValue: Date value. Includes year, month, day. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto - DateValue *GoogleTypeDate `json:"dateValue,omitempty"` - // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto - DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` - // FloatValue: Float value. - FloatValue float64 `json:"floatValue,omitempty"` - // IntegerValue: Integer value. - IntegerValue int64 `json:"integerValue,omitempty"` - // MoneyValue: Money value. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto - MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` - // Text: Optional. An optional field to store a normalized string. For some - // entity types, one of respective `structured_value` fields may also be - // populated. Also not all the types of `structured_value` will be normalized. - // For example, some processors may not generate `float` or `integer` - // normalized text by default. Below are sample formats mapped to structured - // values. - Money/Currency type (`money_value`) is in the ISO 4217 text - // format. - Date type (`date_value`) is in the ISO 8601 text format. - - // Datetime type (`datetime_value`) is in the ISO 8601 text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddressValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentEntityRelation: Relationship between -// Entities. -type GoogleCloudDocumentaiV1beta1DocumentEntityRelation struct { - // ObjectId: Object entity id. - ObjectId string `json:"objectId,omitempty"` - // Relation: Relationship description. - Relation string `json:"relation,omitempty"` - // SubjectId: Subject entity id. - SubjectId string `json:"subjectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ObjectId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ObjectId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentEntityRelation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityRelation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPage: A page in a Document. -type GoogleCloudDocumentaiV1beta1DocumentPage struct { - // Blocks: A list of visually detected text blocks on the page. A block has a - // set of lines (collected into paragraphs) that have a common line-spacing and - // orientation. - Blocks []*GoogleCloudDocumentaiV1beta1DocumentPageBlock `json:"blocks,omitempty"` - // DetectedBarcodes: A list of detected barcodes. - DetectedBarcodes []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Dimension: Physical dimension of the page. - Dimension *GoogleCloudDocumentaiV1beta1DocumentPageDimension `json:"dimension,omitempty"` - // FormFields: A list of visually detected form fields on the page. - FormFields []*GoogleCloudDocumentaiV1beta1DocumentPageFormField `json:"formFields,omitempty"` - // Image: Rendered image for this page. This image is preprocessed to remove - // any skew, rotation, and distortions such that the annotation bounding boxes - // can be upright and axis-aligned. - Image *GoogleCloudDocumentaiV1beta1DocumentPageImage `json:"image,omitempty"` - // ImageQualityScores: Image quality scores. - ImageQualityScores *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` - // Layout: Layout for the page. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Lines: A list of visually detected text lines on the page. A collection of - // tokens that a human would perceive as a line. - Lines []*GoogleCloudDocumentaiV1beta1DocumentPageLine `json:"lines,omitempty"` - // PageNumber: 1-based index for current Page in a parent Document. Useful when - // a page is taken out of a Document for individual processing. - PageNumber int64 `json:"pageNumber,omitempty"` - // Paragraphs: A list of visually detected text paragraphs on the page. A - // collection of lines that a human would perceive as a paragraph. - Paragraphs []*GoogleCloudDocumentaiV1beta1DocumentPageParagraph `json:"paragraphs,omitempty"` - // Provenance: The history of this page. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // Symbols: A list of visually detected symbols on the page. - Symbols []*GoogleCloudDocumentaiV1beta1DocumentPageSymbol `json:"symbols,omitempty"` - // Tables: A list of visually detected tables on the page. - Tables []*GoogleCloudDocumentaiV1beta1DocumentPageTable `json:"tables,omitempty"` - // Tokens: A list of visually detected tokens on the page. - Tokens []*GoogleCloudDocumentaiV1beta1DocumentPageToken `json:"tokens,omitempty"` - // Transforms: Transformation matrices that were applied to the original - // document image to produce Page.image. - Transforms []*GoogleCloudDocumentaiV1beta1DocumentPageMatrix `json:"transforms,omitempty"` - // VisualElements: A list of detected non-text visual elements e.g. checkbox, - // signature etc. on the page. - VisualElements []*GoogleCloudDocumentaiV1beta1DocumentPageVisualElement `json:"visualElements,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageAnchor: Referencing the visual -// context of the entity in the Document.pages. Page anchors can be cross-page, -// consist of multiple bounding polygons and optionally reference specific -// layout element types. -type GoogleCloudDocumentaiV1beta1DocumentPageAnchor struct { - // PageRefs: One or more references to visual page elements - PageRefs []*GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageRefs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageRefs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef: Represents a weak -// reference to a page element within a document. -type GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef struct { - // BoundingPoly: Optional. Identifies the bounding polygon of a layout element - // on the page. If `layout_type` is set, the bounding polygon must be exactly - // the same to the layout element it's referring to. - BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` - // Confidence: Optional. Confidence of detected page element, if applicable. - // Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. - LayoutId string `json:"layoutId,omitempty"` - // LayoutType: Optional. The type of the layout element that is being - // referenced if any. - // - // Possible values: - // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. - // "BLOCK" - References a Page.blocks element. - // "PARAGRAPH" - References a Page.paragraphs element. - // "LINE" - References a Page.lines element. - // "TOKEN" - References a Page.tokens element. - // "VISUAL_ELEMENT" - References a Page.visual_elements element. - // "TABLE" - Refrrences a Page.tables element. - // "FORM_FIELD" - References a Page.form_fields element. - LayoutType string `json:"layoutType,omitempty"` - // Page: Required. Index into the Document.pages element, for example using - // `Document.pages` to locate the related page element. This field is skipped - // when its value is the default `0`. See - // https://developers.google.com/protocol-buffers/docs/proto3#json. - Page int64 `json:"page,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageBlock: A block has a set of lines -// (collected into paragraphs) that have a common line-spacing and orientation. -type GoogleCloudDocumentaiV1beta1DocumentPageBlock struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Block. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode: A detected barcode. -type GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode struct { - // Barcode: Detailed barcode information of the DetectedBarcode. - Barcode *GoogleCloudDocumentaiV1beta1Barcode `json:"barcode,omitempty"` - // Layout: Layout for DetectedBarcode. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Barcode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected language -// for a structural component. -type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code - // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as - // `en-US` or `sr-Latn`. - LanguageCode string `json:"languageCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageDimension: Dimension for the page. -type GoogleCloudDocumentaiV1beta1DocumentPageDimension struct { - // Height: Page height. - Height float64 `json:"height,omitempty"` - // Unit: Dimension unit. - Unit string `json:"unit,omitempty"` - // Width: Page width. - Width float64 `json:"width,omitempty"` - // ForceSendFields is a list of field names (e.g. "Height") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Height") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageDimension) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension - var s1 struct { - Height gensupport.JSONFloat64 `json:"height"` - Width gensupport.JSONFloat64 `json:"width"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Height = float64(s1.Height) - s.Width = float64(s1.Width) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageFormField: A form field detected on -// the page. -type GoogleCloudDocumentaiV1beta1DocumentPageFormField struct { - // CorrectedKeyText: Created for Labeling UI to export key text. If corrections - // were made to the text identified by the `field_name.text_anchor`, this field - // will contain the correction. - CorrectedKeyText string `json:"correctedKeyText,omitempty"` - // CorrectedValueText: Created for Labeling UI to export value text. If - // corrections were made to the text identified by the - // `field_value.text_anchor`, this field will contain the correction. - CorrectedValueText string `json:"correctedValueText,omitempty"` - // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand - // total`, `Phone number`, etc. - FieldName *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldName,omitempty"` - // FieldValue: Layout for the FormField value. - FieldValue *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldValue,omitempty"` - // NameDetectedLanguages: A list of detected languages for name together with - // confidence. - NameDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ValueDetectedLanguages: A list of detected languages for value together with - // confidence. - ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` - // ValueType: If the value is non-textual, this field represents the type. - // Current valid values are: - blank (this indicates the `field_value` is - // normal text) - `unfilled_checkbox` - `filled_checkbox` - ValueType string `json:"valueType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageFormField) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageFormField - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageImage: Rendered image contents for -// this page. -type GoogleCloudDocumentaiV1beta1DocumentPageImage struct { - // Content: Raw byte content of the image. - Content string `json:"content,omitempty"` - // Height: Height of the image in pixels. - Height int64 `json:"height,omitempty"` - // MimeType: Encoding media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the - // image. - MimeType string `json:"mimeType,omitempty"` - // Width: Width of the image in pixels. - Width int64 `json:"width,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageImage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores: Image quality -// scores for the page image. -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 perfect - // quality. - QualityScore float64 `json:"qualityScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedDefects") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedDefects") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores - var s1 struct { - QualityScore gensupport.JSONFloat64 `json:"qualityScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.QualityScore = float64(s1.QualityScore) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect: -// Image Quality Defects -type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` - // indicates strong confidence 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 string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageLayout: Visual element describing a -// layout unit on a page. -type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { - // BoundingPoly: The bounding polygon for the Layout. - BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` - // 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]`. - Confidence float64 `json:"confidence,omitempty"` - // Orientation: Detected orientation for the Layout. - // - // Possible values: - // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. - // "PAGE_UP" - Orientation is aligned with page up. - // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 - // degrees clockwise from upright to read. - // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 - // degrees from upright to read. - // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 - // degrees counterclockwise from upright to read. - Orientation string `json:"orientation,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageLayout) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageLine: A collection of tokens that a -// human would perceive as a line. Does not cross column boundaries, can be -// horizontal, vertical, etc. -type GoogleCloudDocumentaiV1beta1DocumentPageLine struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Line. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageLine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLine - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageMatrix: Representation for -// transformation matrix, intended to be compatible and used with OpenCV format -// for image manipulation. -type GoogleCloudDocumentaiV1beta1DocumentPageMatrix struct { - // Cols: Number of columns in the matrix. - Cols int64 `json:"cols,omitempty"` - // Data: The matrix data. - Data string `json:"data,omitempty"` - // Rows: Number of rows in the matrix. - Rows int64 `json:"rows,omitempty"` - // Type: This encodes information about what data type the matrix uses. For - // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV - // primitive data types, please refer to - // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html - Type int64 `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cols") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageMatrix) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageMatrix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageParagraph: A collection of lines -// that a human would perceive as a paragraph. -type GoogleCloudDocumentaiV1beta1DocumentPageParagraph struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Paragraph. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageParagraph) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageParagraph - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageSymbol: A detected symbol. -type GoogleCloudDocumentaiV1beta1DocumentPageSymbol struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Symbol. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageSymbol) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageSymbol - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTable: A table representation -// similar to HTML table structure. -type GoogleCloudDocumentaiV1beta1DocumentPageTable struct { - // BodyRows: Body rows of the table. - BodyRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"bodyRows,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // HeaderRows: Header rows of the table. - HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"headerRows,omitempty"` - // Layout: Layout for Table. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this table. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "BodyRows") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BodyRows") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTable) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell: A cell -// representation inside the table. -type GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell struct { - // ColSpan: How many columns this cell spans. - ColSpan int64 `json:"colSpan,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for TableCell. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // RowSpan: How many rows this cell spans. - RowSpan int64 `json:"rowSpan,omitempty"` - // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ColSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow: A row of table cells. -type GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow struct { - // Cells: Cells that make up this row. - Cells []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageToken: A detected token. -type GoogleCloudDocumentaiV1beta1DocumentPageToken struct { - // DetectedBreak: Detected break at the end of a Token. - DetectedBreak *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Token. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // StyleInfo: Text style attributes. - StyleInfo *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedBreak") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedBreak") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageToken) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageToken - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak: Detected break -// at the end of a Token. -type GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak struct { - // Type: Detected break type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified break type. - // "SPACE" - A single whitespace. - // "WIDE_SPACE" - A wider whitespace. - // "HYPHEN" - A hyphen that indicates that a token has been split across - // lines. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo: Font and other text -// style attributes. -type GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo struct { - // BackgroundColor: Color of the background. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Bold: Whether the text is bold (equivalent to font_weight is at least - // `700`). - Bold bool `json:"bold,omitempty"` - // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). - FontSize int64 `json:"fontSize,omitempty"` - // FontType: Name or style of the font. - FontType string `json:"fontType,omitempty"` - // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). - // Normal is `400`, bold is `700`. - FontWeight int64 `json:"fontWeight,omitempty"` - // Handwritten: Whether the text is handwritten. - Handwritten bool `json:"handwritten,omitempty"` - // Italic: Whether the text is italic. - Italic bool `json:"italic,omitempty"` - // LetterSpacing: Letter spacing in points. - LetterSpacing float64 `json:"letterSpacing,omitempty"` - // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * - // _resolution_ Ć· `72.0`. - PixelFontSize float64 `json:"pixelFontSize,omitempty"` - // Smallcaps: Whether the text is in small caps. This feature is not supported - // yet. - Smallcaps bool `json:"smallcaps,omitempty"` - // Strikeout: Whether the text is strikethrough. This feature is not supported - // yet. - Strikeout bool `json:"strikeout,omitempty"` - // Subscript: Whether the text is a subscript. This feature is not supported - // yet. - Subscript bool `json:"subscript,omitempty"` - // Superscript: Whether the text is a superscript. This feature is not - // supported yet. - Superscript bool `json:"superscript,omitempty"` - // TextColor: Color of the text. - TextColor *GoogleTypeColor `json:"textColor,omitempty"` - // Underlined: Whether the text is underlined. - Underlined bool `json:"underlined,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo - var s1 struct { - LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` - PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LetterSpacing = float64(s1.LetterSpacing) - s.PixelFontSize = float64(s1.PixelFontSize) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentPageVisualElement: Detected non-text -// visual elements e.g. checkbox, signature etc. on the page. -type GoogleCloudDocumentaiV1beta1DocumentPageVisualElement struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for VisualElement. - Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` - // Type: Type of the VisualElement. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentPageVisualElement) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageVisualElement - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentProvenance: Structure to identify -// provenance relationships between annotations in different revisions. -type GoogleCloudDocumentaiV1beta1DocumentProvenance struct { - // Id: The Id of this operation. Needs to be unique within the scope of the - // revision. - Id int64 `json:"id,omitempty"` - // Parents: References to the original elements that are replaced. - Parents []*GoogleCloudDocumentaiV1beta1DocumentProvenanceParent `json:"parents,omitempty"` - // Revision: The index of the revision that produced this element. - Revision int64 `json:"revision,omitempty"` - // Type: The type of provenance operation. - // - // Possible values: - // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation - // is specified a provenance entry is simply used to match against a `parent`. - // "ADD" - Add an element. - // "REMOVE" - Remove an element identified by `parent`. - // "UPDATE" - Updates any fields within the given provenance scope of the - // message. It overwrites the fields rather than replacing them. Use this when - // you want to update a field value of an entity without also updating all the - // child properties. - // "REPLACE" - Currently unused. Replace an element identified by `parent`. - // "EVAL_REQUESTED" - Deprecated. Request human review for the element - // identified by `parent`. - // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human - // review, confidence will be set to 1.0. - // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentProvenance) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentProvenanceParent: The parent element the -// current element is based on. Used for referencing/aligning, removal and -// replacement operations. -type GoogleCloudDocumentaiV1beta1DocumentProvenanceParent struct { - // Id: The id of the parent provenance. - Id int64 `json:"id,omitempty"` - // Index: The index of the parent item in the corresponding item list (eg. list - // of entities, properties within entities, etc.) in the parent revision. - Index int64 `json:"index,omitempty"` - // Revision: The index of the index into current revision's parent_ids list. - Revision int64 `json:"revision,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentProvenanceParent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenanceParent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentRevision: Contains past or forward -// revisions of this document. -type GoogleCloudDocumentaiV1beta1DocumentRevision struct { - // Agent: If the change was made by a person specify the name or id of that - // person. - Agent string `json:"agent,omitempty"` - // CreateTime: The time that the revision was created, internally generated by - // doc proto storage at the time of create. - CreateTime string `json:"createTime,omitempty"` - // HumanReview: Human Review information of this revision. - HumanReview *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview `json:"humanReview,omitempty"` - // Id: Id of the revision, internally generated by doc proto storage. Unique - // within the context of the document. - Id string `json:"id,omitempty"` - // Parent: The revisions that this revision is based on. This can include one - // or more parent (when documents are merged.) This field represents the index - // into the `revisions` field. - Parent []int64 `json:"parent,omitempty"` - // ParentIds: The revisions that this revision is based on. Must include all - // the ids that have anything to do with this revision - eg. there are - // `provenance.parent.revision` fields that index into this field. - ParentIds []string `json:"parentIds,omitempty"` - // Processor: If the annotation was made by processor identify the processor by - // its resource name. - Processor string `json:"processor,omitempty"` - // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Agent") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentRevision) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevision - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview: Human Review -// information of the document. -type GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview struct { - // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. - State string `json:"state,omitempty"` - // StateMessage: A message providing more details about the current state of - // processing. For example, the rejection reason when the state is `rejected`. - StateMessage string `json:"stateMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentShardInfo: For a large document, -// sharding may be performed to produce several document shards. Each document -// shard contains this field to detail which shard it is. -type GoogleCloudDocumentaiV1beta1DocumentShardInfo struct { - // ShardCount: Total number of shards. - ShardCount int64 `json:"shardCount,omitempty,string"` - // ShardIndex: The 0-based index of this shard. - ShardIndex int64 `json:"shardIndex,omitempty,string"` - // TextOffset: The index of the first character in Document.text in the overall - // document global text. - TextOffset int64 `json:"textOffset,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ShardCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ShardCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentShardInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentShardInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentStyle: Annotation for common text style -// attributes. This adheres to CSS conventions as much as possible. -type GoogleCloudDocumentaiV1beta1DocumentStyle struct { - // BackgroundColor: Text background color. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Color: Text color. - Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as `Arial`, `Times New Roman`. - // https://www.w3schools.com/cssref/pr_font_font-family.asp - FontFamily string `json:"fontFamily,omitempty"` - // FontSize: Font size. - FontSize *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize `json:"fontSize,omitempty"` - // FontWeight: Font weight - // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are - // `normal`, `bold`, `bolder`, and `lighter`. - FontWeight string `json:"fontWeight,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // TextDecoration: Text decoration - // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS - // standard. - TextDecoration string `json:"textDecoration,omitempty"` - // TextStyle: Text style - // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values - // are `normal`, `italic`, and `oblique`. - TextStyle string `json:"textStyle,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentStyle) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentStyleFontSize: Font size with unit. -type GoogleCloudDocumentaiV1beta1DocumentStyleFontSize struct { - // Size: Font size for the text. - Size float64 `json:"size,omitempty"` - // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and - // `pt`). - Unit string `json:"unit,omitempty"` - // ForceSendFields is a list of field names (e.g. "Size") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Size") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize - var s1 struct { - Size gensupport.JSONFloat64 `json:"size"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Size = float64(s1.Size) - return nil -} - -// GoogleCloudDocumentaiV1beta1DocumentTextAnchor: Text reference indexing into -// the Document.text. -type GoogleCloudDocumentaiV1beta1DocumentTextAnchor struct { - // Content: Contains the content of the text span so that users do not have to - // look it up in the text_segments. It is always populated for formFields. - Content string `json:"content,omitempty"` - // TextSegments: The text segments from the Document.text. - TextSegments []*GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment `json:"textSegments,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentTextAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment: A text segment in -// the Document.text. The indices may be out of bounds which indicate that the -// text extends into another document shard for large sharded documents. See -// ShardInfo.text_offset -type GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment struct { - // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. - EndIndex int64 `json:"endIndex,omitempty,string"` - // StartIndex: TextSegment start UTF-8 char index in the Document.text. - StartIndex int64 `json:"startIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EndIndex") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndIndex") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1DocumentTextChange: This message is used for -// text changes aka. OCR corrections. -type GoogleCloudDocumentaiV1beta1DocumentTextChange struct { - // ChangedText: The text that replaces the text identified in the - // `text_anchor`. - ChangedText string `json:"changedText,omitempty"` - // Provenance: The history of this annotation. - Provenance []*GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` - // TextAnchor: Provenance of the correction. Text anchor indexing into the - // Document.text. There can only be a single `TextAnchor.text_segments` - // element. If the start and end index of the text segment are the same, the - // text change is inserted before that index. - TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChangedText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChangedText") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1DocumentTextChange) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextChange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1GcsDestination: The Google Cloud Storage -// location where the output file will be written to. -type GoogleCloudDocumentaiV1beta1GcsDestination struct { - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1GcsDestination) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1GcsDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1GcsSource: The Google Cloud Storage location -// where the input file will be read from. -type GoogleCloudDocumentaiV1beta1GcsSource struct { - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1GcsSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1GcsSource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1InputConfig: The desired input location and -// metadata. -type GoogleCloudDocumentaiV1beta1InputConfig struct { - // GcsSource: The Google Cloud Storage location to read the input from. This - // must be a single file. - GcsSource *GoogleCloudDocumentaiV1beta1GcsSource `json:"gcsSource,omitempty"` - // MimeType: Required. Mimetype of the input. Current supported mimetypes are - // application/pdf, image/tiff, and image/gif. In addition, application/json - // type is supported for requests with ProcessDocumentRequest.automl_params - // field set. The JSON file needs to be in Document format. - MimeType string `json:"mimeType,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsSource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsSource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1InputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1InputConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1NormalizedVertex: A vertex represents a 2D point -// in the image. NOTE: the normalized vertex coordinates are relative to the -// original image and range from 0 to 1. -type GoogleCloudDocumentaiV1beta1NormalizedVertex struct { - // X: X coordinate. - X float64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y float64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1NormalizedVertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex - var s1 struct { - X gensupport.JSONFloat64 `json:"x"` - Y gensupport.JSONFloat64 `json:"y"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.X = float64(s1.X) - s.Y = float64(s1.Y) - return nil -} - -// GoogleCloudDocumentaiV1beta1OperationMetadata: Contains metadata for the -// BatchProcessDocuments operation. -type GoogleCloudDocumentaiV1beta1OperationMetadata struct { - // CreateTime: The creation time of the operation. - CreateTime string `json:"createTime,omitempty"` - // State: The state of the current batch processing. - // - // Possible values: - // "STATE_UNSPECIFIED" - The default value. This value is used if the state - // is omitted. - // "ACCEPTED" - Request is received. - // "WAITING" - Request operation is waiting for scheduling. - // "RUNNING" - Request is being processed. - // "SUCCEEDED" - The batch processing completed successfully. - // "CANCELLED" - The batch processing was cancelled. - // "FAILED" - The batch processing has failed. - State string `json:"state,omitempty"` - // StateMessage: A message providing more details about the current state of - // processing. - StateMessage string `json:"stateMessage,omitempty"` - // UpdateTime: The last update time of the operation. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1OutputConfig: The desired output location and -// metadata. -type GoogleCloudDocumentaiV1beta1OutputConfig struct { - // GcsDestination: The Google Cloud Storage location to write the output to. - GcsDestination *GoogleCloudDocumentaiV1beta1GcsDestination `json:"gcsDestination,omitempty"` - // PagesPerShard: The max number of pages to include into each output Document - // shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not - // specified, the default value is 20. For example, for one pdf file with 100 - // pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 - // Document shard JSON files each containing 20 parsed pages will be written - // under the prefix OutputConfig.gcs_destination.uri and suffix - // pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS - // outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json - // pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json - PagesPerShard int64 `json:"pagesPerShard,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsDestination") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsDestination") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1OutputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1OutputConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1ProcessDocumentResponse: Response to a single -// document processing request. -type GoogleCloudDocumentaiV1beta1ProcessDocumentResponse struct { - // InputConfig: Information about the input file. This is the same as the - // corresponding input config in the request. - InputConfig *GoogleCloudDocumentaiV1beta1InputConfig `json:"inputConfig,omitempty"` - // OutputConfig: The output location of the parsed responses. The responses are - // written to this location as JSON-serialized `Document` objects. - OutputConfig *GoogleCloudDocumentaiV1beta1OutputConfig `json:"outputConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "InputConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1ProcessDocumentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1ProcessDocumentResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta1Vertex: A vertex represents a 2D point in the -// image. NOTE: the vertex coordinates are in the same scale as the original -// image. -type GoogleCloudDocumentaiV1beta1Vertex struct { - // X: X coordinate. - X int64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y int64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta1Vertex - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// 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 string `json:"format,omitempty"` - // 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. - ValueFormat string `json:"valueFormat,omitempty"` - // ForceSendFields is a list of field names (e.g. "Format") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Format") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2Barcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Barcode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse: Response to an -// batch document processing request. This is returned in the LRO Operation -// after the operation is complete. -type GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse struct { - // Responses: Responses for each individual document. - Responses []*GoogleCloudDocumentaiV1beta2ProcessDocumentResponse `json:"responses,omitempty"` - // ForceSendFields is a list of field names (e.g. "Responses") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Responses") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2BoundingPoly: A bounding polygon for the -// detected image annotation. -type GoogleCloudDocumentaiV1beta2BoundingPoly struct { - // NormalizedVertices: The bounding polygon normalized vertices. - NormalizedVertices []*GoogleCloudDocumentaiV1beta2NormalizedVertex `json:"normalizedVertices,omitempty"` - // Vertices: The bounding polygon vertices. - Vertices []*GoogleCloudDocumentaiV1beta2Vertex `json:"vertices,omitempty"` - // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NormalizedVertices") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2BoundingPoly - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2Document: Document represents the canonical -// document resource in Document AI. It is an interchange format that provides -// insights into documents and allows for collaboration between users and -// Document AI to iterate and optimize for quality. -type GoogleCloudDocumentaiV1beta2Document struct { - // ChunkedDocument: Document chunked based on chunking config. - ChunkedDocument *GoogleCloudDocumentaiV1beta2DocumentChunkedDocument `json:"chunkedDocument,omitempty"` - // Content: Optional. Inline document content, represented as a stream of - // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - Content string `json:"content,omitempty"` - // DocumentLayout: Parsed layout of the document. - DocumentLayout *GoogleCloudDocumentaiV1beta2DocumentDocumentLayout `json:"documentLayout,omitempty"` - // Entities: A list of entities detected on Document.text. For document shards, - // entities in this list may cross shard boundaries. - Entities []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"entities,omitempty"` - // EntityRelations: Placeholder. Relationship among Document.entities. - EntityRelations []*GoogleCloudDocumentaiV1beta2DocumentEntityRelation `json:"entityRelations,omitempty"` - // Error: Any error that occurred while processing this document. - Error *GoogleRpcStatus `json:"error,omitempty"` - // Labels: Labels for this document. - Labels []*GoogleCloudDocumentaiV1beta2DocumentLabel `json:"labels,omitempty"` - // MimeType: An IANA published media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml). - MimeType string `json:"mimeType,omitempty"` - // Pages: Visual page layout for the Document. - Pages []*GoogleCloudDocumentaiV1beta2DocumentPage `json:"pages,omitempty"` - // Revisions: Placeholder. Revision history of this document. - Revisions []*GoogleCloudDocumentaiV1beta2DocumentRevision `json:"revisions,omitempty"` - // ShardInfo: Information about the sharding if this document is sharded part - // of a larger document. If the document is not sharded, this message is not - // specified. - ShardInfo *GoogleCloudDocumentaiV1beta2DocumentShardInfo `json:"shardInfo,omitempty"` - // Text: Optional. UTF-8 encoded text in reading order from the document. - 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. - TextChanges []*GoogleCloudDocumentaiV1beta2DocumentTextChange `json:"textChanges,omitempty"` - // TextStyles: Styles for the Document.text. - TextStyles []*GoogleCloudDocumentaiV1beta2DocumentStyle `json:"textStyles,omitempty"` - // Uri: Optional. Currently supports Google Cloud Storage URI of the form - // `gs://bucket_name/object_name`. Object versioning is not supported. For more - // information, refer to Google Cloud Storage Request URIs - // (https://cloud.google.com/storage/docs/reference-uris). - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkedDocument") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkedDocument") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Document - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocument: Represents the chunks -// that the document is divided into. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocument struct { - // Chunks: List of chunks. - Chunks []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk `json:"chunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Chunks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Chunks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocument - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk: Represents a -// chunk. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk struct { - // ChunkId: ID of the chunk. - ChunkId string `json:"chunkId,omitempty"` - // Content: Text content of the chunk. - Content string `json:"content,omitempty"` - // PageFooters: Page footers associated with the chunk. - PageFooters []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter `json:"pageFooters,omitempty"` - // PageHeaders: Page headers associated with the chunk. - PageHeaders []*GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader `json:"pageHeaders,omitempty"` - // PageSpan: Page span of the chunk. - PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // SourceBlockIds: Unused. - SourceBlockIds []string `json:"sourceBlockIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunk - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter: -// Represents the page footer associated with the chunk. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter struct { - // PageSpan: Page span of the footer. - PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // Text: Footer in text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSpan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageFooter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader: -// Represents the page header associated with the chunk. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader struct { - // PageSpan: Page span of the header. - PageSpan *GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan `json:"pageSpan,omitempty"` - // Text: Header in text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageSpan") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageHeader - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan: -// Represents where the chunk starts and ends in the document. -type GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan struct { - // PageEnd: Page where chunk ends in the document. - PageEnd int64 `json:"pageEnd,omitempty"` - // PageStart: Page where chunk starts in the document. - PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentChunkedDocumentChunkChunkPageSpan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayout: Represents the parsed -// layout of a document as a collection of blocks that the document is divided -// into. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayout struct { - // Blocks: List of blocks in the document. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayout) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock: -// Represents a block. A block could be one of the various types (text, table, -// list) supported. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock struct { - // BlockId: ID of the block. - BlockId string `json:"blockId,omitempty"` - // ListBlock: Block consisting of list content/structure. - ListBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock `json:"listBlock,omitempty"` - // PageSpan: Page span of the block. - PageSpan *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan `json:"pageSpan,omitempty"` - // TableBlock: Block consisting of table content/structure. - TableBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock `json:"tableBlock,omitempty"` - // TextBlock: Block consisting of text content. - TextBlock *GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock `json:"textBlock,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlockId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi -// stBlock: Represents a list type block. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock struct { - // ListEntries: List entries that constitute a list block. - ListEntries []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry `json:"listEntries,omitempty"` - // Type: Type of the list_entries (if exist). Available options are `ordered` - // and `unordered`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "ListEntries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ListEntries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutLi -// stEntry: Represents an entry in the list. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry struct { - // Blocks: A list entry is a list of blocks. Repeated blocks support further - // hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutListEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPa -// geSpan: Represents where the block starts and ends in the document. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan struct { - // PageEnd: Page where block ends in the document. - PageEnd int64 `json:"pageEnd,omitempty"` - // PageStart: Page where block starts in the document. - PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutPageSpan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleBlock: Represents a table type block. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock struct { - // BodyRows: Body rows containing main table content. - BodyRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"bodyRows,omitempty"` - // Caption: Table caption/title. - Caption string `json:"caption,omitempty"` - // HeaderRows: Header rows at the top of the table. - HeaderRows []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow `json:"headerRows,omitempty"` - // ForceSendFields is a list of field names (e.g. "BodyRows") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BodyRows") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleCell: Represents a cell in a table row. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell struct { - // Blocks: A table cell is a list of blocks. Repeated blocks support further - // hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // ColSpan: How many columns this cell spans. - ColSpan int64 `json:"colSpan,omitempty"` - // RowSpan: How many rows this cell spans. - RowSpan int64 `json:"rowSpan,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTa -// bleRow: Represents a row in a table. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow struct { - // Cells: A table row is a list of table cells. - Cells []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableCell `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTableRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTe -// xtBlock: Represents a text type block. -type GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock struct { - // Blocks: A text block could further have child blocks. Repeated blocks - // support further hierarchies and nested blocks. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlock `json:"blocks,omitempty"` - // Text: Text content stored in the block. - Text string `json:"text,omitempty"` - // Type: Type of the text in the block. Available options are: `paragraph`, - // `subtitle`, `heading-1`, `heading-2`, `heading-3`, `heading-4`, `heading-5`, - // `header`, `footer`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentDocumentLayoutDocumentLayoutBlockLayoutTextBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentEntity: An entity that could be a 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 float64 `json:"confidence,omitempty"` - // Id: Optional. Canonical id. This will be a unique value in the entity list - // for this document. - Id string `json:"id,omitempty"` - // MentionId: Optional. Deprecated. Use `id` field instead. - MentionId string `json:"mentionId,omitempty"` - // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre - // Pkwy`. - MentionText string `json:"mentionText,omitempty"` - // NormalizedValue: Optional. Normalized entity value. Absent if the extracted - // value could not be converted or the type (e.g. address) is not supported for - // certain parsers. This field is also only populated for certain supported - // document types. - NormalizedValue *GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` - // PageAnchor: Optional. Represents the provenance of this entity wrt. the - // location on the page where it was found. - PageAnchor *GoogleCloudDocumentaiV1beta2DocumentPageAnchor `json:"pageAnchor,omitempty"` - // Properties: Optional. Entities can be nested to form a hierarchical data - // structure representing the content in the document. - Properties []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"properties,omitempty"` - // Provenance: Optional. The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // Redacted: Optional. Whether the entity will be redacted for - // de-identification purposes. - Redacted bool `json:"redacted,omitempty"` - // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into - // the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // Type: Required. Entity type from a schema e.g. `Address`. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentEntity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntity - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentEntity) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntity - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue: Parsed and -// normalized entity value. -type GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue struct { - // AddressValue: Postal address. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto - AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` - // BooleanValue: Boolean value. Can be used for entities with binary values, or - // for checkboxes. - BooleanValue bool `json:"booleanValue,omitempty"` - // DateValue: Date value. Includes year, month, day. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto - DateValue *GoogleTypeDate `json:"dateValue,omitempty"` - // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto - DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` - // FloatValue: Float value. - FloatValue float64 `json:"floatValue,omitempty"` - // IntegerValue: Integer value. - IntegerValue int64 `json:"integerValue,omitempty"` - // MoneyValue: Money value. See also: - // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto - MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` - // Text: Optional. An optional field to store a normalized string. For some - // entity types, one of respective `structured_value` fields may also be - // populated. Also not all the types of `structured_value` will be normalized. - // For example, some processors may not generate `float` or `integer` - // normalized text by default. Below are sample formats mapped to structured - // values. - Money/Currency type (`money_value`) is in the ISO 4217 text - // format. - Date type (`date_value`) is in the ISO 8601 text format. - - // Datetime type (`datetime_value`) is in the ISO 8601 text format. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "AddressValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue - var s1 struct { - FloatValue gensupport.JSONFloat64 `json:"floatValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.FloatValue = float64(s1.FloatValue) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentEntityRelation: Relationship between -// Entities. -type GoogleCloudDocumentaiV1beta2DocumentEntityRelation struct { - // ObjectId: Object entity id. - ObjectId string `json:"objectId,omitempty"` - // Relation: Relationship description. - Relation string `json:"relation,omitempty"` - // SubjectId: Subject entity id. - SubjectId string `json:"subjectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ObjectId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ObjectId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentEntityRelation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityRelation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentLabel: Label attaches schema information -// and/or other metadata to segments within a Document. Multiple Labels on a -// single field can denote either different labels, different instances of the -// same label created at different times, or some combination of both. -type GoogleCloudDocumentaiV1beta2DocumentLabel struct { - // AutomlModel: Label is generated AutoML model. This field stores the full - // resource name of the AutoML model. Format: - // `projects/{project-id}/locations/{location-id}/models/{model-id}` - AutomlModel string `json:"automlModel,omitempty"` - // Confidence: Confidence score between 0 and 1 for label assignment. - Confidence float64 `json:"confidence,omitempty"` - // Name: Name of the label. When the label is generated from AutoML Text - // Classification model, this field represents the name of the category. - Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "AutomlModel") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutomlModel") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentLabel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentLabel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentLabel) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentLabel - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPage: A page in a Document. -type GoogleCloudDocumentaiV1beta2DocumentPage struct { - // Blocks: A list of visually detected text blocks on the page. A block has a - // set of lines (collected into paragraphs) that have a common line-spacing and - // orientation. - Blocks []*GoogleCloudDocumentaiV1beta2DocumentPageBlock `json:"blocks,omitempty"` - // DetectedBarcodes: A list of detected barcodes. - DetectedBarcodes []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Dimension: Physical dimension of the page. - Dimension *GoogleCloudDocumentaiV1beta2DocumentPageDimension `json:"dimension,omitempty"` - // FormFields: A list of visually detected form fields on the page. - FormFields []*GoogleCloudDocumentaiV1beta2DocumentPageFormField `json:"formFields,omitempty"` - // Image: Rendered image for this page. This image is preprocessed to remove - // any skew, rotation, and distortions such that the annotation bounding boxes - // can be upright and axis-aligned. - Image *GoogleCloudDocumentaiV1beta2DocumentPageImage `json:"image,omitempty"` - // ImageQualityScores: Image quality scores. - ImageQualityScores *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` - // Layout: Layout for the page. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Lines: A list of visually detected text lines on the page. A collection of - // tokens that a human would perceive as a line. - Lines []*GoogleCloudDocumentaiV1beta2DocumentPageLine `json:"lines,omitempty"` - // PageNumber: 1-based index for current Page in a parent Document. Useful when - // a page is taken out of a Document for individual processing. - PageNumber int64 `json:"pageNumber,omitempty"` - // Paragraphs: A list of visually detected text paragraphs on the page. A - // collection of lines that a human would perceive as a paragraph. - Paragraphs []*GoogleCloudDocumentaiV1beta2DocumentPageParagraph `json:"paragraphs,omitempty"` - // Provenance: The history of this page. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // Symbols: A list of visually detected symbols on the page. - Symbols []*GoogleCloudDocumentaiV1beta2DocumentPageSymbol `json:"symbols,omitempty"` - // Tables: A list of visually detected tables on the page. - Tables []*GoogleCloudDocumentaiV1beta2DocumentPageTable `json:"tables,omitempty"` - // Tokens: A list of visually detected tokens on the page. - Tokens []*GoogleCloudDocumentaiV1beta2DocumentPageToken `json:"tokens,omitempty"` - // Transforms: Transformation matrices that were applied to the original - // document image to produce Page.image. - Transforms []*GoogleCloudDocumentaiV1beta2DocumentPageMatrix `json:"transforms,omitempty"` - // VisualElements: A list of detected non-text visual elements e.g. checkbox, - // signature etc. on the page. - VisualElements []*GoogleCloudDocumentaiV1beta2DocumentPageVisualElement `json:"visualElements,omitempty"` - // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Blocks") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageAnchor: Referencing the visual -// context of the entity in the Document.pages. Page anchors can be cross-page, -// consist of multiple bounding polygons and optionally reference specific -// layout element types. -type GoogleCloudDocumentaiV1beta2DocumentPageAnchor struct { - // PageRefs: One or more references to visual page elements - PageRefs []*GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageRefs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageRefs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef: Represents a weak -// reference to a page element within a document. -type GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef struct { - // BoundingPoly: Optional. Identifies the bounding polygon of a layout element - // on the page. If `layout_type` is set, the bounding polygon must be exactly - // the same to the layout element it's referring to. - BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"` - // Confidence: Optional. Confidence of detected page element, if applicable. - // Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. - LayoutId string `json:"layoutId,omitempty"` - // LayoutType: Optional. The type of the layout element that is being - // referenced if any. - // - // Possible values: - // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. - // "BLOCK" - References a Page.blocks element. - // "PARAGRAPH" - References a Page.paragraphs element. - // "LINE" - References a Page.lines element. - // "TOKEN" - References a Page.tokens element. - // "VISUAL_ELEMENT" - References a Page.visual_elements element. - // "TABLE" - Refrrences a Page.tables element. - // "FORM_FIELD" - References a Page.form_fields element. - LayoutType string `json:"layoutType,omitempty"` - // Page: Required. Index into the Document.pages element, for example using - // `Document.pages` to locate the related page element. This field is skipped - // when its value is the default `0`. See - // https://developers.google.com/protocol-buffers/docs/proto3#json. - Page int64 `json:"page,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageBlock: A block has a set of lines -// (collected into paragraphs) that have a common line-spacing and orientation. -type GoogleCloudDocumentaiV1beta2DocumentPageBlock struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Block. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageBlock) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageBlock - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode: A detected barcode. -type GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode struct { - // Barcode: Detailed barcode information of the DetectedBarcode. - Barcode *GoogleCloudDocumentaiV1beta2Barcode `json:"barcode,omitempty"` - // Layout: Layout for DetectedBarcode. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Barcode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected language -// for a structural component. -type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { - // Confidence: Confidence of detected language. Range `[0, 1]`. - Confidence float64 `json:"confidence,omitempty"` - // LanguageCode: The BCP-47 language code - // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as - // `en-US` or `sr-Latn`. - LanguageCode string `json:"languageCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageDimension: Dimension for the page. -type GoogleCloudDocumentaiV1beta2DocumentPageDimension struct { - // Height: Page height. - Height float64 `json:"height,omitempty"` - // Unit: Dimension unit. - Unit string `json:"unit,omitempty"` - // Width: Page width. - Width float64 `json:"width,omitempty"` - // ForceSendFields is a list of field names (e.g. "Height") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Height") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageDimension) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDimension - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageDimension) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDimension - var s1 struct { - Height gensupport.JSONFloat64 `json:"height"` - Width gensupport.JSONFloat64 `json:"width"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Height = float64(s1.Height) - s.Width = float64(s1.Width) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageFormField: A form field detected on -// the page. -type GoogleCloudDocumentaiV1beta2DocumentPageFormField struct { - // CorrectedKeyText: Created for Labeling UI to export key text. If corrections - // were made to the text identified by the `field_name.text_anchor`, this field - // will contain the correction. - CorrectedKeyText string `json:"correctedKeyText,omitempty"` - // CorrectedValueText: Created for Labeling UI to export value text. If - // corrections were made to the text identified by the - // `field_value.text_anchor`, this field will contain the correction. - CorrectedValueText string `json:"correctedValueText,omitempty"` - // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand - // total`, `Phone number`, etc. - FieldName *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"fieldName,omitempty"` - // FieldValue: Layout for the FormField value. - FieldValue *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"fieldValue,omitempty"` - // NameDetectedLanguages: A list of detected languages for name together with - // confidence. - NameDetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ValueDetectedLanguages: A list of detected languages for value together with - // confidence. - ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` - // ValueType: If the value is non-textual, this field represents the type. - // Current valid values are: - blank (this indicates the `field_value` is - // normal text) - `unfilled_checkbox` - `filled_checkbox` - ValueType string `json:"valueType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageFormField) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageFormField - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageImage: Rendered image contents for -// this page. -type GoogleCloudDocumentaiV1beta2DocumentPageImage struct { - // Content: Raw byte content of the image. - Content string `json:"content,omitempty"` - // Height: Height of the image in pixels. - Height int64 `json:"height,omitempty"` - // MimeType: Encoding media type (MIME type) - // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the - // image. - MimeType string `json:"mimeType,omitempty"` - // Width: Width of the image in pixels. - Width int64 `json:"width,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageImage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImage - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores: Image quality -// scores for the page image. -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 perfect - // quality. - QualityScore float64 `json:"qualityScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedDefects") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedDefects") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores - var s1 struct { - QualityScore gensupport.JSONFloat64 `json:"qualityScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.QualityScore = float64(s1.QualityScore) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect: -// Image Quality Defects -type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect struct { - // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` - // indicates strong confidence 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 string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Confidence") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Confidence") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageLayout: Visual element describing a -// layout unit on a page. -type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct { - // BoundingPoly: The bounding polygon for the Layout. - BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"` - // 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]`. - Confidence float64 `json:"confidence,omitempty"` - // Orientation: Detected orientation for the Layout. - // - // Possible values: - // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. - // "PAGE_UP" - Orientation is aligned with page up. - // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 - // degrees clockwise from upright to read. - // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 - // degrees from upright to read. - // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 - // degrees counterclockwise from upright to read. - Orientation string `json:"orientation,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoundingPoly") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoundingPoly") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageLayout) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLayout - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageLayout) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLayout - var s1 struct { - Confidence gensupport.JSONFloat64 `json:"confidence"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Confidence = float64(s1.Confidence) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageLine: A collection of tokens that a -// human would perceive as a line. Does not cross column boundaries, can be -// horizontal, vertical, etc. -type GoogleCloudDocumentaiV1beta2DocumentPageLine struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Line. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageLine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLine - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageMatrix: Representation for -// transformation matrix, intended to be compatible and used with OpenCV format -// for image manipulation. -type GoogleCloudDocumentaiV1beta2DocumentPageMatrix struct { - // Cols: Number of columns in the matrix. - Cols int64 `json:"cols,omitempty"` - // Data: The matrix data. - Data string `json:"data,omitempty"` - // Rows: Number of rows in the matrix. - Rows int64 `json:"rows,omitempty"` - // Type: This encodes information about what data type the matrix uses. For - // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV - // primitive data types, please refer to - // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html - Type int64 `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cols") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageMatrix) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageMatrix - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageParagraph: A collection of lines -// that a human would perceive as a paragraph. -type GoogleCloudDocumentaiV1beta2DocumentPageParagraph struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Paragraph. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageParagraph) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageParagraph - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageSymbol: A detected symbol. -type GoogleCloudDocumentaiV1beta2DocumentPageSymbol struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Symbol. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageSymbol) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageSymbol - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTable: A table representation -// similar to HTML table structure. -type GoogleCloudDocumentaiV1beta2DocumentPageTable struct { - // BodyRows: Body rows of the table. - BodyRows []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow `json:"bodyRows,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // HeaderRows: Header rows of the table. - HeaderRows []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow `json:"headerRows,omitempty"` - // Layout: Layout for Table. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this table. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // ForceSendFields is a list of field names (e.g. "BodyRows") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BodyRows") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTable) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTable - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell: A cell -// representation inside the table. -type GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell struct { - // ColSpan: How many columns this cell spans. - ColSpan int64 `json:"colSpan,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for TableCell. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // RowSpan: How many rows this cell spans. - RowSpan int64 `json:"rowSpan,omitempty"` - // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ColSpan") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow: A row of table cells. -type GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow struct { - // Cells: Cells that make up this row. - Cells []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell `json:"cells,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cells") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageToken: A detected token. -type GoogleCloudDocumentaiV1beta2DocumentPageToken struct { - // DetectedBreak: Detected break at the end of a Token. - DetectedBreak *GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for Token. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Provenance: The history of this annotation. - Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // StyleInfo: Text style attributes. - StyleInfo *GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedBreak") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedBreak") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageToken) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageToken - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak: Detected break -// at the end of a Token. -type GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak struct { - // Type: Detected break type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified break type. - // "SPACE" - A single whitespace. - // "WIDE_SPACE" - A wider whitespace. - // "HYPHEN" - A hyphen that indicates that a token has been split across - // lines. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Type") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Type") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo: Font and other text -// style attributes. -type GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo struct { - // BackgroundColor: Color of the background. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Bold: Whether the text is bold (equivalent to font_weight is at least - // `700`). - Bold bool `json:"bold,omitempty"` - // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). - FontSize int64 `json:"fontSize,omitempty"` - // FontType: Name or style of the font. - FontType string `json:"fontType,omitempty"` - // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). - // Normal is `400`, bold is `700`. - FontWeight int64 `json:"fontWeight,omitempty"` - // Handwritten: Whether the text is handwritten. - Handwritten bool `json:"handwritten,omitempty"` - // Italic: Whether the text is italic. - Italic bool `json:"italic,omitempty"` - // LetterSpacing: Letter spacing in points. - LetterSpacing float64 `json:"letterSpacing,omitempty"` - // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * - // _resolution_ Ć· `72.0`. - PixelFontSize float64 `json:"pixelFontSize,omitempty"` - // Smallcaps: Whether the text is in small caps. This feature is not supported - // yet. - Smallcaps bool `json:"smallcaps,omitempty"` - // Strikeout: Whether the text is strikethrough. This feature is not supported - // yet. - Strikeout bool `json:"strikeout,omitempty"` - // Subscript: Whether the text is a subscript. This feature is not supported - // yet. - Subscript bool `json:"subscript,omitempty"` - // Superscript: Whether the text is a superscript. This feature is not - // supported yet. - Superscript bool `json:"superscript,omitempty"` - // TextColor: Color of the text. - TextColor *GoogleTypeColor `json:"textColor,omitempty"` - // Underlined: Whether the text is underlined. - Underlined bool `json:"underlined,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo - var s1 struct { - LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` - PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.LetterSpacing = float64(s1.LetterSpacing) - s.PixelFontSize = float64(s1.PixelFontSize) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentPageVisualElement: Detected non-text -// visual elements e.g. checkbox, signature etc. on the page. -type GoogleCloudDocumentaiV1beta2DocumentPageVisualElement struct { - // DetectedLanguages: A list of detected languages together with confidence. - DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` - // Layout: Layout for VisualElement. - Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` - // Type: Type of the VisualElement. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DetectedLanguages") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentPageVisualElement) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageVisualElement - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentProvenance: Structure to identify -// provenance relationships between annotations in different revisions. -type GoogleCloudDocumentaiV1beta2DocumentProvenance struct { - // Id: The Id of this operation. Needs to be unique within the scope of the - // revision. - Id int64 `json:"id,omitempty"` - // Parents: References to the original elements that are replaced. - Parents []*GoogleCloudDocumentaiV1beta2DocumentProvenanceParent `json:"parents,omitempty"` - // Revision: The index of the revision that produced this element. - Revision int64 `json:"revision,omitempty"` - // Type: The type of provenance operation. - // - // Possible values: - // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation - // is specified a provenance entry is simply used to match against a `parent`. - // "ADD" - Add an element. - // "REMOVE" - Remove an element identified by `parent`. - // "UPDATE" - Updates any fields within the given provenance scope of the - // message. It overwrites the fields rather than replacing them. Use this when - // you want to update a field value of an entity without also updating all the - // child properties. - // "REPLACE" - Currently unused. Replace an element identified by `parent`. - // "EVAL_REQUESTED" - Deprecated. Request human review for the element - // identified by `parent`. - // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human - // review, confidence will be set to 1.0. - // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentProvenance) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentProvenance - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentProvenanceParent: The parent element the -// current element is based on. Used for referencing/aligning, removal and -// replacement operations. -type GoogleCloudDocumentaiV1beta2DocumentProvenanceParent struct { - // Id: The id of the parent provenance. - Id int64 `json:"id,omitempty"` - // Index: The index of the parent item in the corresponding item list (eg. list - // of entities, properties within entities, etc.) in the parent revision. - Index int64 `json:"index,omitempty"` - // Revision: The index of the index into current revision's parent_ids list. - Revision int64 `json:"revision,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentProvenanceParent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentProvenanceParent - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentRevision: Contains past or forward -// revisions of this document. -type GoogleCloudDocumentaiV1beta2DocumentRevision struct { - // Agent: If the change was made by a person specify the name or id of that - // person. - Agent string `json:"agent,omitempty"` - // CreateTime: The time that the revision was created, internally generated by - // doc proto storage at the time of create. - CreateTime string `json:"createTime,omitempty"` - // HumanReview: Human Review information of this revision. - HumanReview *GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview `json:"humanReview,omitempty"` - // Id: Id of the revision, internally generated by doc proto storage. Unique - // within the context of the document. - Id string `json:"id,omitempty"` - // Parent: The revisions that this revision is based on. This can include one - // or more parent (when documents are merged.) This field represents the index - // into the `revisions` field. - Parent []int64 `json:"parent,omitempty"` - // ParentIds: The revisions that this revision is based on. Must include all - // the ids that have anything to do with this revision - eg. there are - // `provenance.parent.revision` fields that index into this field. - ParentIds []string `json:"parentIds,omitempty"` - // Processor: If the annotation was made by processor identify the processor by - // its resource name. - Processor string `json:"processor,omitempty"` - // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Agent") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentRevision) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentRevision - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview: Human Review -// information of the document. -type GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview struct { - // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. - State string `json:"state,omitempty"` - // StateMessage: A message providing more details about the current state of - // processing. For example, the rejection reason when the state is `rejected`. - StateMessage string `json:"stateMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "State") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "State") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentShardInfo: For a large document, -// sharding may be performed to produce several document shards. Each document -// shard contains this field to detail which shard it is. -type GoogleCloudDocumentaiV1beta2DocumentShardInfo struct { - // ShardCount: Total number of shards. - ShardCount int64 `json:"shardCount,omitempty,string"` - // ShardIndex: The 0-based index of this shard. - ShardIndex int64 `json:"shardIndex,omitempty,string"` - // TextOffset: The index of the first character in Document.text in the overall - // document global text. - TextOffset int64 `json:"textOffset,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ShardCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ShardCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentShardInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentShardInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentStyle: Annotation for common text style -// attributes. This adheres to CSS conventions as much as possible. -type GoogleCloudDocumentaiV1beta2DocumentStyle struct { - // BackgroundColor: Text background color. - BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` - // Color: Text color. - Color *GoogleTypeColor `json:"color,omitempty"` - // FontFamily: Font family such as `Arial`, `Times New Roman`. - // https://www.w3schools.com/cssref/pr_font_font-family.asp - FontFamily string `json:"fontFamily,omitempty"` - // FontSize: Font size. - FontSize *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize `json:"fontSize,omitempty"` - // FontWeight: Font weight - // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are - // `normal`, `bold`, `bolder`, and `lighter`. - FontWeight string `json:"fontWeight,omitempty"` - // TextAnchor: Text anchor indexing into the Document.text. - TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // TextDecoration: Text decoration - // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS - // standard. - TextDecoration string `json:"textDecoration,omitempty"` - // TextStyle: Text style - // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values - // are `normal`, `italic`, and `oblique`. - TextStyle string `json:"textStyle,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackgroundColor") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackgroundColor") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentStyle) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentStyle - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentStyleFontSize: Font size with unit. -type GoogleCloudDocumentaiV1beta2DocumentStyleFontSize struct { - // Size: Font size for the text. - Size float64 `json:"size,omitempty"` - // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and - // `pt`). - Unit string `json:"unit,omitempty"` - // ForceSendFields is a list of field names (e.g. "Size") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Size") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentStyleFontSize) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentStyleFontSize - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentStyleFontSize - var s1 struct { - Size gensupport.JSONFloat64 `json:"size"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Size = float64(s1.Size) - return nil -} - -// GoogleCloudDocumentaiV1beta2DocumentTextAnchor: Text reference indexing into -// the Document.text. -type GoogleCloudDocumentaiV1beta2DocumentTextAnchor struct { - // Content: Contains the content of the text span so that users do not have to - // look it up in the text_segments. It is always populated for formFields. - Content string `json:"content,omitempty"` - // TextSegments: The text segments from the Document.text. - TextSegments []*GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment `json:"textSegments,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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentTextAnchor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentTextAnchor - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment: A text segment in -// the Document.text. The indices may be out of bounds which indicate that the -// text extends into another document shard for large sharded documents. See -// ShardInfo.text_offset -type GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment struct { - // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. - EndIndex int64 `json:"endIndex,omitempty,string"` - // StartIndex: TextSegment start UTF-8 char index in the Document.text. - StartIndex int64 `json:"startIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EndIndex") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndIndex") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2DocumentTextChange: This message is used for -// text changes aka. OCR corrections. -type GoogleCloudDocumentaiV1beta2DocumentTextChange struct { - // ChangedText: The text that replaces the text identified in the - // `text_anchor`. - ChangedText string `json:"changedText,omitempty"` - // Provenance: The history of this annotation. - Provenance []*GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` - // TextAnchor: Provenance of the correction. Text anchor indexing into the - // Document.text. There can only be a single `TextAnchor.text_segments` - // element. If the start and end index of the text segment are the same, the - // text change is inserted before that index. - TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChangedText") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChangedText") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2DocumentTextChange) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2DocumentTextChange - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2GcsDestination: The Google Cloud Storage -// location where the output file will be written to. -type GoogleCloudDocumentaiV1beta2GcsDestination struct { - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2GcsDestination) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2GcsDestination - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2GcsSource: The Google Cloud Storage location -// where the input file will be read from. -type GoogleCloudDocumentaiV1beta2GcsSource struct { - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uri") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2GcsSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2GcsSource - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2InputConfig: The desired input location and -// metadata. -type GoogleCloudDocumentaiV1beta2InputConfig struct { - // Contents: Content in bytes, represented as a stream of bytes. Note: As with - // all `bytes` fields, proto buffer messages use a pure binary representation, - // whereas JSON representations use base64. This field only works for - // synchronous ProcessDocument method. - Contents string `json:"contents,omitempty"` - // GcsSource: The Google Cloud Storage location to read the input from. This - // must be a single file. - GcsSource *GoogleCloudDocumentaiV1beta2GcsSource `json:"gcsSource,omitempty"` - // MimeType: Required. Mimetype of the input. Current supported mimetypes are - // application/pdf, image/tiff, and image/gif. In addition, application/json - // type is supported for requests with ProcessDocumentRequest.automl_params - // field set. The JSON file needs to be in Document format. - MimeType string `json:"mimeType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Contents") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Contents") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2InputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2InputConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2NormalizedVertex: A vertex represents a 2D point -// in the image. NOTE: the normalized vertex coordinates are relative to the -// original image and range from 0 to 1. -type GoogleCloudDocumentaiV1beta2NormalizedVertex struct { - // X: X coordinate. - X float64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y float64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2NormalizedVertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2NormalizedVertex - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDocumentaiV1beta2NormalizedVertex) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDocumentaiV1beta2NormalizedVertex - var s1 struct { - X gensupport.JSONFloat64 `json:"x"` - Y gensupport.JSONFloat64 `json:"y"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.X = float64(s1.X) - s.Y = float64(s1.Y) - return nil -} - -// GoogleCloudDocumentaiV1beta2OperationMetadata: Contains metadata for the -// BatchProcessDocuments operation. -type GoogleCloudDocumentaiV1beta2OperationMetadata struct { - // CreateTime: The creation time of the operation. - CreateTime string `json:"createTime,omitempty"` - // State: The state of the current batch processing. - // - // Possible values: - // "STATE_UNSPECIFIED" - The default value. This value is used if the state - // is omitted. - // "ACCEPTED" - Request is received. - // "WAITING" - Request operation is waiting for scheduling. - // "RUNNING" - Request is being processed. - // "SUCCEEDED" - The batch processing completed successfully. - // "CANCELLED" - The batch processing was cancelled. - // "FAILED" - The batch processing has failed. - State string `json:"state,omitempty"` - // StateMessage: A message providing more details about the current state of - // processing. - StateMessage string `json:"stateMessage,omitempty"` - // UpdateTime: The last update time of the operation. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2OperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2OperationMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2OutputConfig: The desired output location and -// metadata. -type GoogleCloudDocumentaiV1beta2OutputConfig struct { - // GcsDestination: The Google Cloud Storage location to write the output to. - GcsDestination *GoogleCloudDocumentaiV1beta2GcsDestination `json:"gcsDestination,omitempty"` - // PagesPerShard: The max number of pages to include into each output Document - // shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not - // specified, the default value is 20. For example, for one pdf file with 100 - // pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 - // Document shard JSON files each containing 20 parsed pages will be written - // under the prefix OutputConfig.gcs_destination.uri and suffix - // pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS - // outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json - // pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json - PagesPerShard int64 `json:"pagesPerShard,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsDestination") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsDestination") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2OutputConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2OutputConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2ProcessDocumentResponse: Response to a single -// document processing request. -type GoogleCloudDocumentaiV1beta2ProcessDocumentResponse struct { - // InputConfig: Information about the input file. This is the same as the - // corresponding input config in the request. - InputConfig *GoogleCloudDocumentaiV1beta2InputConfig `json:"inputConfig,omitempty"` - // OutputConfig: The output location of the parsed responses. The responses are - // written to this location as JSON-serialized `Document` objects. - OutputConfig *GoogleCloudDocumentaiV1beta2OutputConfig `json:"outputConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "InputConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InputConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2ProcessDocumentResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2ProcessDocumentResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDocumentaiV1beta2Vertex: A vertex represents a 2D point in the -// image. NOTE: the vertex coordinates are in the same scale as the original -// image. -type GoogleCloudDocumentaiV1beta2Vertex struct { - // X: X coordinate. - X int64 `json:"x,omitempty"` - // Y: Y coordinate (starts from the top of the image). - Y int64 `json:"y,omitempty"` - // ForceSendFields is a list of field names (e.g. "X") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "X") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDocumentaiV1beta2Vertex) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta2Vertex - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudDocumentaiV1beta3Barcode: Encodes the detailed information of a // barcode. type GoogleCloudDocumentaiV1beta3Barcode struct { @@ -8872,6 +4595,9 @@ type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityType struct { // BaseTypes: The entity type that this type is derived from. For now, one and // only one should be set. BaseTypes []string `json:"baseTypes,omitempty"` + // Description: The description of the entity type. Could be used to provide + // more information about the entity type for model calls. + Description string `json:"description,omitempty"` // DisplayName: User defined name for the type. DisplayName string `json:"displayName,omitempty"` // EntityTypeMetadata: Metadata for the entity type. @@ -8936,6 +4662,9 @@ func (s GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues) MarshalJ // GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty: Defines // properties that can be part of the entity type. type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty struct { + // Description: The description of the property. Could be used to provide more + // information about the property for model calls. + Description string `json:"description,omitempty"` // DisplayName: User defined name for the property. DisplayName string `json:"displayName,omitempty"` // Name: The name of the property. Follows the same guidelines as the @@ -8959,13 +4688,13 @@ type GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeProperty struct { // ValueType: A reference to the value type of the property. This type is // subject to the same conventions as the `Entity.base_types` field. ValueType string `json:"valueType,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. diff --git a/firebase/v1beta1/firebase-api.json b/firebase/v1beta1/firebase-api.json index 30a32436708..6b0e107cba6 100644 --- a/firebase/v1beta1/firebase-api.json +++ b/firebase/v1beta1/firebase-api.json @@ -1324,7 +1324,7 @@ } } }, - "revision": "20230918", + "revision": "20240913", "rootUrl": "https://firebase.googleapis.com/", "schemas": { "AddFirebaseRequest": { @@ -2343,10 +2343,23 @@ "description": "Immutable. A user-assigned unique identifier for the `FirebaseProject`.", "type": "string" }, + "projectNumber": { + "description": "Output only. Immutable. The globally unique, Google-assigned canonical identifier for the Project. Use this identifier when configuring integrations and/or making API calls to Google Cloud or third-party services.", + "readOnly": true, + "type": "string" + }, + "realtimeDatabaseUrl": { + "description": "Optional. Duplicate field for the URL of the default RTDB instances (if there is one) that uses the same field name as the unified V2 config file format. We wanted to make a single config file format for all the app platforms (Android, iOS and web) and we had to pick consistent names for all the fields since there was some varience between the platforms. If the request asks for the V2 format we will populate this field instead of realtime_database_instance_uri.", + "type": "string" + }, "storageBucket": { "deprecated": true, "description": "**DEPRECATED.** _Instead, find the default Cloud Storage for Firebase bucket using the [list endpoint](https://firebase.google.com/docs/reference/rest/storage/rest/v1beta/projects.buckets/list) within the Cloud Storage for Firebase REST API. Note that the default bucket for the Project might not yet be provisioned, so the return might not contain a default bucket._ The default Cloud Storage for Firebase storage bucket name.", "type": "string" + }, + "version": { + "description": "Version of the config specification.", + "type": "string" } }, "type": "object" diff --git a/firebase/v1beta1/firebase-gen.go b/firebase/v1beta1/firebase-gen.go index 52fdfbc5bf5..192c7ef4996 100644 --- a/firebase/v1beta1/firebase-gen.go +++ b/firebase/v1beta1/firebase-gen.go @@ -1855,6 +1855,19 @@ type WebAppConfig struct { // ProjectId: Immutable. A user-assigned unique identifier for the // `FirebaseProject`. ProjectId string `json:"projectId,omitempty"` + // ProjectNumber: Output only. Immutable. The globally unique, Google-assigned + // canonical identifier for the Project. Use this identifier when configuring + // integrations and/or making API calls to Google Cloud or third-party + // services. + ProjectNumber string `json:"projectNumber,omitempty"` + // RealtimeDatabaseUrl: Optional. Duplicate field for the URL of the default + // RTDB instances (if there is one) that uses the same field name as the + // unified V2 config file format. We wanted to make a single config file format + // for all the app platforms (Android, iOS and web) and we had to pick + // consistent names for all the fields since there was some varience between + // the platforms. If the request asks for the V2 format we will populate this + // field instead of realtime_database_instance_uri. + RealtimeDatabaseUrl string `json:"realtimeDatabaseUrl,omitempty"` // StorageBucket: **DEPRECATED.** _Instead, find the default Cloud Storage for // Firebase bucket using the list endpoint // (https://firebase.google.com/docs/reference/rest/storage/rest/v1beta/projects.buckets/list) @@ -1863,6 +1876,8 @@ type WebAppConfig struct { // contain a default bucket._ The default Cloud Storage for Firebase storage // bucket name. StorageBucket string `json:"storageBucket,omitempty"` + // Version: Version of the config specification. + Version string `json:"version,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` diff --git a/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json b/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json index daaa28613f6..09c55f6eb94 100644 --- a/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json +++ b/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json @@ -585,7 +585,7 @@ } } }, - "revision": "20240726", + "revision": "20240911", "rootUrl": "https://firebaseappdistribution.googleapis.com/", "schemas": { "AndroidxCrawlerOutputPoint": { @@ -943,7 +943,8 @@ "NOT_INSTALLED", "UNABLE_TO_CRAWL", "DEVICE_OUT_OF_MEMORY", - "FAILED_AI_STEP" + "FAILED_AI_STEP", + "TIMED_OUT" ], "enumDescriptions": [ "Reason unspecified.", @@ -951,7 +952,8 @@ "If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform.", "If the app could not be crawled (possibly because the app did not start).", "If the device ran out of memory during the test.", - "At least one AI step failed." + "At least one AI step failed.", + "The crawl reached the time limit before the test could be completed." ], "readOnly": true, "type": "string" diff --git a/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go b/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go index d789eddb255..a698401cf08 100644 --- a/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go +++ b/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go @@ -702,6 +702,8 @@ type GoogleFirebaseAppdistroV1alphaDeviceExecution struct { // app did not start). // "DEVICE_OUT_OF_MEMORY" - If the device ran out of memory during the test. // "FAILED_AI_STEP" - At least one AI step failed. + // "TIMED_OUT" - The crawl reached the time limit before the test could be + // completed. FailedReason string `json:"failedReason,omitempty"` // InconclusiveReason: Output only. The reason why the test was inconclusive. // diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 1f27f80e36c..989560f833e 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20240902", + "revision": "20240911", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -312,6 +312,11 @@ "readOnly": true, "type": "integer" }, + "logprobsResult": { + "$ref": "GoogleCloudAiplatformV1beta1LogprobsResult", + "description": "Output only. Log-likelihood scores for the response tokens and top tokens", + "readOnly": true + }, "safetyRatings": { "description": "Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.", "items": { @@ -406,6 +411,10 @@ }, "type": "array" }, + "generationConfig": { + "$ref": "GoogleCloudAiplatformV1beta1GenerationConfig", + "description": "Optional. Generation config that the model will use to generate the response." + }, "instances": { "description": "Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", "items": { @@ -573,6 +582,13 @@ "$ref": "GoogleCloudAiplatformV1beta1GenerationConfig", "description": "Optional. Generation config." }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", + "type": "object" + }, "safetySettings": { "description": "Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.", "items": { @@ -610,6 +626,11 @@ "readOnly": true, "type": "array" }, + "modelVersion": { + "description": "Output only. The model version used to generate the response.", + "readOnly": true, + "type": "string" + }, "promptFeedback": { "$ref": "GoogleCloudAiplatformV1beta1GenerateContentResponsePromptFeedback", "description": "Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.", @@ -703,6 +724,11 @@ "format": "float", "type": "number" }, + "logprobs": { + "description": "Optional. Logit probabilities.", + "format": "int32", + "type": "integer" + }, "maxOutputTokens": { "description": "Optional. The maximum number of output tokens to generate per message.", "format": "int32", @@ -713,6 +739,10 @@ "format": "float", "type": "number" }, + "responseLogprobs": { + "description": "Optional. If true, export the logprobs results in response.", + "type": "boolean" + }, "responseMimeType": { "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "type": "string" @@ -921,6 +951,62 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1LogprobsResult": { + "description": "Logprobs Result", + "id": "GoogleCloudAiplatformV1beta1LogprobsResult", + "properties": { + "chosenCandidates": { + "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1LogprobsResultCandidate" + }, + "type": "array" + }, + "topCandidates": { + "description": "Length = total number of decoding steps.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1LogprobsResultCandidate": { + "description": "Candidate for the logprobs token and score.", + "id": "GoogleCloudAiplatformV1beta1LogprobsResultCandidate", + "properties": { + "logProbability": { + "description": "The candidate's log probability.", + "format": "float", + "type": "number" + }, + "token": { + "description": "The candidate’s token string value.", + "type": "string" + }, + "tokenId": { + "description": "The candidate’s token id value.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates": { + "description": "Candidates with top log probabilities at each decoding step.", + "id": "GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates", + "properties": { + "candidates": { + "description": "Sorted by log probability in descending order.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1LogprobsResultCandidate" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Part": { "description": "A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if `inline_data` or `file_data` field is filled with raw bytes.", "id": "GoogleCloudAiplatformV1beta1Part", @@ -988,14 +1074,16 @@ "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", - "HARM_CATEGORY_SEXUALLY_EXPLICIT" + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_CIVIC_INTEGRITY" ], "enumDescriptions": [ "The harm category is unspecified.", "The harm category is hate speech.", "The harm category is dangerous content.", "The harm category is harassment.", - "The harm category is sexually explicit content." + "The harm category is sexually explicit content.", + "The harm category is civic integrity." ], "readOnly": true, "type": "string" @@ -1064,14 +1152,16 @@ "HARM_CATEGORY_HATE_SPEECH", "HARM_CATEGORY_DANGEROUS_CONTENT", "HARM_CATEGORY_HARASSMENT", - "HARM_CATEGORY_SEXUALLY_EXPLICIT" + "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "HARM_CATEGORY_CIVIC_INTEGRITY" ], "enumDescriptions": [ "The harm category is unspecified.", "The harm category is hate speech.", "The harm category is dangerous content.", "The harm category is harassment.", - "The harm category is sexually explicit content." + "The harm category is sexually explicit content.", + "The harm category is civic integrity." ], "type": "string" }, @@ -1198,6 +1288,13 @@ "description": "Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.", "type": "object" }, + "propertyOrdering": { + "description": "Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.", + "items": { + "type": "string" + }, + "type": "array" + }, "required": { "description": "Optional. Required properties of Type.OBJECT.", "items": { @@ -1285,7 +1382,7 @@ "id": "GoogleCloudAiplatformV1beta1Tool", "properties": { "functionDeclarations": { - "description": "Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 64 function declarations can be provided.", + "description": "Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided.", "items": { "$ref": "GoogleCloudAiplatformV1beta1FunctionDeclaration" }, diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index cb40b58b281..b6e2df51da4 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -303,6 +303,9 @@ type GoogleCloudAiplatformV1beta1Candidate struct { GroundingMetadata *GoogleCloudAiplatformV1beta1GroundingMetadata `json:"groundingMetadata,omitempty"` // Index: Output only. Index of the candidate. Index int64 `json:"index,omitempty"` + // LogprobsResult: Output only. Log-likelihood scores for the response tokens + // and top tokens + LogprobsResult *GoogleCloudAiplatformV1beta1LogprobsResult `json:"logprobsResult,omitempty"` // SafetyRatings: Output only. List of ratings for the safety of a response // candidate. There is at most one rating per category. SafetyRatings []*GoogleCloudAiplatformV1beta1SafetyRating `json:"safetyRatings,omitempty"` @@ -428,6 +431,9 @@ func (s GoogleCloudAiplatformV1beta1Content) MarshalJSON() ([]byte, error) { type GoogleCloudAiplatformV1beta1CountTokensRequest struct { // Contents: Optional. Input content. Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` + // GenerationConfig: Optional. Generation config that the model will use to + // generate the response. + GenerationConfig *GoogleCloudAiplatformV1beta1GenerationConfig `json:"generationConfig,omitempty"` // Instances: Optional. The instances that are the input to token counting // call. Schema is identical to the prediction schema of the underlying model. Instances []interface{} `json:"instances,omitempty"` @@ -678,6 +684,13 @@ type GoogleCloudAiplatformV1beta1GenerateContentRequest struct { Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` // GenerationConfig: Optional. Generation config. GenerationConfig *GoogleCloudAiplatformV1beta1GenerationConfig `json:"generationConfig,omitempty"` + // Labels: Optional. The labels with user-defined metadata for the request. It + // is used for billing and reporting only. Label keys and values can be no + // longer than 63 characters (Unicode codepoints) and can only contain + // lowercase letters, numeric characters, underscores, and dashes. + // International characters are allowed. Label values are optional. Label keys + // must start with a letter. + Labels map[string]string `json:"labels,omitempty"` // SafetySettings: Optional. Per request settings for blocking unsafe content. // Enforced on GenerateContentResponse.candidates. SafetySettings []*GoogleCloudAiplatformV1beta1SafetySetting `json:"safetySettings,omitempty"` @@ -716,6 +729,8 @@ func (s GoogleCloudAiplatformV1beta1GenerateContentRequest) MarshalJSON() ([]byt type GoogleCloudAiplatformV1beta1GenerateContentResponse struct { // Candidates: Output only. Generated candidates. Candidates []*GoogleCloudAiplatformV1beta1Candidate `json:"candidates,omitempty"` + // ModelVersion: Output only. The model version used to generate the response. + ModelVersion string `json:"modelVersion,omitempty"` // PromptFeedback: Output only. Content filter results for a prompt sent in the // request. Note: Sent only in the first stream chunk. Only happens when no // candidates were generated due to content violations. @@ -816,11 +831,16 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { CandidateCount int64 `json:"candidateCount,omitempty"` // FrequencyPenalty: Optional. Frequency penalties. FrequencyPenalty float64 `json:"frequencyPenalty,omitempty"` + // Logprobs: Optional. Logit probabilities. + Logprobs int64 `json:"logprobs,omitempty"` // MaxOutputTokens: Optional. The maximum number of output tokens to generate // per message. MaxOutputTokens int64 `json:"maxOutputTokens,omitempty"` // PresencePenalty: Optional. Positive penalties. PresencePenalty float64 `json:"presencePenalty,omitempty"` + // ResponseLogprobs: Optional. If true, export the logprobs results in + // response. + ResponseLogprobs bool `json:"responseLogprobs,omitempty"` // ResponseMimeType: Optional. Output response mimetype of the generated // candidate text. Supported mimetype: - `text/plain`: (default) Text output. - // `application/json`: JSON response in the candidates. The model needs to be @@ -1126,6 +1146,95 @@ func (s *GoogleCloudAiplatformV1beta1GroundingSupport) UnmarshalJSON(data []byte return nil } +// GoogleCloudAiplatformV1beta1LogprobsResult: Logprobs Result +type GoogleCloudAiplatformV1beta1LogprobsResult struct { + // ChosenCandidates: Length = total number of decoding steps. The chosen + // candidates may or may not be in top_candidates. + ChosenCandidates []*GoogleCloudAiplatformV1beta1LogprobsResultCandidate `json:"chosenCandidates,omitempty"` + // TopCandidates: Length = total number of decoding steps. + TopCandidates []*GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates `json:"topCandidates,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChosenCandidates") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChosenCandidates") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1LogprobsResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1LogprobsResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1LogprobsResultCandidate: Candidate for the +// logprobs token and score. +type GoogleCloudAiplatformV1beta1LogprobsResultCandidate struct { + // LogProbability: The candidate's log probability. + LogProbability float64 `json:"logProbability,omitempty"` + // Token: The candidate’s token string value. + Token string `json:"token,omitempty"` + // TokenId: The candidate’s token id value. + TokenId int64 `json:"tokenId,omitempty"` + // ForceSendFields is a list of field names (e.g. "LogProbability") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LogProbability") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1LogprobsResultCandidate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1LogprobsResultCandidate + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1LogprobsResultCandidate) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1LogprobsResultCandidate + var s1 struct { + LogProbability gensupport.JSONFloat64 `json:"logProbability"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.LogProbability = float64(s1.LogProbability) + return nil +} + +// GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates: Candidates with top +// log probabilities at each decoding step. +type GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates struct { + // Candidates: Sorted by log probability in descending order. + Candidates []*GoogleCloudAiplatformV1beta1LogprobsResultCandidate `json:"candidates,omitempty"` + // ForceSendFields is a list of field names (e.g. "Candidates") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Candidates") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1LogprobsResultTopCandidates + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Part: A datatype containing media that is part // of a multi-part `Content` message. A `Part` consists of data which has an // associated datatype. A `Part` can only contain one of the accepted types in @@ -1214,6 +1323,7 @@ type GoogleCloudAiplatformV1beta1SafetyRating struct { // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually explicit // content. + // "HARM_CATEGORY_CIVIC_INTEGRITY" - The harm category is civic integrity. Category string `json:"category,omitempty"` // Probability: Output only. Harm probability levels in the content. // @@ -1283,6 +1393,7 @@ type GoogleCloudAiplatformV1beta1SafetySetting struct { // "HARM_CATEGORY_HARASSMENT" - The harm category is harassment. // "HARM_CATEGORY_SEXUALLY_EXPLICIT" - The harm category is sexually explicit // content. + // "HARM_CATEGORY_CIVIC_INTEGRITY" - The harm category is civic integrity. Category string `json:"category,omitempty"` // Method: Optional. Specify if the threshold is used for probability or // severity score. If not specified, the threshold is used for probability @@ -1371,6 +1482,9 @@ type GoogleCloudAiplatformV1beta1Schema struct { // Properties: Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of // Type.OBJECT. Properties map[string]GoogleCloudAiplatformV1beta1Schema `json:"properties,omitempty"` + // PropertyOrdering: Optional. The order of the properties. Not a standard + // field in open api spec. Only used to support the order of the properties. + PropertyOrdering []string `json:"propertyOrdering,omitempty"` // Required: Optional. Required properties of Type.OBJECT. Required []string `json:"required,omitempty"` // Title: Optional. The title of the Schema. @@ -1488,7 +1602,7 @@ type GoogleCloudAiplatformV1beta1Tool struct { // Model may decide to call a subset of these functions by populating // FunctionCall in the response. User should provide a FunctionResponse for // each function call in the next turn. Based on the function responses, Model - // will generate the final response back to the user. Maximum 64 function + // will generate the final response back to the user. Maximum 128 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index eef0cdae420..fad19ee7852 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1682,6 +1682,11 @@ "parent" ], "parameters": { + "filter": { + "description": "An expression that filters the list of returned backups. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Backup are eligible for filtering: * `database_uid` (supports `=` only)", + "location": "query", + "type": "string" + }, "parent": { "description": "Required. The location to list backups from. Format is `projects/{project}/locations/{location}`. Use `{location} = '-'` to list backups from all locations for the given project. This allows listing backups from a single location or from all locations.", "location": "path", @@ -1706,7 +1711,7 @@ } } }, - "revision": "20240822", + "revision": "20240904", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -2525,6 +2530,17 @@ }, "type": "object" }, + "GoogleFirestoreAdminV1BackupSource": { + "description": "Information about a backup that was used to restore a database.", + "id": "GoogleFirestoreAdminV1BackupSource", + "properties": { + "backup": { + "description": "The resource name of the backup that was used to restore this database. Format: `projects/{project}/locations/{location}/backups/{backup}`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata": { "description": "Metadata for google.longrunning.Operation results from FirestoreAdmin.BulkDeleteDocuments.", "id": "GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata", @@ -2762,6 +2778,11 @@ "readOnly": true, "type": "string" }, + "sourceInfo": { + "$ref": "GoogleFirestoreAdminV1SourceInfo", + "description": "Output only. Information about the provenance of this database.", + "readOnly": true + }, "type": { "description": "The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.", "enum": [ @@ -3521,6 +3542,21 @@ "properties": {}, "type": "object" }, + "GoogleFirestoreAdminV1SourceInfo": { + "description": "Information about the provenance of this database.", + "id": "GoogleFirestoreAdminV1SourceInfo", + "properties": { + "backup": { + "$ref": "GoogleFirestoreAdminV1BackupSource", + "description": "If set, this database was restored from the specified backup (or a snapshot thereof)." + }, + "operation": { + "description": "The associated long-running operation. This field may not be set after the operation has completed. Format: `projects/{project}/databases/{database}/operations/{operation}`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleFirestoreAdminV1Stats": { "description": "Backup specific statistics.", "id": "GoogleFirestoreAdminV1Stats", diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 7cad03b2e73..5dc594ed023 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -1526,6 +1526,31 @@ func (s GoogleFirestoreAdminV1BackupSchedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleFirestoreAdminV1BackupSource: Information about a backup that was used +// to restore a database. +type GoogleFirestoreAdminV1BackupSource struct { + // Backup: The resource name of the backup that was used to restore this + // database. Format: + // `projects/{project}/locations/{location}/backups/{backup}`. + Backup string `json:"backup,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleFirestoreAdminV1BackupSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1BackupSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1BulkDeleteDocumentsMetadata: Metadata for // google.longrunning.Operation results from // FirestoreAdmin.BulkDeleteDocuments. @@ -1777,6 +1802,8 @@ type GoogleFirestoreAdminV1Database struct { // PreviousId: Output only. The database resource's prior database ID. This // field is only populated for deleted databases. PreviousId string `json:"previousId,omitempty"` + // SourceInfo: Output only. Information about the provenance of this database. + SourceInfo *GoogleFirestoreAdminV1SourceInfo `json:"sourceInfo,omitempty"` // Type: The type of the database. See // https://cloud.google.com/datastore/docs/firestore-or-datastore for // information about how to choose. @@ -2699,6 +2726,34 @@ func (s GoogleFirestoreAdminV1RestoreDatabaseRequest) MarshalJSON() ([]byte, err type GoogleFirestoreAdminV1SourceEncryptionOptions struct { } +// GoogleFirestoreAdminV1SourceInfo: Information about the provenance of this +// database. +type GoogleFirestoreAdminV1SourceInfo struct { + // Backup: If set, this database was restored from the specified backup (or a + // snapshot thereof). + Backup *GoogleFirestoreAdminV1BackupSource `json:"backup,omitempty"` + // Operation: The associated long-running operation. This field may not be set + // after the operation has completed. Format: + // `projects/{project}/databases/{database}/operations/{operation}`. + Operation string `json:"operation,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleFirestoreAdminV1SourceInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleFirestoreAdminV1SourceInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleFirestoreAdminV1Stats: Backup specific statistics. type GoogleFirestoreAdminV1Stats struct { // DocumentCount: Output only. The total number of documents contained in the @@ -9683,6 +9738,18 @@ func (r *ProjectsLocationsBackupsService) List(parent string) *ProjectsLocations return c } +// Filter sets the optional parameter "filter": An expression that filters the +// list of returned backups. A filter expression consists of a field name, a +// comparison operator, and a value for filtering. The value must be a string, +// a number, or a boolean. The comparison operator must be one of: `<`, `>`, +// `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter +// rules are not case sensitive. The following fields in the Backup are +// eligible for filtering: * `database_uid` (supports `=` only) +func (c *ProjectsLocationsBackupsListCall) Filter(filter string) *ProjectsLocationsBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index d7fbeea8acd..2202525aacc 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -793,6 +793,41 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "generateExclusivityManifest": { + "description": "GenerateExclusivityManifest generates the manifests to update the exclusivity artifacts in the cluster if needed. Exclusivity artifacts include the Membership custom resource definition (CRD) and the singleton Membership custom resource (CR). Combined with ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes cluster is only registered to a single GKE Hub. The Membership CRD is versioned, and may require conversion when the GKE Hub API server begins serving a newer version of the CRD and corresponding CR. The response will be the converted CRD and CR if there are any differences between the versions.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}:generateExclusivityManifest", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.generateExclusivityManifest", + "parameterOrder": [ + "name" + ], + "parameters": { + "crManifest": { + "description": "Optional. The YAML manifest of the membership CR retrieved by `kubectl get memberships membership`. Leave empty if the resource does not exist.", + "location": "query", + "type": "string" + }, + "crdManifest": { + "description": "Optional. The YAML manifest of the membership CRD retrieved by `kubectl get customresourcedefinitions membership`. Leave empty if the resource does not exist.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/memberships/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:generateExclusivityManifest", + "response": { + "$ref": "GenerateExclusivityManifestResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets the details of a Membership.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/memberships/{membershipsId}", @@ -1063,6 +1098,41 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "validateExclusivity": { + "description": "ValidateExclusivity validates the state of exclusivity in the cluster. The validation does not depend on an existing Hub membership resource.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/memberships:validateExclusivity", + "httpMethod": "GET", + "id": "gkehub.projects.locations.memberships.validateExclusivity", + "parameterOrder": [ + "parent" + ], + "parameters": { + "crManifest": { + "description": "Optional. The YAML of the membership CR in the cluster. Empty if the membership CR does not exist.", + "location": "query", + "type": "string" + }, + "intendedMembership": { + "description": "Required. The intended membership name under the `parent`. This method only does validation in anticipation of a CreateMembership call with the same name.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/memberships:validateExclusivity", + "response": { + "$ref": "ValidateExclusivityResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -2185,7 +2255,7 @@ } } }, - "revision": "20240902", + "revision": "20240909", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -4351,6 +4421,21 @@ }, "type": "object" }, + "GenerateExclusivityManifestResponse": { + "description": "The response of the exclusivity artifacts manifests for the client to apply.", + "id": "GenerateExclusivityManifestResponse", + "properties": { + "crManifest": { + "description": "The YAML manifest of the membership CR to apply if a new version of the CR is available. Empty if no update needs to be applied.", + "type": "string" + }, + "crdManifest": { + "description": "The YAML manifest of the membership CRD to apply if a newer version of the CRD is available. Empty if no update needs to be applied.", + "type": "string" + } + }, + "type": "object" + }, "GenerateMembershipRBACRoleBindingYAMLResponse": { "description": "Response for GenerateRBACRoleBindingYAML.", "id": "GenerateMembershipRBACRoleBindingYAMLResponse", @@ -7065,6 +7150,17 @@ }, "type": "object" }, + "ValidateExclusivityResponse": { + "description": "The response of exclusivity artifacts validation result status.", + "id": "ValidateExclusivityResponse", + "properties": { + "status": { + "$ref": "GoogleRpcStatus", + "description": "The validation result. * `OK` means that exclusivity is validated, assuming the manifest produced by GenerateExclusivityManifest is successfully applied. * `ALREADY_EXISTS` means that the Membership CRD is already owned by another Hub. See `status.message` for more information." + } + }, + "type": "object" + }, "ValidationResult": { "description": "ValidationResults are results set by each validator running during ValidateCreateMembership.", "id": "ValidationResult", diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index d252d2337a6..8d8cb2f6cf4 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -3022,6 +3022,36 @@ func (s GenerateConnectManifestResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GenerateExclusivityManifestResponse: The response of the exclusivity +// artifacts manifests for the client to apply. +type GenerateExclusivityManifestResponse struct { + // CrManifest: The YAML manifest of the membership CR to apply if a new version + // of the CR is available. Empty if no update needs to be applied. + CrManifest string `json:"crManifest,omitempty"` + // CrdManifest: The YAML manifest of the membership CRD to apply if a newer + // version of the CRD is available. Empty if no update needs to be applied. + CrdManifest string `json:"crdManifest,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CrManifest") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CrManifest") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GenerateExclusivityManifestResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateExclusivityManifestResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GenerateMembershipRBACRoleBindingYAMLResponse: Response for // GenerateRBACRoleBindingYAML. type GenerateMembershipRBACRoleBindingYAMLResponse struct { @@ -6450,6 +6480,35 @@ func (s ValidateCreateMembershipResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ValidateExclusivityResponse: The response of exclusivity artifacts +// validation result status. +type ValidateExclusivityResponse struct { + // Status: The validation result. * `OK` means that exclusivity is validated, + // assuming the manifest produced by GenerateExclusivityManifest is + // successfully applied. * `ALREADY_EXISTS` means that the Membership CRD is + // already owned by another Hub. See `status.message` for more information. + Status *GoogleRpcStatus `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Status") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Status") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ValidateExclusivityResponse) MarshalJSON() ([]byte, error) { + type NoMethod ValidateExclusivityResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ValidationResult: ValidationResults are results set by each validator // running during ValidateCreateMembership. type ValidationResult struct { @@ -8876,6 +8935,140 @@ func (c *ProjectsLocationsMembershipsGenerateConnectManifestCall) Do(opts ...goo return ret, nil } +type ProjectsLocationsMembershipsGenerateExclusivityManifestCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GenerateExclusivityManifest: GenerateExclusivityManifest generates the +// manifests to update the exclusivity artifacts in the cluster if needed. +// Exclusivity artifacts include the Membership custom resource definition +// (CRD) and the singleton Membership custom resource (CR). Combined with +// ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes +// cluster is only registered to a single GKE Hub. The Membership CRD is +// versioned, and may require conversion when the GKE Hub API server begins +// serving a newer version of the CRD and corresponding CR. The response will +// be the converted CRD and CR if there are any differences between the +// versions. +// +// - name: The Membership resource name in the format +// `projects/*/locations/*/memberships/*`. +func (r *ProjectsLocationsMembershipsService) GenerateExclusivityManifest(name string) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall { + c := &ProjectsLocationsMembershipsGenerateExclusivityManifestCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// CrManifest sets the optional parameter "crManifest": The YAML manifest of +// the membership CR retrieved by `kubectl get memberships membership`. Leave +// empty if the resource does not exist. +func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) CrManifest(crManifest string) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall { + c.urlParams_.Set("crManifest", crManifest) + return c +} + +// CrdManifest sets the optional parameter "crdManifest": The YAML manifest of +// the membership CRD retrieved by `kubectl get customresourcedefinitions +// membership`. Leave empty if the resource does not exist. +func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) CrdManifest(crdManifest string) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall { + c.urlParams_.Set("crdManifest", crdManifest) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) Context(ctx context.Context) *ProjectsLocationsMembershipsGenerateExclusivityManifestCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}:generateExclusivityManifest") + 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 "gkehub.projects.locations.memberships.generateExclusivityManifest" call. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateExclusivityManifestResponse.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 *ProjectsLocationsMembershipsGenerateExclusivityManifestCall) Do(opts ...googleapi.CallOption) (*GenerateExclusivityManifestResponse, 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 := &GenerateExclusivityManifestResponse{ + 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 +} + type ProjectsLocationsMembershipsGetCall struct { s *Service name string @@ -9884,6 +10077,133 @@ func (c *ProjectsLocationsMembershipsValidateCreateCall) Do(opts ...googleapi.Ca return ret, nil } +type ProjectsLocationsMembershipsValidateExclusivityCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ValidateExclusivity: ValidateExclusivity validates the state of exclusivity +// in the cluster. The validation does not depend on an existing Hub membership +// resource. +// +// - parent: The parent (project and location) where the Memberships will be +// created. Specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsMembershipsService) ValidateExclusivity(parent string) *ProjectsLocationsMembershipsValidateExclusivityCall { + c := &ProjectsLocationsMembershipsValidateExclusivityCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// CrManifest sets the optional parameter "crManifest": The YAML of the +// membership CR in the cluster. Empty if the membership CR does not exist. +func (c *ProjectsLocationsMembershipsValidateExclusivityCall) CrManifest(crManifest string) *ProjectsLocationsMembershipsValidateExclusivityCall { + c.urlParams_.Set("crManifest", crManifest) + return c +} + +// IntendedMembership sets the optional parameter "intendedMembership": +// Required. The intended membership name under the `parent`. This method only +// does validation in anticipation of a CreateMembership call with the same +// name. +func (c *ProjectsLocationsMembershipsValidateExclusivityCall) IntendedMembership(intendedMembership string) *ProjectsLocationsMembershipsValidateExclusivityCall { + c.urlParams_.Set("intendedMembership", intendedMembership) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMembershipsValidateExclusivityCall) Fields(s ...googleapi.Field) *ProjectsLocationsMembershipsValidateExclusivityCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsMembershipsValidateExclusivityCall) IfNoneMatch(entityTag string) *ProjectsLocationsMembershipsValidateExclusivityCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMembershipsValidateExclusivityCall) Context(ctx context.Context) *ProjectsLocationsMembershipsValidateExclusivityCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMembershipsValidateExclusivityCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMembershipsValidateExclusivityCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/memberships:validateExclusivity") + 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 "gkehub.projects.locations.memberships.validateExclusivity" call. +// Any non-2xx status code is an error. Response headers are in either +// *ValidateExclusivityResponse.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 *ProjectsLocationsMembershipsValidateExclusivityCall) Do(opts ...googleapi.CallOption) (*ValidateExclusivityResponse, 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 := &ValidateExclusivityResponse{ + 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 +} + type ProjectsLocationsMembershipsBindingsCreateCall struct { s *Service parent string diff --git a/go.mod b/go.mod index 8b1804ca48b..8b7e1601cc9 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,9 @@ go 1.21 require ( cloud.google.com/go v0.115.1 - cloud.google.com/go/auth v0.9.3 + cloud.google.com/go/auth v0.9.4 cloud.google.com/go/auth/oauth2adapt v0.2.4 - cloud.google.com/go/compute/metadata v0.5.0 + cloud.google.com/go/compute/metadata v0.5.1 github.com/google/go-cmp v0.6.0 github.com/google/s2a-go v0.1.8 github.com/google/uuid v1.6.0 @@ -22,7 +22,7 @@ require ( google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 google.golang.org/genproto/googleapis/bytestream v0.0.0-20240903143218-8af14fe29dc1 google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 - google.golang.org/grpc v1.66.1 + google.golang.org/grpc v1.66.2 google.golang.org/protobuf v1.34.2 ) diff --git a/go.sum b/go.sum index 694c8caa756..5d76a0f042d 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= -cloud.google.com/go/auth v0.9.3 h1:VOEUIAADkkLtyfr3BLa3R8Ed/j6w1jTBmARx+wb5w5U= -cloud.google.com/go/auth v0.9.3/go.mod h1:7z6VY+7h3KUdRov5F1i8NDP5ZzWKYmEPO842BgCsmTk= +cloud.google.com/go/auth v0.9.4 h1:DxF7imbEbiFu9+zdKC6cKBko1e8XeJnipNqIbWZ+kDI= +cloud.google.com/go/auth v0.9.4/go.mod h1:SHia8n6//Ya940F1rLimhJCjjx7KE17t0ctFEci3HkA= cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= -cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= -cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/compute/metadata v0.5.1 h1:NM6oZeZNlYjiwYje+sYFjEpP0Q0zCan1bmQW/KmIrGs= +cloud.google.com/go/compute/metadata v0.5.1/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -141,8 +141,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM= -google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= +google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/go.work.sum b/go.work.sum index 85dfa47ae2d..c2cde28aa9d 100644 --- a/go.work.sum +++ b/go.work.sum @@ -423,27 +423,17 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= -go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= -go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= @@ -485,6 +475,7 @@ golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index 4d5a80ebcd6..ac31806c72a 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -682,7 +682,7 @@ } } }, - "revision": "20240617", + "revision": "20240909", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -741,7 +741,7 @@ }, "policyDelegationSettings": { "$ref": "PolicyDelegationSettings", - "description": "Optional. Settings to configure Policy delegation for apps hosted in tenant projects. INTERNAL_ONLY." + "description": "Optional. Settings to allow google-internal teams to use IAP for apps hosted in a tenant project." }, "reauthSettings": { "$ref": "ReauthSettings", @@ -1188,7 +1188,7 @@ "type": "string" }, "method": { - "description": "Reauth method requested.", + "description": "Optional. Reauth method requested.", "enum": [ "METHOD_UNSPECIFIED", "LOGIN", diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index 2adc528d533..3e69aca1685 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -290,8 +290,8 @@ type AccessSettings struct { IdentitySources []string `json:"identitySources,omitempty"` // OauthSettings: Optional. Settings to configure IAP's OAuth behavior. OauthSettings *OAuthSettings `json:"oauthSettings,omitempty"` - // PolicyDelegationSettings: Optional. Settings to configure Policy delegation - // for apps hosted in tenant projects. INTERNAL_ONLY. + // PolicyDelegationSettings: Optional. Settings to allow google-internal teams + // to use IAP for apps hosted in a tenant project. PolicyDelegationSettings *PolicyDelegationSettings `json:"policyDelegationSettings,omitempty"` // ReauthSettings: Optional. Settings to configure reauthentication policies in // IAP. @@ -1156,7 +1156,7 @@ type ReauthSettings struct { // MaxAge: Optional. Reauth session lifetime, how long before a user has to // reauthenticate again. MaxAge string `json:"maxAge,omitempty"` - // Method: Reauth method requested. + // Method: Optional. Reauth method requested. // // Possible values: // "METHOD_UNSPECIFIED" - Reauthentication disabled. diff --git a/internal/version.go b/internal/version.go index 86152a19fcc..ed0987b42e9 100644 --- a/internal/version.go +++ b/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.197.0" +const Version = "0.198.0" diff --git a/logging/v2/logging-api.json b/logging/v2/logging-api.json index 89033064419..81851320d02 100644 --- a/logging/v2/logging-api.json +++ b/logging/v2/logging-api.json @@ -3027,6 +3027,172 @@ } } }, + "logScopes": { + "methods": { + "create": { + "description": "Creates a log scope.", + "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/logScopes", + "httpMethod": "POST", + "id": "logging.folders.locations.logScopes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "logScopeId": { + "description": "Required. A client-assigned identifier such as \"log-scope\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent project in which to create the log scope \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" For example:\"projects/my-project/locations/global\"", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/logScopes", + "request": { + "$ref": "LogScope" + }, + "response": { + "$ref": "LogScope" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + }, + "delete": { + "description": "Deletes a log scope.", + "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/logScopes/{logScopesId}", + "httpMethod": "DELETE", + "id": "logging.folders.locations.logScopes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the log scope to delete: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]\" For example:\"projects/my-project/locations/global/logScopes/my-log-scope\"", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/logScopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + }, + "get": { + "description": "Gets a log scope.", + "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/logScopes/{logScopesId}", + "httpMethod": "GET", + "id": "logging.folders.locations.logScopes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the log scope: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]\" For example:\"projects/my-project/locations/global/logScopes/my-log-scope\"", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/logScopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "LogScope" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] + }, + "list": { + "description": "Lists log scopes.", + "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/logScopes", + "httpMethod": "GET", + "id": "logging.folders.locations.logScopes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource whose log scopes are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" ", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/logScopes", + "response": { + "$ref": "ListLogScopesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] + }, + "patch": { + "description": "Updates a log scope.", + "flatPath": "v2/folders/{foldersId}/locations/{locationsId}/logScopes/{logScopesId}", + "httpMethod": "PATCH", + "id": "logging.folders.locations.logScopes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the log scope.For example:projects/my-project/locations/global/logScopes/my-log-scope", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/logScopes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask that specifies the fields in log_scope that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=description", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "LogScope" + }, + "response": { + "$ref": "LogScope" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + } + } + }, "operations": { "methods": { "cancel": { @@ -5679,6 +5845,172 @@ } } }, + "logScopes": { + "methods": { + "create": { + "description": "Creates a log scope.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/logScopes", + "httpMethod": "POST", + "id": "logging.organizations.locations.logScopes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "logScopeId": { + "description": "Required. A client-assigned identifier such as \"log-scope\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent project in which to create the log scope \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" For example:\"projects/my-project/locations/global\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/logScopes", + "request": { + "$ref": "LogScope" + }, + "response": { + "$ref": "LogScope" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + }, + "delete": { + "description": "Deletes a log scope.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/logScopes/{logScopesId}", + "httpMethod": "DELETE", + "id": "logging.organizations.locations.logScopes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the log scope to delete: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]\" For example:\"projects/my-project/locations/global/logScopes/my-log-scope\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/logScopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + }, + "get": { + "description": "Gets a log scope.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/logScopes/{logScopesId}", + "httpMethod": "GET", + "id": "logging.organizations.locations.logScopes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the log scope: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]\" For example:\"projects/my-project/locations/global/logScopes/my-log-scope\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/logScopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "LogScope" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] + }, + "list": { + "description": "Lists log scopes.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/logScopes", + "httpMethod": "GET", + "id": "logging.organizations.locations.logScopes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource whose log scopes are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" ", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/logScopes", + "response": { + "$ref": "ListLogScopesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] + }, + "patch": { + "description": "Updates a log scope.", + "flatPath": "v2/organizations/{organizationsId}/locations/{locationsId}/logScopes/{logScopesId}", + "httpMethod": "PATCH", + "id": "logging.organizations.locations.logScopes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the log scope.For example:projects/my-project/locations/global/logScopes/my-log-scope", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/logScopes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask that specifies the fields in log_scope that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=description", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "LogScope" + }, + "response": { + "$ref": "LogScope" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + } + } + }, "operations": { "methods": { "cancel": { @@ -7315,6 +7647,172 @@ } } }, + "logScopes": { + "methods": { + "create": { + "description": "Creates a log scope.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/logScopes", + "httpMethod": "POST", + "id": "logging.projects.locations.logScopes.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "logScopeId": { + "description": "Required. A client-assigned identifier such as \"log-scope\". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent project in which to create the log scope \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" For example:\"projects/my-project/locations/global\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/logScopes", + "request": { + "$ref": "LogScope" + }, + "response": { + "$ref": "LogScope" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + }, + "delete": { + "description": "Deletes a log scope.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/logScopes/{logScopesId}", + "httpMethod": "DELETE", + "id": "logging.projects.locations.logScopes.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the log scope to delete: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]\" For example:\"projects/my-project/locations/global/logScopes/my-log-scope\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/logScopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + }, + "get": { + "description": "Gets a log scope.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/logScopes/{logScopesId}", + "httpMethod": "GET", + "id": "logging.projects.locations.logScopes.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the log scope: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]\" For example:\"projects/my-project/locations/global/logScopes/my-log-scope\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/logScopes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "LogScope" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] + }, + "list": { + "description": "Lists log scopes.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/logScopes", + "httpMethod": "GET", + "id": "logging.projects.locations.logScopes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of results to return from this request.Non-positive values are ignored. The presence of nextPageToken in the response indicates that more results might be available.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. pageToken must be the value of nextPageToken from the previous response. The values of other method parameters should be identical to those in the previous call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource whose log scopes are to be listed: \"projects/[PROJECT_ID]/locations/[LOCATION_ID]\" ", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/logScopes", + "response": { + "$ref": "ListLogScopesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/logging.admin", + "https://www.googleapis.com/auth/logging.read" + ] + }, + "patch": { + "description": "Updates a log scope.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/logScopes/{logScopesId}", + "httpMethod": "PATCH", + "id": "logging.projects.locations.logScopes.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the log scope.For example:projects/my-project/locations/global/logScopes/my-log-scope", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/logScopes/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask that specifies the fields in log_scope that need an update. A field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor example: updateMask=description", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "LogScope" + }, + "response": { + "$ref": "LogScope" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/logging.admin" + ] + } + } + }, "operations": { "methods": { "cancel": { @@ -8424,7 +8922,7 @@ } } }, - "revision": "20240830", + "revision": "20240908", "rootUrl": "https://logging.googleapis.com/", "schemas": { "AuditConfig": { @@ -9297,6 +9795,24 @@ }, "type": "object" }, + "ListLogScopesResponse": { + "description": "The response from ListLogScopes. Every project has a _Default log scope that cannot be modified or deleted.", + "id": "ListLogScopesResponse", + "properties": { + "logScopes": { + "description": "A list of log scopes.", + "items": { + "$ref": "LogScope" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If there might be more results than appear in this response, then nextPageToken is included. To get the next set of results, call the same method again using the value of nextPageToken as pageToken.", + "type": "string" + } + }, + "type": "object" + }, "ListLogsResponse": { "description": "Result returned from ListLogs.", "id": "ListLogsResponse", @@ -9899,6 +10415,41 @@ }, "type": "object" }, + "LogScope": { + "description": "Describes a group of resources to read log entries from.", + "id": "LogScope", + "properties": { + "createTime": { + "description": "Output only. The creation timestamp of the log scope.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Describes this log scope.The maximum length of the description is 8000 characters.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the log scope.For example:projects/my-project/locations/global/logScopes/my-log-scope", + "readOnly": true, + "type": "string" + }, + "resourceNames": { + "description": "Required. Names of one or more parent resources: projects/[PROJECT_ID]May alternatively be one or more views: projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]A log scope can include a maximum of 50 projects and a maximum of 100 resources in total.", + "items": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The last update timestamp of the log scope.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "LogSink": { "description": "Describes a sink used to export log entries to one of the following destinations: a Cloud Logging log bucket, a Cloud Storage bucket, a BigQuery dataset, a Pub/Sub topic, a Cloud project.A logs filter controls which log entries are exported. The sink must be created within a project, organization, billing account, or folder.", "id": "LogSink", diff --git a/logging/v2/logging-gen.go b/logging/v2/logging-gen.go index 678a335d1cb..ff5c943e258 100644 --- a/logging/v2/logging-gen.go +++ b/logging/v2/logging-gen.go @@ -400,6 +400,7 @@ type FoldersExclusionsService struct { func NewFoldersLocationsService(s *Service) *FoldersLocationsService { rs := &FoldersLocationsService{s: s} rs.Buckets = NewFoldersLocationsBucketsService(s) + rs.LogScopes = NewFoldersLocationsLogScopesService(s) rs.Operations = NewFoldersLocationsOperationsService(s) rs.RecentQueries = NewFoldersLocationsRecentQueriesService(s) rs.SavedQueries = NewFoldersLocationsSavedQueriesService(s) @@ -411,6 +412,8 @@ type FoldersLocationsService struct { Buckets *FoldersLocationsBucketsService + LogScopes *FoldersLocationsLogScopesService + Operations *FoldersLocationsOperationsService RecentQueries *FoldersLocationsRecentQueriesService @@ -463,6 +466,15 @@ type FoldersLocationsBucketsViewsLogsService struct { s *Service } +func NewFoldersLocationsLogScopesService(s *Service) *FoldersLocationsLogScopesService { + rs := &FoldersLocationsLogScopesService{s: s} + return rs +} + +type FoldersLocationsLogScopesService struct { + s *Service +} + func NewFoldersLocationsOperationsService(s *Service) *FoldersLocationsOperationsService { rs := &FoldersLocationsOperationsService{s: s} return rs @@ -616,6 +628,7 @@ type OrganizationsExclusionsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} rs.Buckets = NewOrganizationsLocationsBucketsService(s) + rs.LogScopes = NewOrganizationsLocationsLogScopesService(s) rs.Operations = NewOrganizationsLocationsOperationsService(s) rs.RecentQueries = NewOrganizationsLocationsRecentQueriesService(s) rs.SavedQueries = NewOrganizationsLocationsSavedQueriesService(s) @@ -627,6 +640,8 @@ type OrganizationsLocationsService struct { Buckets *OrganizationsLocationsBucketsService + LogScopes *OrganizationsLocationsLogScopesService + Operations *OrganizationsLocationsOperationsService RecentQueries *OrganizationsLocationsRecentQueriesService @@ -679,6 +694,15 @@ type OrganizationsLocationsBucketsViewsLogsService struct { s *Service } +func NewOrganizationsLocationsLogScopesService(s *Service) *OrganizationsLocationsLogScopesService { + rs := &OrganizationsLocationsLogScopesService{s: s} + return rs +} + +type OrganizationsLocationsLogScopesService struct { + s *Service +} + func NewOrganizationsLocationsOperationsService(s *Service) *OrganizationsLocationsOperationsService { rs := &OrganizationsLocationsOperationsService{s: s} return rs @@ -760,6 +784,7 @@ type ProjectsExclusionsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Buckets = NewProjectsLocationsBucketsService(s) + rs.LogScopes = NewProjectsLocationsLogScopesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.RecentQueries = NewProjectsLocationsRecentQueriesService(s) rs.SavedQueries = NewProjectsLocationsSavedQueriesService(s) @@ -771,6 +796,8 @@ type ProjectsLocationsService struct { Buckets *ProjectsLocationsBucketsService + LogScopes *ProjectsLocationsLogScopesService + Operations *ProjectsLocationsOperationsService RecentQueries *ProjectsLocationsRecentQueriesService @@ -823,6 +850,15 @@ type ProjectsLocationsBucketsViewsLogsService struct { s *Service } +func NewProjectsLocationsLogScopesService(s *Service) *ProjectsLocationsLogScopesService { + rs := &ProjectsLocationsLogScopesService{s: s} + return rs +} + +type ProjectsLocationsLogScopesService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -2281,6 +2317,36 @@ func (s ListLogMetricsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListLogScopesResponse: The response from ListLogScopes. Every project has a +// _Default log scope that cannot be modified or deleted. +type ListLogScopesResponse struct { + // LogScopes: A list of log scopes. + LogScopes []*LogScope `json:"logScopes,omitempty"` + // NextPageToken: If there might be more results than appear in this response, + // then nextPageToken is included. To get the next set of results, call the + // same method again using the value of nextPageToken as pageToken. + 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. "LogScopes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LogScopes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListLogScopesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLogScopesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListLogsResponse: Result returned from ListLogs. type ListLogsResponse struct { // LogNames: A list of log names. For example, @@ -3112,6 +3178,45 @@ func (s LogMetric) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// LogScope: Describes a group of resources to read log entries from. +type LogScope struct { + // CreateTime: Output only. The creation timestamp of the log scope. + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. Describes this log scope.The maximum length of the + // description is 8000 characters. + Description string `json:"description,omitempty"` + // Name: Output only. The resource name of the log scope.For + // example:projects/my-project/locations/global/logScopes/my-log-scope + Name string `json:"name,omitempty"` + // ResourceNames: Required. Names of one or more parent resources: + // projects/[PROJECT_ID]May alternatively be one or more views: + // projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW + // _ID]A log scope can include a maximum of 50 projects and a maximum of 100 + // resources in total. + ResourceNames []string `json:"resourceNames,omitempty"` + // UpdateTime: Output only. The last update timestamp of the log scope. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LogScope) MarshalJSON() ([]byte, error) { + type NoMethod LogScope + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // LogSink: Describes a sink used to export log entries to one of the following // destinations: a Cloud Logging log bucket, a Cloud Storage bucket, a BigQuery // dataset, a Pub/Sub topic, a Cloud project.A logs filter controls which log @@ -14831,66 +14936,69 @@ func (c *FoldersLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f } } -type FoldersLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersLocationsLogScopesCreateCall struct { + s *Service + parent string + logscope *LogScope + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to -// Code.CANCELLED. +// Create: Creates a log scope. // -// - name: The name of the operation resource to be cancelled. -func (r *FoldersLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *FoldersLocationsOperationsCancelCall { - c := &FoldersLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest +// - parent: The parent project in which to create the log scope +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For +// example:"projects/my-project/locations/global". +func (r *FoldersLocationsLogScopesService) Create(parent string, logscope *LogScope) *FoldersLocationsLogScopesCreateCall { + c := &FoldersLocationsLogScopesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logscope = logscope + return c +} + +// LogScopeId sets the optional parameter "logScopeId": Required. A +// client-assigned identifier such as "log-scope". Identifiers are limited to +// 100 characters and can include only letters, digits, underscores, hyphens, +// and periods. First character has to be alphanumeric. +func (c *FoldersLocationsLogScopesCreateCall) LogScopeId(logScopeId string) *FoldersLocationsLogScopesCreateCall { + c.urlParams_.Set("logScopeId", logScopeId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FoldersLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsCancelCall { +func (c *FoldersLocationsLogScopesCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsLogScopesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersLocationsOperationsCancelCall) Context(ctx context.Context) *FoldersLocationsOperationsCancelCall { +func (c *FoldersLocationsLogScopesCreateCall) Context(ctx context.Context) *FoldersLocationsLogScopesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLocationsOperationsCancelCall) Header() http.Header { +func (c *FoldersLocationsLogScopesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsLogScopesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logscope) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logScopes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14898,17 +15006,17 @@ func (c *FoldersLocationsOperationsCancelCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.locations.operations.cancel" call. +// Do executes the "logging.folders.locations.logScopes.create" call. // 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 +// *LogScope.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 *FoldersLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *FoldersLocationsLogScopesCreateCall) Do(opts ...googleapi.CallOption) (*LogScope, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14927,7 +15035,7 @@ func (c *FoldersLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &LogScope{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14940,22 +15048,21 @@ func (c *FoldersLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) return ret, nil } -type FoldersLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FoldersLocationsLogScopesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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. +// Delete: Deletes a log scope. // -// - name: The name of the operation resource. -func (r *FoldersLocationsOperationsService) Get(name string) *FoldersLocationsOperationsGetCall { - c := &FoldersLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the log scope to delete: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]" +// For example:"projects/my-project/locations/global/logScopes/my-log-scope". +func (r *FoldersLocationsLogScopesService) Delete(name string) *FoldersLocationsLogScopesDeleteCall { + c := &FoldersLocationsLogScopesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14963,45 +15070,34 @@ func (r *FoldersLocationsOperationsService) Get(name string) *FoldersLocationsOp // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FoldersLocationsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsGetCall { +func (c *FoldersLocationsLogScopesDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsLogScopesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *FoldersLocationsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *FoldersLocationsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOperationsGetCall { +func (c *FoldersLocationsLogScopesDeleteCall) Context(ctx context.Context) *FoldersLocationsLogScopesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLocationsOperationsGetCall) Header() http.Header { +func (c *FoldersLocationsLogScopesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsLogScopesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -15012,12 +15108,12 @@ func (c *FoldersLocationsOperationsGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.locations.operations.get" call. +// Do executes the "logging.folders.locations.logScopes.delete" call. // 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 +// *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 *FoldersLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *FoldersLocationsLogScopesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15036,7 +15132,7 @@ func (c *FoldersLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15049,7 +15145,7 @@ func (c *FoldersLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type FoldersLocationsOperationsListCall struct { +type FoldersLocationsLogScopesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15058,40 +15154,21 @@ type FoldersLocationsOperationsListCall struct { 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. +// Get: Gets a log scope. // -// - name: The name of the operation's parent resource. -func (r *FoldersLocationsOperationsService) List(name string) *FoldersLocationsOperationsListCall { - c := &FoldersLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the log scope: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]" +// For example:"projects/my-project/locations/global/logScopes/my-log-scope". +func (r *FoldersLocationsLogScopesService) Get(name string) *FoldersLocationsLogScopesGetCall { + c := &FoldersLocationsLogScopesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *FoldersLocationsOperationsListCall) Filter(filter string) *FoldersLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *FoldersLocationsOperationsListCall) PageSize(pageSize int64) *FoldersLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *FoldersLocationsOperationsListCall) PageToken(pageToken string) *FoldersLocationsOperationsListCall { - 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 // details. -func (c *FoldersLocationsOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsListCall { +func (c *FoldersLocationsLogScopesGetCall) Fields(s ...googleapi.Field) *FoldersLocationsLogScopesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15099,27 +15176,27 @@ func (c *FoldersLocationsOperationsListCall) Fields(s ...googleapi.Field) *Folde // IfNoneMatch sets an 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. -func (c *FoldersLocationsOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsListCall { +func (c *FoldersLocationsLogScopesGetCall) IfNoneMatch(entityTag string) *FoldersLocationsLogScopesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersLocationsOperationsListCall) Context(ctx context.Context) *FoldersLocationsOperationsListCall { +func (c *FoldersLocationsLogScopesGetCall) Context(ctx context.Context) *FoldersLocationsLogScopesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLocationsOperationsListCall) Header() http.Header { +func (c *FoldersLocationsLogScopesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsLogScopesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15127,7 +15204,7 @@ func (c *FoldersLocationsOperationsListCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15140,13 +15217,12 @@ func (c *FoldersLocationsOperationsListCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.locations.operations.list" call. +// Do executes the "logging.folders.locations.logScopes.get" call. // 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 *FoldersLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +// *LogScope.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 *FoldersLocationsLogScopesGetCall) Do(opts ...googleapi.CallOption) (*LogScope, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15165,7 +15241,7 @@ func (c *FoldersLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &LogScope{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15178,28 +15254,7 @@ func (c *FoldersLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -// 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 *FoldersLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 FoldersLocationsRecentQueriesListCall struct { +type FoldersLocationsLogScopesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -15208,37 +15263,21 @@ type FoldersLocationsRecentQueriesListCall struct { header_ http.Header } -// List: Lists the RecentQueries that were created by the user making the -// request. +// List: Lists log scopes. // -// - parent: The resource to which the listed queries belong. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For -// example:projects/my-project/locations/us-central1Note: The location -// portion of the resource must be specified, but supplying the character - -// in place of LOCATION_ID will return all recent queries. -func (r *FoldersLocationsRecentQueriesService) List(parent string) *FoldersLocationsRecentQueriesListCall { - c := &FoldersLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource whose log scopes are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]". +func (r *FoldersLocationsLogScopesService) List(parent string) *FoldersLocationsLogScopesListCall { + c := &FoldersLocationsLogScopesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Specifies the type ("Logging" -// or "OpsAnalytics") of the recent queries to list. The only valid value for -// this field is one of the two allowable type function calls, which are the -// following: type("Logging") type("OpsAnalytics") -func (c *FoldersLocationsRecentQueriesListCall) Filter(filter string) *FoldersLocationsRecentQueriesListCall { - c.urlParams_.Set("filter", filter) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The +// results to return from this request.Non-positive values are ignored. The // presence of nextPageToken in the response indicates that more results might // be available. -func (c *FoldersLocationsRecentQueriesListCall) PageSize(pageSize int64) *FoldersLocationsRecentQueriesListCall { +func (c *FoldersLocationsLogScopesListCall) PageSize(pageSize int64) *FoldersLocationsLogScopesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -15247,7 +15286,7 @@ func (c *FoldersLocationsRecentQueriesListCall) PageSize(pageSize int64) *Folder // the next batch of results from the preceding call to this method. pageToken // must be the value of nextPageToken from the previous response. The values of // other method parameters should be identical to those in the previous call. -func (c *FoldersLocationsRecentQueriesListCall) PageToken(pageToken string) *FoldersLocationsRecentQueriesListCall { +func (c *FoldersLocationsLogScopesListCall) PageToken(pageToken string) *FoldersLocationsLogScopesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -15255,7 +15294,7 @@ func (c *FoldersLocationsRecentQueriesListCall) PageToken(pageToken string) *Fol // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FoldersLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *FoldersLocationsRecentQueriesListCall { +func (c *FoldersLocationsLogScopesListCall) Fields(s ...googleapi.Field) *FoldersLocationsLogScopesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15263,27 +15302,27 @@ func (c *FoldersLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *Fo // IfNoneMatch sets an 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. -func (c *FoldersLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *FoldersLocationsRecentQueriesListCall { +func (c *FoldersLocationsLogScopesListCall) IfNoneMatch(entityTag string) *FoldersLocationsLogScopesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersLocationsRecentQueriesListCall) Context(ctx context.Context) *FoldersLocationsRecentQueriesListCall { +func (c *FoldersLocationsLogScopesListCall) Context(ctx context.Context) *FoldersLocationsLogScopesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLocationsRecentQueriesListCall) Header() http.Header { +func (c *FoldersLocationsLogScopesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsLogScopesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15291,7 +15330,7 @@ func (c *FoldersLocationsRecentQueriesListCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logScopes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15304,15 +15343,15 @@ func (c *FoldersLocationsRecentQueriesListCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.locations.recentQueries.list" call. +// Do executes the "logging.folders.locations.logScopes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListRecentQueriesResponse.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 *FoldersLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") +// *ListLogScopesResponse.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 *FoldersLocationsLogScopesListCall) Do(opts ...googleapi.CallOption) (*ListLogScopesResponse, 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() @@ -15329,7 +15368,7 @@ func (c *FoldersLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListRecentQueriesResponse{ + ret := &ListLogScopesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15345,7 +15384,7 @@ func (c *FoldersLocationsRecentQueriesListCall) 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 *FoldersLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error { +func (c *FoldersLocationsLogScopesListCall) Pages(ctx context.Context, f func(*ListLogScopesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -15363,94 +15402,88 @@ func (c *FoldersLocationsRecentQueriesListCall) Pages(ctx context.Context, f fun } } -type FoldersLocationsSavedQueriesCreateCall struct { +type FoldersLocationsLogScopesPatchCall struct { s *Service - parent string - savedquery *SavedQuery + name string + logscope *LogScope urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a new SavedQuery for the user making the request. +// Patch: Updates a log scope. // -// - parent: The parent resource in which to create the saved query: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: -// "projects/my-project/locations/global" -// "organizations/123456789/locations/us-central1". -func (r *FoldersLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *FoldersLocationsSavedQueriesCreateCall { - c := &FoldersLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.savedquery = savedquery +// - name: Output only. The resource name of the log scope.For +// example:projects/my-project/locations/global/logScopes/my-log-scope. +func (r *FoldersLocationsLogScopesService) Patch(name string, logscope *LogScope) *FoldersLocationsLogScopesPatchCall { + c := &FoldersLocationsLogScopesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.logscope = logscope return c } -// SavedQueryId sets the optional parameter "savedQueryId": The ID to use for -// the saved query, which will become the final component of the saved query's -// resource name.If the saved_query_id is not provided, the system will -// generate an alphanumeric ID.The saved_query_id is limited to 100 characters -// and can include only the following characters: upper and lower-case -// alphanumeric characters, underscores, hyphens, periods.First character has -// to be alphanumeric. -func (c *FoldersLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *FoldersLocationsSavedQueriesCreateCall { - c.urlParams_.Set("savedQueryId", savedQueryId) +// UpdateMask sets the optional parameter "updateMask": Field mask that +// specifies the fields in log_scope that need an update. A field will be +// overwritten if, and only if, it is in the update mask. name and output only +// fields cannot be updated.For a detailed FieldMask definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=description +func (c *FoldersLocationsLogScopesPatchCall) UpdateMask(updateMask string) *FoldersLocationsLogScopesPatchCall { + 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 // details. -func (c *FoldersLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesCreateCall { +func (c *FoldersLocationsLogScopesPatchCall) Fields(s ...googleapi.Field) *FoldersLocationsLogScopesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersLocationsSavedQueriesCreateCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesCreateCall { +func (c *FoldersLocationsLogScopesPatchCall) Context(ctx context.Context) *FoldersLocationsLogScopesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLocationsSavedQueriesCreateCall) Header() http.Header { +func (c *FoldersLocationsLogScopesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsLogScopesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logscope) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", 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 "logging.folders.locations.savedQueries.create" call. +// Do executes the "logging.folders.locations.logScopes.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *SavedQuery.ServerResponse.Header or (if a response was returned at all) in +// *LogScope.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 *FoldersLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { +func (c *FoldersLocationsLogScopesPatchCall) Do(opts ...googleapi.CallOption) (*LogScope, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15469,7 +15502,7 @@ func (c *FoldersLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SavedQuery{ + ret := &LogScope{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15482,63 +15515,68 @@ func (c *FoldersLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption return ret, nil } -type FoldersLocationsSavedQueriesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an existing SavedQuery that was created by the user making -// the request. +// 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 full resource name of the saved query to delete. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER -// Y_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/ -// [QUERY_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For -// example: -// "projects/my-project/locations/global/savedQueries/my-saved-query". -func (r *FoldersLocationsSavedQueriesService) Delete(name string) *FoldersLocationsSavedQueriesDeleteCall { - c := &FoldersLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *FoldersLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *FoldersLocationsOperationsCancelCall { + c := &FoldersLocationsOperationsCancelCall{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 // details. -func (c *FoldersLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesDeleteCall { +func (c *FoldersLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesDeleteCall { +func (c *FoldersLocationsOperationsCancelCall) Context(ctx context.Context) *FoldersLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLocationsSavedQueriesDeleteCall) Header() http.Header { +func (c *FoldersLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *FoldersLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -15549,12 +15587,12 @@ func (c *FoldersLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.locations.savedQueries.delete" call. +// Do executes the "logging.folders.locations.operations.cancel" call. // 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 *FoldersLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *FoldersLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15586,7 +15624,7 @@ func (c *FoldersLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption return ret, nil } -type FoldersLocationsSavedQueriesGetCall struct { +type FoldersLocationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15595,19 +15633,13 @@ type FoldersLocationsSavedQueriesGetCall struct { header_ http.Header } -// Get: Returns all data associated with the requested query. +// 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 resource name of the saved query. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER -// Y_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/ -// [QUERY_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For -// example: -// "projects/my-project/locations/global/savedQueries/my-saved-query". -func (r *FoldersLocationsSavedQueriesService) Get(name string) *FoldersLocationsSavedQueriesGetCall { - c := &FoldersLocationsSavedQueriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *FoldersLocationsOperationsService) Get(name string) *FoldersLocationsOperationsGetCall { + c := &FoldersLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15615,7 +15647,7 @@ func (r *FoldersLocationsSavedQueriesService) Get(name string) *FoldersLocations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FoldersLocationsSavedQueriesGetCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesGetCall { +func (c *FoldersLocationsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15623,27 +15655,27 @@ func (c *FoldersLocationsSavedQueriesGetCall) Fields(s ...googleapi.Field) *Fold // IfNoneMatch sets an 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. -func (c *FoldersLocationsSavedQueriesGetCall) IfNoneMatch(entityTag string) *FoldersLocationsSavedQueriesGetCall { +func (c *FoldersLocationsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersLocationsSavedQueriesGetCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesGetCall { +func (c *FoldersLocationsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLocationsSavedQueriesGetCall) Header() http.Header { +func (c *FoldersLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsSavedQueriesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15664,12 +15696,12 @@ func (c *FoldersLocationsSavedQueriesGetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.locations.savedQueries.get" call. +// Do executes the "logging.folders.locations.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *SavedQuery.ServerResponse.Header or (if a response was returned at all) in +// *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 *FoldersLocationsSavedQueriesGetCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { +func (c *FoldersLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15688,7 +15720,7 @@ func (c *FoldersLocationsSavedQueriesGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SavedQuery{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15701,62 +15733,41 @@ func (c *FoldersLocationsSavedQueriesGetCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type FoldersLocationsSavedQueriesListCall struct { +type FoldersLocationsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the SavedQueries that were created by the user making the -// request. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns UNIMPLEMENTED. // -// - parent: The resource to which the listed queries belong. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: -// "projects/my-project/locations/us-central1" Note: The locations portion of -// the resource must be specified. To get a list of all saved queries, a -// wildcard character - can be used for LOCATION_ID, for example: -// "projects/my-project/locations/-". -func (r *FoldersLocationsSavedQueriesService) List(parent string) *FoldersLocationsSavedQueriesListCall { - c := &FoldersLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *FoldersLocationsOperationsService) List(name string) *FoldersLocationsOperationsListCall { + c := &FoldersLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": Specifies the type ("Logging" -// or "OpsAnalytics") and the visibility (PRIVATE or SHARED) of the saved -// queries to list. If provided, the filter must contain either the type -// function or a visibility token, or both. If both are chosen, they can be -// placed in any order, but they must be joined by the AND operator or the -// empty character.The two supported type function calls are: type("Logging") -// type("OpsAnalytics")The two supported visibility tokens are: visibility = -// PRIVATE visibility = SHAREDFor example:type("Logging") AND visibility = -// PRIVATE visibility=SHARED type("OpsAnalytics") type("OpsAnalytics)" -// visibility = PRIVATE visibility = SHARED -func (c *FoldersLocationsSavedQueriesListCall) Filter(filter string) *FoldersLocationsSavedQueriesListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *FoldersLocationsOperationsListCall) Filter(filter string) *FoldersLocationsOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request.Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *FoldersLocationsSavedQueriesListCall) PageSize(pageSize int64) *FoldersLocationsSavedQueriesListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *FoldersLocationsOperationsListCall) PageSize(pageSize int64) *FoldersLocationsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *FoldersLocationsSavedQueriesListCall) PageToken(pageToken string) *FoldersLocationsSavedQueriesListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *FoldersLocationsOperationsListCall) PageToken(pageToken string) *FoldersLocationsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -15764,7 +15775,7 @@ func (c *FoldersLocationsSavedQueriesListCall) PageToken(pageToken string) *Fold // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FoldersLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesListCall { +func (c *FoldersLocationsOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15772,27 +15783,27 @@ func (c *FoldersLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *Fol // IfNoneMatch sets an 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. -func (c *FoldersLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *FoldersLocationsSavedQueriesListCall { +func (c *FoldersLocationsOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersLocationsSavedQueriesListCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesListCall { +func (c *FoldersLocationsOperationsListCall) Context(ctx context.Context) *FoldersLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLocationsSavedQueriesListCall) Header() http.Header { +func (c *FoldersLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15800,7 +15811,7 @@ func (c *FoldersLocationsSavedQueriesListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15808,18 +15819,18 @@ func (c *FoldersLocationsSavedQueriesListCall) doRequest(alt string) (*http.Resp } 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 "logging.folders.locations.savedQueries.list" call. +// Do executes the "logging.folders.locations.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListSavedQueriesResponse.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 *FoldersLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) { +// *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 *FoldersLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15838,7 +15849,7 @@ func (c *FoldersLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSavedQueriesResponse{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15854,7 +15865,7 @@ func (c *FoldersLocationsSavedQueriesListCall) 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 *FoldersLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error { +func (c *FoldersLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -15872,94 +15883,118 @@ func (c *FoldersLocationsSavedQueriesListCall) Pages(ctx context.Context, f func } } -type FoldersLocationsSavedQueriesPatchCall struct { - s *Service - name string - savedquery *SavedQuery - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type FoldersLocationsRecentQueriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an existing SavedQuery. +// List: Lists the RecentQueries that were created by the user making the +// request. // -// - name: Output only. Resource name of the saved query.In the format: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" -// For a list of supported locations, see Supported Regions -// (https://cloud.google.com/logging/docs/region-support#bucket-regions)After -// the saved query is created, the location cannot be changed.If the user -// doesn't provide a QUERY_ID, the system will generate an alphanumeric ID. -func (r *FoldersLocationsSavedQueriesService) Patch(name string, savedquery *SavedQuery) *FoldersLocationsSavedQueriesPatchCall { - c := &FoldersLocationsSavedQueriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.savedquery = savedquery +// - parent: The resource to which the listed queries belong. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For +// example:projects/my-project/locations/us-central1Note: The location +// portion of the resource must be specified, but supplying the character - +// in place of LOCATION_ID will return all recent queries. +func (r *FoldersLocationsRecentQueriesService) List(parent string) *FoldersLocationsRecentQueriesListCall { + c := &FoldersLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UpdateMask sets the optional parameter "updateMask": Required. A non-empty -// list of fields to change in the existing saved query. Fields are relative to -// the saved_query and new values for the fields are taken from the -// corresponding fields in the SavedQuery included in this request. Fields not -// mentioned in update_mask are not changed and are ignored in the request.To -// update all mutable fields, specify an update_mask of *.For example, to -// change the description and query filter text of a saved query, specify an -// update_mask of "description, query.filter". -func (c *FoldersLocationsSavedQueriesPatchCall) UpdateMask(updateMask string) *FoldersLocationsSavedQueriesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Filter sets the optional parameter "filter": Specifies the type ("Logging" +// or "OpsAnalytics") of the recent queries to list. The only valid value for +// this field is one of the two allowable type function calls, which are the +// following: type("Logging") type("OpsAnalytics") +func (c *FoldersLocationsRecentQueriesListCall) Filter(filter string) *FoldersLocationsRecentQueriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *FoldersLocationsRecentQueriesListCall) PageSize(pageSize int64) *FoldersLocationsRecentQueriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *FoldersLocationsRecentQueriesListCall) PageToken(pageToken string) *FoldersLocationsRecentQueriesListCall { + 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 // details. -func (c *FoldersLocationsSavedQueriesPatchCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesPatchCall { +func (c *FoldersLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *FoldersLocationsRecentQueriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *FoldersLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *FoldersLocationsRecentQueriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *FoldersLocationsSavedQueriesPatchCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesPatchCall { +func (c *FoldersLocationsRecentQueriesListCall) Context(ctx context.Context) *FoldersLocationsRecentQueriesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLocationsSavedQueriesPatchCall) Header() http.Header { +func (c *FoldersLocationsRecentQueriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsSavedQueriesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery) - if err != nil { - return nil, err +func (c *FoldersLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.locations.savedQueries.patch" call. +// Do executes the "logging.folders.locations.recentQueries.list" call. // Any non-2xx status code is an error. Response headers are in either -// *SavedQuery.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 *FoldersLocationsSavedQueriesPatchCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { +// *ListRecentQueriesResponse.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 *FoldersLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15978,7 +16013,7 @@ func (c *FoldersLocationsSavedQueriesPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SavedQuery{ + ret := &ListRecentQueriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15991,80 +16026,115 @@ func (c *FoldersLocationsSavedQueriesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type FoldersLogsDeleteCall struct { +// 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 *FoldersLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 FoldersLocationsSavedQueriesCreateCall struct { s *Service - logName string + parent string + savedquery *SavedQuery urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes all the log entries in a log for the _Default Log Bucket. -// The log reappears if it receives new entries. Log entries written shortly -// before the delete operation might not be deleted. Entries received after the -// delete operation with a timestamp before the operation will be deleted. +// Create: Creates a new SavedQuery for the user making the request. // -// - logName: The resource name of the log to delete: -// projects/[PROJECT_ID]/logs/[LOG_ID] -// organizations/[ORGANIZATION_ID]/logs/[LOG_ID] -// billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] -// folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For -// example, "projects/my-project-id/logs/syslog", -// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more -// information about log names, see LogEntry. -func (r *FoldersLogsService) Delete(logName string) *FoldersLogsDeleteCall { - c := &FoldersLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.logName = logName +// - parent: The parent resource in which to create the saved query: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: +// "projects/my-project/locations/global" +// "organizations/123456789/locations/us-central1". +func (r *FoldersLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *FoldersLocationsSavedQueriesCreateCall { + c := &FoldersLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.savedquery = savedquery + return c +} + +// SavedQueryId sets the optional parameter "savedQueryId": The ID to use for +// the saved query, which will become the final component of the saved query's +// resource name.If the saved_query_id is not provided, the system will +// generate an alphanumeric ID.The saved_query_id is limited to 100 characters +// and can include only the following characters: upper and lower-case +// alphanumeric characters, underscores, hyphens, periods.First character has +// to be alphanumeric. +func (c *FoldersLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *FoldersLocationsSavedQueriesCreateCall { + c.urlParams_.Set("savedQueryId", savedQueryId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FoldersLogsDeleteCall) Fields(s ...googleapi.Field) *FoldersLogsDeleteCall { +func (c *FoldersLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersLogsDeleteCall) Context(ctx context.Context) *FoldersLogsDeleteCall { +func (c *FoldersLocationsSavedQueriesCreateCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLogsDeleteCall) Header() http.Header { +func (c *FoldersLocationsSavedQueriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLogsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *FoldersLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "logName": c.logName, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.logs.delete" call. +// Do executes the "logging.folders.locations.savedQueries.create" call. // 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 +// *SavedQuery.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 *FoldersLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *FoldersLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16083,7 +16153,7 @@ func (c *FoldersLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &SavedQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16096,58 +16166,672 @@ func (c *FoldersLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) return ret, nil } -type FoldersLogsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type FoldersLocationsSavedQueriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the logs in projects, organizations, folders, or billing -// accounts. Only logs that have entries are listed. +// Delete: Deletes an existing SavedQuery that was created by the user making +// the request. // -// - parent: The resource name to list logs for: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]. -func (r *FoldersLogsService) List(parent string) *FoldersLogsListCall { - c := &FoldersLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The full resource name of the saved query to delete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER +// Y_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/ +// [QUERY_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For +// example: +// "projects/my-project/locations/global/savedQueries/my-saved-query". +func (r *FoldersLocationsSavedQueriesService) Delete(name string) *FoldersLocationsSavedQueriesDeleteCall { + c := &FoldersLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *FoldersLogsListCall) PageSize(pageSize int64) *FoldersLogsListCall { - 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 +// details. +func (c *FoldersLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *FoldersLogsListCall) PageToken(pageToken string) *FoldersLogsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Context sets the context to be used in this call's Do method. +func (c *FoldersLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesDeleteCall { + c.ctx_ = ctx return c } -// ResourceNames sets the optional parameter "resourceNames": List of resource -// names to list logs for: -// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW -// _ID] -// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v -// iews/[VIEW_ID] -// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ -// ID]/views/[VIEW_ID] -// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I -// D]To support legacy queries, it could also be: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]The resource name in the parent field is added to this -// list. +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersLocationsSavedQueriesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "logging.folders.locations.savedQueries.delete" call. +// 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 *FoldersLocationsSavedQueriesDeleteCall) 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 +} + +type FoldersLocationsSavedQueriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns all data associated with the requested query. +// +// - name: The resource name of the saved query. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER +// Y_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/ +// [QUERY_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For +// example: +// "projects/my-project/locations/global/savedQueries/my-saved-query". +func (r *FoldersLocationsSavedQueriesService) Get(name string) *FoldersLocationsSavedQueriesGetCall { + c := &FoldersLocationsSavedQueriesGetCall{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 +// details. +func (c *FoldersLocationsSavedQueriesGetCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *FoldersLocationsSavedQueriesGetCall) IfNoneMatch(entityTag string) *FoldersLocationsSavedQueriesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersLocationsSavedQueriesGetCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersLocationsSavedQueriesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsSavedQueriesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+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 "logging.folders.locations.savedQueries.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *SavedQuery.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 *FoldersLocationsSavedQueriesGetCall) Do(opts ...googleapi.CallOption) (*SavedQuery, 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 := &SavedQuery{ + 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 +} + +type FoldersLocationsSavedQueriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the SavedQueries that were created by the user making the +// request. +// +// - parent: The resource to which the listed queries belong. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: +// "projects/my-project/locations/us-central1" Note: The locations portion of +// the resource must be specified. To get a list of all saved queries, a +// wildcard character - can be used for LOCATION_ID, for example: +// "projects/my-project/locations/-". +func (r *FoldersLocationsSavedQueriesService) List(parent string) *FoldersLocationsSavedQueriesListCall { + c := &FoldersLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Specifies the type ("Logging" +// or "OpsAnalytics") and the visibility (PRIVATE or SHARED) of the saved +// queries to list. If provided, the filter must contain either the type +// function or a visibility token, or both. If both are chosen, they can be +// placed in any order, but they must be joined by the AND operator or the +// empty character.The two supported type function calls are: type("Logging") +// type("OpsAnalytics")The two supported visibility tokens are: visibility = +// PRIVATE visibility = SHAREDFor example:type("Logging") AND visibility = +// PRIVATE visibility=SHARED type("OpsAnalytics") type("OpsAnalytics)" +// visibility = PRIVATE visibility = SHARED +func (c *FoldersLocationsSavedQueriesListCall) Filter(filter string) *FoldersLocationsSavedQueriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request.Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *FoldersLocationsSavedQueriesListCall) PageSize(pageSize int64) *FoldersLocationsSavedQueriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *FoldersLocationsSavedQueriesListCall) PageToken(pageToken string) *FoldersLocationsSavedQueriesListCall { + 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 +// details. +func (c *FoldersLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *FoldersLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *FoldersLocationsSavedQueriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersLocationsSavedQueriesListCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersLocationsSavedQueriesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+parent}/savedQueries") + 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 "logging.folders.locations.savedQueries.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListSavedQueriesResponse.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 *FoldersLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, 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 := &ListSavedQueriesResponse{ + 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 +} + +// 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 *FoldersLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 FoldersLocationsSavedQueriesPatchCall struct { + s *Service + name string + savedquery *SavedQuery + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing SavedQuery. +// +// - name: Output only. Resource name of the saved query.In the format: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" +// For a list of supported locations, see Supported Regions +// (https://cloud.google.com/logging/docs/region-support#bucket-regions)After +// the saved query is created, the location cannot be changed.If the user +// doesn't provide a QUERY_ID, the system will generate an alphanumeric ID. +func (r *FoldersLocationsSavedQueriesService) Patch(name string, savedquery *SavedQuery) *FoldersLocationsSavedQueriesPatchCall { + c := &FoldersLocationsSavedQueriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.savedquery = savedquery + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A non-empty +// list of fields to change in the existing saved query. Fields are relative to +// the saved_query and new values for the fields are taken from the +// corresponding fields in the SavedQuery included in this request. Fields not +// mentioned in update_mask are not changed and are ignored in the request.To +// update all mutable fields, specify an update_mask of *.For example, to +// change the description and query filter text of a saved query, specify an +// update_mask of "description, query.filter". +func (c *FoldersLocationsSavedQueriesPatchCall) UpdateMask(updateMask string) *FoldersLocationsSavedQueriesPatchCall { + 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 +// details. +func (c *FoldersLocationsSavedQueriesPatchCall) Fields(s ...googleapi.Field) *FoldersLocationsSavedQueriesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersLocationsSavedQueriesPatchCall) Context(ctx context.Context) *FoldersLocationsSavedQueriesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersLocationsSavedQueriesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsSavedQueriesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "logging.folders.locations.savedQueries.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *SavedQuery.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 *FoldersLocationsSavedQueriesPatchCall) Do(opts ...googleapi.CallOption) (*SavedQuery, 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 := &SavedQuery{ + 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 +} + +type FoldersLogsDeleteCall struct { + s *Service + logName string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes all the log entries in a log for the _Default Log Bucket. +// The log reappears if it receives new entries. Log entries written shortly +// before the delete operation might not be deleted. Entries received after the +// delete operation with a timestamp before the operation will be deleted. +// +// - logName: The resource name of the log to delete: +// projects/[PROJECT_ID]/logs/[LOG_ID] +// organizations/[ORGANIZATION_ID]/logs/[LOG_ID] +// billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] +// folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For +// example, "projects/my-project-id/logs/syslog", +// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more +// information about log names, see LogEntry. +func (r *FoldersLogsService) Delete(logName string) *FoldersLogsDeleteCall { + c := &FoldersLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.logName = logName + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *FoldersLogsDeleteCall) Fields(s ...googleapi.Field) *FoldersLogsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersLogsDeleteCall) Context(ctx context.Context) *FoldersLogsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersLogsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLogsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}") + 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{ + "logName": c.logName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.logs.delete" call. +// 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 *FoldersLogsDeleteCall) 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 +} + +type FoldersLogsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the logs in projects, organizations, folders, or billing +// accounts. Only logs that have entries are listed. +// +// - parent: The resource name to list logs for: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]. +func (r *FoldersLogsService) List(parent string) *FoldersLogsListCall { + c := &FoldersLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *FoldersLogsListCall) PageSize(pageSize int64) *FoldersLogsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *FoldersLogsListCall) PageToken(pageToken string) *FoldersLogsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ResourceNames sets the optional parameter "resourceNames": List of resource +// names to list logs for: +// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW +// _ID] +// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v +// iews/[VIEW_ID] +// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ +// ID]/views/[VIEW_ID] +// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I +// D]To support legacy queries, it could also be: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]The resource name in the parent field is added to this +// list. func (c *FoldersLogsListCall) ResourceNames(resourceNames ...string) *FoldersLogsListCall { c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...)) return c @@ -16156,7 +16840,1080 @@ func (c *FoldersLogsListCall) ResourceNames(resourceNames ...string) *FoldersLog // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FoldersLogsListCall) Fields(s ...googleapi.Field) *FoldersLogsListCall { +func (c *FoldersLogsListCall) Fields(s ...googleapi.Field) *FoldersLogsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *FoldersLogsListCall) IfNoneMatch(entityTag string) *FoldersLogsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersLogsListCall) Context(ctx context.Context) *FoldersLogsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersLogsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLogsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+parent}/logs") + 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 "logging.folders.logs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListLogsResponse.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 *FoldersLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, 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 := &ListLogsResponse{ + 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 +} + +// 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 *FoldersLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 FoldersSinksCreateCall struct { + s *Service + parent string + logsink *LogSink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a sink that exports specified log entries to a destination. +// The export begins upon ingress, unless the sink's writer_identity is not +// permitted to write to the destination. A sink can export log entries only +// from the resource owning the sink. +// +// - parent: The resource in which to create the sink: "projects/[PROJECT_ID]" +// "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" +// "folders/[FOLDER_ID]" For examples:"projects/my-project" +// "organizations/123456789". +func (r *FoldersSinksService) Create(parent string, logsink *LogSink) *FoldersSinksCreateCall { + c := &FoldersSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logsink = logsink + return c +} + +// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The +// service account provided by the caller that will be used to write the log +// entries. The format must be serviceAccount:some@email. This field can only +// be specified when you are routing logs to a log bucket that is in a +// different project than the sink. When not specified, a Logging service +// account will automatically be generated. +func (c *FoldersSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksCreateCall { + c.urlParams_.Set("customWriterIdentity", customWriterIdentity) + return c +} + +// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": +// Determines the kind of IAM identity returned as writer_identity in the new +// sink. If this value is omitted or set to false, and if the sink's parent is +// a project, then the value returned as writer_identity is the same group or +// service account used by Cloud Logging before the addition of writer +// identities to this API. The sink's destination must be in the same project +// as the sink itself.If this field is set to true, or if the sink is owned by +// a non-project resource such as an organization, then the value of +// writer_identity will be a service agent +// (https://cloud.google.com/iam/docs/service-account-types#service-agents) +// used by the sinks with the same parent. For more information, see +// writer_identity in LogSink. +func (c *FoldersSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksCreateCall { + c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *FoldersSinksCreateCall) Fields(s ...googleapi.Field) *FoldersSinksCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersSinksCreateCall) Context(ctx context.Context) *FoldersSinksCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersSinksCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSinksCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") + 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 "logging.folders.sinks.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *LogSink.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 *FoldersSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, 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 := &LogSink{ + 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 +} + +type FoldersSinksDeleteCall struct { + s *Service + sinkNameid string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a sink. If the sink has a unique writer_identity, then that +// service account is also deleted. +// +// - sinkName: The full resource name of the sink to delete, including the +// parent resource and the sink identifier: +// "projects/[PROJECT_ID]/sinks/[SINK_ID]" +// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" +// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For +// example:"projects/my-project/sinks/my-sink". +func (r *FoldersSinksService) Delete(sinkNameid string) *FoldersSinksDeleteCall { + c := &FoldersSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *FoldersSinksDeleteCall) Fields(s ...googleapi.Field) *FoldersSinksDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersSinksDeleteCall) Context(ctx context.Context) *FoldersSinksDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersSinksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSinksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + 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{ + "sinkName": c.sinkNameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.sinks.delete" call. +// 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 *FoldersSinksDeleteCall) 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 +} + +type FoldersSinksGetCall struct { + s *Service + sinkName string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a sink. +// +// - sinkName: The resource name of the sink: +// "projects/[PROJECT_ID]/sinks/[SINK_ID]" +// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" +// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For +// example:"projects/my-project/sinks/my-sink". +func (r *FoldersSinksService) Get(sinkName string) *FoldersSinksGetCall { + c := &FoldersSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkName = sinkName + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *FoldersSinksGetCall) Fields(s ...googleapi.Field) *FoldersSinksGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *FoldersSinksGetCall) IfNoneMatch(entityTag string) *FoldersSinksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersSinksGetCall) Context(ctx context.Context) *FoldersSinksGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersSinksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSinksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+sinkName}") + 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{ + "sinkName": c.sinkName, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.sinks.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *LogSink.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 *FoldersSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, 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 := &LogSink{ + 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 +} + +type FoldersSinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists sinks. +// +// - parent: The parent resource whose sinks are to be listed: +// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". +func (r *FoldersSinksService) List(parent string) *FoldersSinksListCall { + c := &FoldersSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter expression to +// constrain the sinks returned. Today, this only supports the following +// strings: ā€ 'in_scope("ALL")', 'in_scope("ANCESTOR")', +// 'in_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the +// sinks which can be returned in any other scope. ANCESTOR: Includes +// intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks +// owned by parent.When the empty string is provided, then the filter +// 'in_scope("DEFAULT")' is applied. +func (c *FoldersSinksListCall) Filter(filter string) *FoldersSinksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *FoldersSinksListCall) PageSize(pageSize int64) *FoldersSinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *FoldersSinksListCall) PageToken(pageToken string) *FoldersSinksListCall { + 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 +// details. +func (c *FoldersSinksListCall) Fields(s ...googleapi.Field) *FoldersSinksListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *FoldersSinksListCall) IfNoneMatch(entityTag string) *FoldersSinksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersSinksListCall) Context(ctx context.Context) *FoldersSinksListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersSinksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSinksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+parent}/sinks") + 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 "logging.folders.sinks.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListSinksResponse.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 *FoldersSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, 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 := &ListSinksResponse{ + 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 +} + +// 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 *FoldersSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 FoldersSinksPatchCall struct { + s *Service + sinkNameid string + logsink *LogSink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a sink. This method replaces the values of the destination +// and filter fields of the existing sink with the corresponding values from +// the new sink.The updated sink might also have a new writer_identity; see the +// unique_writer_identity field. +// +// - sinkName: The full resource name of the sink to update, including the +// parent resource and the sink identifier: +// "projects/[PROJECT_ID]/sinks/[SINK_ID]" +// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" +// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For +// example:"projects/my-project/sinks/my-sink". +func (r *FoldersSinksService) Patch(sinkNameid string, logsink *LogSink) *FoldersSinksPatchCall { + c := &FoldersSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid + c.logsink = logsink + return c +} + +// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The +// service account provided by the caller that will be used to write the log +// entries. The format must be serviceAccount:some@email. This field can only +// be specified when you are routing logs to a log bucket that is in a +// different project than the sink. When not specified, a Logging service +// account will automatically be generated. +func (c *FoldersSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksPatchCall { + c.urlParams_.Set("customWriterIdentity", customWriterIdentity) + return c +} + +// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See +// sinks.create for a description of this field. When updating a sink, the +// effect of this field on the value of writer_identity in the updated sink +// depends on both the old and new values of this field: If the old and new +// values of this field are both false or both true, then there is no change to +// the sink's writer_identity. If the old value is false and the new value is +// true, then writer_identity is changed to a service agent +// (https://cloud.google.com/iam/docs/service-account-types#service-agents) +// owned by Cloud Logging. It is an error if the old value is true and the new +// value is set to false or defaulted to false. +func (c *FoldersSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksPatchCall { + c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask that +// specifies the fields in sink that need an update. A sink field will be +// overwritten if, and only if, it is in the update mask. name and output only +// fields cannot be updated.An empty updateMask is temporarily treated as using +// the following mask for backwards compatibility +// purposes:destination,filter,includeChildrenAt some point in the future, +// behavior will be removed and specifying an empty updateMask will be an +// error.For a detailed FieldMask definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=filter +func (c *FoldersSinksPatchCall) UpdateMask(updateMask string) *FoldersSinksPatchCall { + 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 +// details. +func (c *FoldersSinksPatchCall) Fields(s ...googleapi.Field) *FoldersSinksPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersSinksPatchCall) Context(ctx context.Context) *FoldersSinksPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersSinksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSinksPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + 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{ + "sinkName": c.sinkNameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.sinks.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *LogSink.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 *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, 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 := &LogSink{ + 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 +} + +type FoldersSinksUpdateCall struct { + s *Service + sinkNameid string + logsink *LogSink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a sink. This method replaces the values of the destination +// and filter fields of the existing sink with the corresponding values from +// the new sink.The updated sink might also have a new writer_identity; see the +// unique_writer_identity field. +// +// - sinkName: The full resource name of the sink to update, including the +// parent resource and the sink identifier: +// "projects/[PROJECT_ID]/sinks/[SINK_ID]" +// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" +// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For +// example:"projects/my-project/sinks/my-sink". +func (r *FoldersSinksService) Update(sinkNameid string, logsink *LogSink) *FoldersSinksUpdateCall { + c := &FoldersSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid + c.logsink = logsink + return c +} + +// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The +// service account provided by the caller that will be used to write the log +// entries. The format must be serviceAccount:some@email. This field can only +// be specified when you are routing logs to a log bucket that is in a +// different project than the sink. When not specified, a Logging service +// account will automatically be generated. +func (c *FoldersSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksUpdateCall { + c.urlParams_.Set("customWriterIdentity", customWriterIdentity) + return c +} + +// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See +// sinks.create for a description of this field. When updating a sink, the +// effect of this field on the value of writer_identity in the updated sink +// depends on both the old and new values of this field: If the old and new +// values of this field are both false or both true, then there is no change to +// the sink's writer_identity. If the old value is false and the new value is +// true, then writer_identity is changed to a service agent +// (https://cloud.google.com/iam/docs/service-account-types#service-agents) +// owned by Cloud Logging. It is an error if the old value is true and the new +// value is set to false or defaulted to false. +func (c *FoldersSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksUpdateCall { + c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask that +// specifies the fields in sink that need an update. A sink field will be +// overwritten if, and only if, it is in the update mask. name and output only +// fields cannot be updated.An empty updateMask is temporarily treated as using +// the following mask for backwards compatibility +// purposes:destination,filter,includeChildrenAt some point in the future, +// behavior will be removed and specifying an empty updateMask will be an +// error.For a detailed FieldMask definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=filter +func (c *FoldersSinksUpdateCall) UpdateMask(updateMask string) *FoldersSinksUpdateCall { + 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 +// details. +func (c *FoldersSinksUpdateCall) Fields(s ...googleapi.Field) *FoldersSinksUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *FoldersSinksUpdateCall) Context(ctx context.Context) *FoldersSinksUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *FoldersSinksUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersSinksUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PUT", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "sinkName": c.sinkNameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.folders.sinks.update" call. +// Any non-2xx status code is an error. Response headers are in either +// *LogSink.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 *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, 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 := &LogSink{ + 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 +} + +type LocationsGetCall 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 *LocationsService) Get(name string) *LocationsGetCall { + c := &LocationsGetCall{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 +// details. +func (c *LocationsGetCall) Fields(s ...googleapi.Field) *LocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *LocationsGetCall) IfNoneMatch(entityTag string) *LocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *LocationsGetCall) Context(ctx context.Context) *LocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *LocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+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 "logging.locations.get" call. +// 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 *LocationsGetCall) 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 +} + +type LocationsListCall 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 *LocationsService) List(name string) *LocationsListCall { + c := &LocationsListCall{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 *LocationsListCall) Filter(filter string) *LocationsListCall { + 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 *LocationsListCall) PageSize(pageSize int64) *LocationsListCall { + 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 *LocationsListCall) PageToken(pageToken string) *LocationsListCall { + 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 +// details. +func (c *LocationsListCall) Fields(s ...googleapi.Field) *LocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16164,27 +17921,27 @@ func (c *FoldersLogsListCall) Fields(s ...googleapi.Field) *FoldersLogsListCall // IfNoneMatch sets an 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. -func (c *FoldersLogsListCall) IfNoneMatch(entityTag string) *FoldersLogsListCall { +func (c *LocationsListCall) IfNoneMatch(entityTag string) *LocationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersLogsListCall) Context(ctx context.Context) *FoldersLogsListCall { +func (c *LocationsListCall) Context(ctx context.Context) *LocationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersLogsListCall) Header() http.Header { +func (c *LocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLogsListCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16192,7 +17949,7 @@ func (c *FoldersLogsListCall) 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, "v2/{+parent}/logs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16200,18 +17957,18 @@ func (c *FoldersLogsListCall) doRequest(alt string) (*http.Response, error) { } 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 "logging.folders.logs.list" call. +// Do executes the "logging.locations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListLogsResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *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 *FoldersLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) { +func (c *LocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16230,7 +17987,7 @@ func (c *FoldersLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsRespons if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLogsResponse{ + ret := &ListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16246,7 +18003,7 @@ func (c *FoldersLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsRespons // 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 *FoldersLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { +func (c *LocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -16264,92 +18021,70 @@ func (c *FoldersLogsListCall) Pages(ctx context.Context, f func(*ListLogsRespons } } -type FoldersSinksCreateCall struct { +type LocationsBucketsCreateCall struct { s *Service parent string - logsink *LogSink + logbucket *LogBucket urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a sink that exports specified log entries to a destination. -// The export begins upon ingress, unless the sink's writer_identity is not -// permitted to write to the destination. A sink can export log entries only -// from the resource owning the sink. +// Create: Creates a log bucket that can be used to store log entries. After a +// bucket has been created, the bucket's location cannot be changed. // -// - parent: The resource in which to create the sink: "projects/[PROJECT_ID]" -// "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" -// "folders/[FOLDER_ID]" For examples:"projects/my-project" -// "organizations/123456789". -func (r *FoldersSinksService) Create(parent string, logsink *LogSink) *FoldersSinksCreateCall { - c := &FoldersSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource in which to create the log bucket: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For +// example:"projects/my-project/locations/global". +func (r *LocationsBucketsService) Create(parent string, logbucket *LogBucket) *LocationsBucketsCreateCall { + c := &LocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.logsink = logsink - return c -} - -// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The -// service account provided by the caller that will be used to write the log -// entries. The format must be serviceAccount:some@email. This field can only -// be specified when you are routing logs to a log bucket that is in a -// different project than the sink. When not specified, a Logging service -// account will automatically be generated. -func (c *FoldersSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksCreateCall { - c.urlParams_.Set("customWriterIdentity", customWriterIdentity) + c.logbucket = logbucket return c } -// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": -// Determines the kind of IAM identity returned as writer_identity in the new -// sink. If this value is omitted or set to false, and if the sink's parent is -// a project, then the value returned as writer_identity is the same group or -// service account used by Cloud Logging before the addition of writer -// identities to this API. The sink's destination must be in the same project -// as the sink itself.If this field is set to true, or if the sink is owned by -// a non-project resource such as an organization, then the value of -// writer_identity will be a service agent -// (https://cloud.google.com/iam/docs/service-account-types#service-agents) -// used by the sinks with the same parent. For more information, see -// writer_identity in LogSink. -func (c *FoldersSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksCreateCall { - c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) +// BucketId sets the optional parameter "bucketId": Required. A client-assigned +// identifier such as "my-bucket". Identifiers are limited to 100 characters +// and can include only letters, digits, underscores, hyphens, and periods. +// Bucket identifiers must start with an alphanumeric character. +func (c *LocationsBucketsCreateCall) BucketId(bucketId string) *LocationsBucketsCreateCall { + c.urlParams_.Set("bucketId", bucketId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FoldersSinksCreateCall) Fields(s ...googleapi.Field) *FoldersSinksCreateCall { +func (c *LocationsBucketsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *FoldersSinksCreateCall) Context(ctx context.Context) *FoldersSinksCreateCall { +func (c *LocationsBucketsCreateCall) Context(ctx context.Context) *LocationsBucketsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersSinksCreateCall) Header() http.Header { +func (c *LocationsBucketsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -16362,12 +18097,12 @@ func (c *FoldersSinksCreateCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.sinks.create" call. +// Do executes the "logging.locations.buckets.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LogSink.ServerResponse.Header or (if a response was returned at all) in +// *LogBucket.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 *FoldersSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { +func (c *LocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16386,7 +18121,7 @@ func (c *FoldersSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogSink{ + ret := &LogBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16399,189 +18134,89 @@ func (c *FoldersSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, err return ret, nil } -type FoldersSinksDeleteCall struct { +type LocationsBucketsCreateAsyncCall struct { s *Service - sinkNameid string + parent string + logbucket *LogBucket urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a sink. If the sink has a unique writer_identity, then that -// service account is also deleted. -// -// - sinkName: The full resource name of the sink to delete, including the -// parent resource and the sink identifier: -// "projects/[PROJECT_ID]/sinks/[SINK_ID]" -// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" -// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For -// example:"projects/my-project/sinks/my-sink". -func (r *FoldersSinksService) Delete(sinkNameid string) *FoldersSinksDeleteCall { - c := &FoldersSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sinkNameid = sinkNameid - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *FoldersSinksDeleteCall) Fields(s ...googleapi.Field) *FoldersSinksDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *FoldersSinksDeleteCall) Context(ctx context.Context) *FoldersSinksDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *FoldersSinksDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *FoldersSinksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") - 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{ - "sinkName": c.sinkNameid, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "logging.folders.sinks.delete" call. -// 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 *FoldersSinksDeleteCall) 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 -} - -type FoldersSinksGetCall struct { - s *Service - sinkName string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a sink. +// CreateAsync: Creates a log bucket asynchronously that can be used to store +// log entries.After a bucket has been created, the bucket's location cannot be +// changed. // -// - sinkName: The resource name of the sink: -// "projects/[PROJECT_ID]/sinks/[SINK_ID]" -// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" -// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For -// example:"projects/my-project/sinks/my-sink". -func (r *FoldersSinksService) Get(sinkName string) *FoldersSinksGetCall { - c := &FoldersSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sinkName = sinkName +// - parent: The resource in which to create the log bucket: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For +// example:"projects/my-project/locations/global". +func (r *LocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *LocationsBucketsCreateAsyncCall { + c := &LocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logbucket = logbucket + return c +} + +// BucketId sets the optional parameter "bucketId": Required. A client-assigned +// identifier such as "my-bucket". Identifiers are limited to 100 characters +// and can include only letters, digits, underscores, hyphens, and periods. +// Bucket identifiers must start with an alphanumeric character. +func (c *LocationsBucketsCreateAsyncCall) BucketId(bucketId string) *LocationsBucketsCreateAsyncCall { + c.urlParams_.Set("bucketId", bucketId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *FoldersSinksGetCall) Fields(s ...googleapi.Field) *FoldersSinksGetCall { +func (c *LocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *LocationsBucketsCreateAsyncCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *FoldersSinksGetCall) IfNoneMatch(entityTag string) *FoldersSinksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *FoldersSinksGetCall) Context(ctx context.Context) *FoldersSinksGetCall { +func (c *LocationsBucketsCreateAsyncCall) Context(ctx context.Context) *LocationsBucketsCreateAsyncCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersSinksGetCall) Header() http.Header { +func (c *LocationsBucketsCreateAsyncCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSinksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *LocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "sinkName": c.sinkName, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.sinks.get" call. +// Do executes the "logging.locations.buckets.createAsync" call. // Any non-2xx status code is an error. Response headers are in either -// *LogSink.ServerResponse.Header or (if a response was returned at all) in +// *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 *FoldersSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { +func (c *LocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16600,7 +18235,7 @@ func (c *FoldersSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogSink{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16613,116 +18248,78 @@ func (c *FoldersSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) return ret, nil } -type FoldersSinksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type LocationsBucketsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists sinks. +// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the +// DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log +// entries in the bucket will be permanently deleted. // -// - parent: The parent resource whose sinks are to be listed: -// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". -func (r *FoldersSinksService) List(parent string) *FoldersSinksListCall { - c := &FoldersSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter expression to -// constrain the sinks returned. Today, this only supports the following -// strings: ā€ 'in_scope("ALL")', 'in_scope("ANCESTOR")', -// 'in_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the -// sinks which can be returned in any other scope. ANCESTOR: Includes -// intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks -// owned by parent.When the empty string is provided, then the filter -// 'in_scope("DEFAULT")' is applied. -func (c *FoldersSinksListCall) Filter(filter string) *FoldersSinksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *FoldersSinksListCall) PageSize(pageSize int64) *FoldersSinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *FoldersSinksListCall) PageToken(pageToken string) *FoldersSinksListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The full resource name of the bucket to delete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *LocationsBucketsService) Delete(name string) *LocationsBucketsDeleteCall { + c := &LocationsBucketsDeleteCall{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 // details. -func (c *FoldersSinksListCall) Fields(s ...googleapi.Field) *FoldersSinksListCall { +func (c *LocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *FoldersSinksListCall) IfNoneMatch(entityTag string) *FoldersSinksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *FoldersSinksListCall) Context(ctx context.Context) *FoldersSinksListCall { +func (c *LocationsBucketsDeleteCall) Context(ctx context.Context) *LocationsBucketsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersSinksListCall) Header() http.Header { +func (c *LocationsBucketsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v2/{+parent}/sinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.sinks.list" call. +// Do executes the "logging.locations.buckets.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *ListSinksResponse.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 *FoldersSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) { +// *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 *LocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16741,7 +18338,7 @@ func (c *FoldersSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksRespo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSinksResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16754,147 +18351,88 @@ func (c *FoldersSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksRespo return ret, nil } -// 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 *FoldersSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 FoldersSinksPatchCall struct { - s *Service - sinkNameid string - logsink *LogSink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocationsBucketsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a sink. This method replaces the values of the destination -// and filter fields of the existing sink with the corresponding values from -// the new sink.The updated sink might also have a new writer_identity; see the -// unique_writer_identity field. +// Get: Gets a log bucket. // -// - sinkName: The full resource name of the sink to update, including the -// parent resource and the sink identifier: -// "projects/[PROJECT_ID]/sinks/[SINK_ID]" -// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" -// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For -// example:"projects/my-project/sinks/my-sink". -func (r *FoldersSinksService) Patch(sinkNameid string, logsink *LogSink) *FoldersSinksPatchCall { - c := &FoldersSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sinkNameid = sinkNameid - c.logsink = logsink - return c -} - -// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The -// service account provided by the caller that will be used to write the log -// entries. The format must be serviceAccount:some@email. This field can only -// be specified when you are routing logs to a log bucket that is in a -// different project than the sink. When not specified, a Logging service -// account will automatically be generated. -func (c *FoldersSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksPatchCall { - c.urlParams_.Set("customWriterIdentity", customWriterIdentity) - return c -} - -// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See -// sinks.create for a description of this field. When updating a sink, the -// effect of this field on the value of writer_identity in the updated sink -// depends on both the old and new values of this field: If the old and new -// values of this field are both false or both true, then there is no change to -// the sink's writer_identity. If the old value is false and the new value is -// true, then writer_identity is changed to a service agent -// (https://cloud.google.com/iam/docs/service-account-types#service-agents) -// owned by Cloud Logging. It is an error if the old value is true and the new -// value is set to false or defaulted to false. -func (c *FoldersSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksPatchCall { - c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask that -// specifies the fields in sink that need an update. A sink field will be -// overwritten if, and only if, it is in the update mask. name and output only -// fields cannot be updated.An empty updateMask is temporarily treated as using -// the following mask for backwards compatibility -// purposes:destination,filter,includeChildrenAt some point in the future, -// behavior will be removed and specifying an empty updateMask will be an -// error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=filter -func (c *FoldersSinksPatchCall) UpdateMask(updateMask string) *FoldersSinksPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - name: The resource name of the bucket: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *LocationsBucketsService) Get(name string) *LocationsBucketsGetCall { + c := &LocationsBucketsGetCall{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 // details. -func (c *FoldersSinksPatchCall) Fields(s ...googleapi.Field) *FoldersSinksPatchCall { +func (c *LocationsBucketsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *LocationsBucketsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *FoldersSinksPatchCall) Context(ctx context.Context) *FoldersSinksPatchCall { +func (c *LocationsBucketsGetCall) Context(ctx context.Context) *LocationsBucketsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersSinksPatchCall) Header() http.Header { +func (c *LocationsBucketsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSinksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) - if err != nil { - return nil, err +func (c *LocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+sinkName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "sinkName": c.sinkNameid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.sinks.patch" call. +// Do executes the "logging.locations.buckets.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LogSink.ServerResponse.Header or (if a response was returned at all) in +// *LogBucket.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 *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { +func (c *LocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16913,7 +18451,7 @@ func (c *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogSink{ + ret := &LogBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16926,126 +18464,107 @@ func (c *FoldersSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, erro return ret, nil } -type FoldersSinksUpdateCall struct { - s *Service - sinkNameid string - logsink *LogSink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocationsBucketsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates a sink. This method replaces the values of the destination -// and filter fields of the existing sink with the corresponding values from -// the new sink.The updated sink might also have a new writer_identity; see the -// unique_writer_identity field. +// List: Lists log buckets. // -// - sinkName: The full resource name of the sink to update, including the -// parent resource and the sink identifier: -// "projects/[PROJECT_ID]/sinks/[SINK_ID]" -// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" -// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For -// example:"projects/my-project/sinks/my-sink". -func (r *FoldersSinksService) Update(sinkNameid string, logsink *LogSink) *FoldersSinksUpdateCall { - c := &FoldersSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sinkNameid = sinkNameid - c.logsink = logsink - return c -} - -// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The -// service account provided by the caller that will be used to write the log -// entries. The format must be serviceAccount:some@email. This field can only -// be specified when you are routing logs to a log bucket that is in a -// different project than the sink. When not specified, a Logging service -// account will automatically be generated. -func (c *FoldersSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *FoldersSinksUpdateCall { - c.urlParams_.Set("customWriterIdentity", customWriterIdentity) +// - parent: The parent resource whose buckets are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion +// of the resource must be specified, but supplying the character - in place +// of LOCATION_ID will return all buckets. +func (r *LocationsBucketsService) List(parent string) *LocationsBucketsListCall { + c := &LocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See -// sinks.create for a description of this field. When updating a sink, the -// effect of this field on the value of writer_identity in the updated sink -// depends on both the old and new values of this field: If the old and new -// values of this field are both false or both true, then there is no change to -// the sink's writer_identity. If the old value is false and the new value is -// true, then writer_identity is changed to a service agent -// (https://cloud.google.com/iam/docs/service-account-types#service-agents) -// owned by Cloud Logging. It is an error if the old value is true and the new -// value is set to false or defaulted to false. -func (c *FoldersSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *FoldersSinksUpdateCall { - c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *LocationsBucketsListCall) PageSize(pageSize int64) *LocationsBucketsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UpdateMask sets the optional parameter "updateMask": Field mask that -// specifies the fields in sink that need an update. A sink field will be -// overwritten if, and only if, it is in the update mask. name and output only -// fields cannot be updated.An empty updateMask is temporarily treated as using -// the following mask for backwards compatibility -// purposes:destination,filter,includeChildrenAt some point in the future, -// behavior will be removed and specifying an empty updateMask will be an -// error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=filter -func (c *FoldersSinksUpdateCall) UpdateMask(updateMask string) *FoldersSinksUpdateCall { - c.urlParams_.Set("updateMask", updateMask) +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *LocationsBucketsListCall) PageToken(pageToken string) *LocationsBucketsListCall { + 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 // details. -func (c *FoldersSinksUpdateCall) Fields(s ...googleapi.Field) *FoldersSinksUpdateCall { +func (c *LocationsBucketsListCall) Fields(s ...googleapi.Field) *LocationsBucketsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *LocationsBucketsListCall) IfNoneMatch(entityTag string) *LocationsBucketsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *FoldersSinksUpdateCall) Context(ctx context.Context) *FoldersSinksUpdateCall { +func (c *LocationsBucketsListCall) Context(ctx context.Context) *LocationsBucketsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *FoldersSinksUpdateCall) Header() http.Header { +func (c *LocationsBucketsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersSinksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) - if err != nil { - return nil, err +func (c *LocationsBucketsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+sinkName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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{ - "sinkName": c.sinkNameid, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.folders.sinks.update" call. +// Do executes the "logging.locations.buckets.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LogSink.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 *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { +// *ListBucketsResponse.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 *LocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17064,7 +18583,7 @@ func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogSink{ + ret := &ListBucketsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17077,66 +18596,100 @@ func (c *FoldersSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, err return ret, nil } -type LocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *LocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Get: Gets information about a location. +type LocationsBucketsPatchCall struct { + s *Service + name string + logbucket *LogBucket + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a log bucket.If the bucket has a lifecycle_state of +// DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket +// has been created, the bucket's location cannot be changed. // -// - name: Resource name for the location. -func (r *LocationsService) Get(name string) *LocationsGetCall { - c := &LocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the bucket to update. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *LocationsBucketsService) Patch(name string, logbucket *LogBucket) *LocationsBucketsPatchCall { + c := &LocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.logbucket = logbucket + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask +// that specifies the fields in bucket that need an update. A bucket field will +// be overwritten if, and only if, it is in the update mask. name and output +// only fields cannot be updated.For a detailed FieldMask definition, see: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=retention_days +func (c *LocationsBucketsPatchCall) UpdateMask(updateMask string) *LocationsBucketsPatchCall { + 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 // details. -func (c *LocationsGetCall) Fields(s ...googleapi.Field) *LocationsGetCall { +func (c *LocationsBucketsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *LocationsGetCall) IfNoneMatch(entityTag string) *LocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LocationsGetCall) Context(ctx context.Context) *LocationsGetCall { +func (c *LocationsBucketsPatchCall) Context(ctx context.Context) *LocationsBucketsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsGetCall) Header() http.Header { +func (c *LocationsBucketsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } - -func (c *LocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } + +func (c *LocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -17147,12 +18700,12 @@ func (c *LocationsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.get" call. +// Do executes the "logging.locations.buckets.patch" call. // 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 +// *LogBucket.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 *LocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { +func (c *LocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17171,7 +18724,7 @@ func (c *LocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + ret := &LogBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17184,90 +18737,67 @@ func (c *LocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { return ret, nil } -type LocationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type LocationsBucketsUndeleteCall struct { + s *Service + name string + undeletebucketrequest *UndeleteBucketRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists information about the supported locations for this service. +// Undelete: Undeletes a log bucket. A bucket that has been deleted can be +// undeleted within the grace period of 7 days. // -// - name: The resource that owns the locations collection, if applicable. -func (r *LocationsService) List(name string) *LocationsListCall { - c := &LocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the bucket to undelete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *LocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *LocationsBucketsUndeleteCall { + c := &LocationsBucketsUndeleteCall{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 *LocationsListCall) Filter(filter string) *LocationsListCall { - 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 *LocationsListCall) PageSize(pageSize int64) *LocationsListCall { - 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 *LocationsListCall) PageToken(pageToken string) *LocationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.undeletebucketrequest = undeletebucketrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsListCall) Fields(s ...googleapi.Field) *LocationsListCall { +func (c *LocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsUndeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *LocationsListCall) IfNoneMatch(entityTag string) *LocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LocationsListCall) Context(ctx context.Context) *LocationsListCall { +func (c *LocationsBucketsUndeleteCall) Context(ctx context.Context) *LocationsBucketsUndeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsListCall) Header() http.Header { +func (c *LocationsBucketsUndeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *LocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -17278,13 +18808,12 @@ func (c *LocationsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.list" call. +// Do executes the "logging.locations.buckets.undelete" call. // 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 *LocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { +// *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 *LocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17303,7 +18832,7 @@ func (c *LocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17316,82 +18845,69 @@ func (c *LocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResp return ret, nil } -// 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 *LocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 LocationsBucketsCreateCall struct { +type LocationsBucketsUpdateAsyncCall struct { s *Service - parent string + name string logbucket *LogBucket urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a log bucket that can be used to store log entries. After a -// bucket has been created, the bucket's location cannot be changed. +// UpdateAsync: Updates a log bucket asynchronously.If the bucket has a +// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be +// returned.After a bucket has been created, the bucket's location cannot be +// changed. // -// - parent: The resource in which to create the log bucket: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For -// example:"projects/my-project/locations/global". -func (r *LocationsBucketsService) Create(parent string, logbucket *LogBucket) *LocationsBucketsCreateCall { - c := &LocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The full resource name of the bucket to update. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *LocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *LocationsBucketsUpdateAsyncCall { + c := &LocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.logbucket = logbucket return c } -// BucketId sets the optional parameter "bucketId": Required. A client-assigned -// identifier such as "my-bucket". Identifiers are limited to 100 characters -// and can include only letters, digits, underscores, hyphens, and periods. -// Bucket identifiers must start with an alphanumeric character. -func (c *LocationsBucketsCreateCall) BucketId(bucketId string) *LocationsBucketsCreateCall { - c.urlParams_.Set("bucketId", bucketId) +// UpdateMask sets the optional parameter "updateMask": Required. Field mask +// that specifies the fields in bucket that need an update. A bucket field will +// be overwritten if, and only if, it is in the update mask. name and output +// only fields cannot be updated.For a detailed FieldMask definition, see: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=retention_days +func (c *LocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *LocationsBucketsUpdateAsyncCall { + 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 // details. -func (c *LocationsBucketsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsCreateCall { +func (c *LocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *LocationsBucketsUpdateAsyncCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsCreateCall) Context(ctx context.Context) *LocationsBucketsCreateCall { +func (c *LocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *LocationsBucketsUpdateAsyncCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsCreateCall) Header() http.Header { +func (c *LocationsBucketsUpdateAsyncCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) @@ -17400,7 +18916,7 @@ func (c *LocationsBucketsCreateCall) doRequest(alt string) (*http.Response, erro } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17408,17 +18924,17 @@ func (c *LocationsBucketsCreateCall) doRequest(alt string) (*http.Response, erro } 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 "logging.locations.buckets.create" call. +// Do executes the "logging.locations.buckets.updateAsync" call. // Any non-2xx status code is an error. Response headers are in either -// *LogBucket.ServerResponse.Header or (if a response was returned at all) in +// *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 *LocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { +func (c *LocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17437,7 +18953,7 @@ func (c *LocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucke if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogBucket{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17450,71 +18966,73 @@ func (c *LocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucke return ret, nil } -type LocationsBucketsCreateAsyncCall struct { +type LocationsBucketsLinksCreateCall struct { s *Service parent string - logbucket *LogBucket + link *Link urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// CreateAsync: Creates a log bucket asynchronously that can be used to store -// log entries.After a bucket has been created, the bucket's location cannot be -// changed. +// Create: Asynchronously creates a linked dataset in BigQuery which makes it +// possible to use BigQuery to read the logs stored in the log bucket. A log +// bucket may currently only contain one link. // -// - parent: The resource in which to create the log bucket: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For -// example:"projects/my-project/locations/global". -func (r *LocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *LocationsBucketsCreateAsyncCall { - c := &LocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The full resource name of the bucket to create a link for. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". +func (r *LocationsBucketsLinksService) Create(parent string, link *Link) *LocationsBucketsLinksCreateCall { + c := &LocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.logbucket = logbucket + c.link = link return c } -// BucketId sets the optional parameter "bucketId": Required. A client-assigned -// identifier such as "my-bucket". Identifiers are limited to 100 characters -// and can include only letters, digits, underscores, hyphens, and periods. -// Bucket identifiers must start with an alphanumeric character. -func (c *LocationsBucketsCreateAsyncCall) BucketId(bucketId string) *LocationsBucketsCreateAsyncCall { - c.urlParams_.Set("bucketId", bucketId) +// LinkId sets the optional parameter "linkId": Required. The ID to use for the +// link. The link_id can have up to 100 characters. A valid link_id must only +// have alphanumeric characters and underscores within it. +func (c *LocationsBucketsLinksCreateCall) LinkId(linkId string) *LocationsBucketsLinksCreateCall { + c.urlParams_.Set("linkId", linkId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *LocationsBucketsCreateAsyncCall { +func (c *LocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsCreateAsyncCall) Context(ctx context.Context) *LocationsBucketsCreateAsyncCall { +func (c *LocationsBucketsLinksCreateCall) Context(ctx context.Context) *LocationsBucketsLinksCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsCreateAsyncCall) Header() http.Header { +func (c *LocationsBucketsLinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.link) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17527,12 +19045,12 @@ func (c *LocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.createAsync" call. +// Do executes the "logging.locations.buckets.links.create" call. // 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 *LocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *LocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17564,7 +19082,7 @@ func (c *LocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type LocationsBucketsDeleteCall struct { +type LocationsBucketsLinksDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17572,19 +19090,20 @@ type LocationsBucketsDeleteCall struct { header_ http.Header } -// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the -// DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log -// entries in the bucket will be permanently deleted. +// Delete: Deletes a link. This will also delete the corresponding BigQuery +// linked dataset. // -// - name: The full resource name of the bucket to delete. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// - name: The full resource name of the link to delete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L +// INK_ID]" // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" +// ]/links/[LINK_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *LocationsBucketsService) Delete(name string) *LocationsBucketsDeleteCall { - c := &LocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ET_ID]/links/[LINK_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN +// K_ID]". +func (r *LocationsBucketsLinksService) Delete(name string) *LocationsBucketsLinksDeleteCall { + c := &LocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17592,27 +19111,27 @@ func (r *LocationsBucketsService) Delete(name string) *LocationsBucketsDeleteCal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsDeleteCall { +func (c *LocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsDeleteCall) Context(ctx context.Context) *LocationsBucketsDeleteCall { +func (c *LocationsBucketsLinksDeleteCall) Context(ctx context.Context) *LocationsBucketsLinksDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsDeleteCall) Header() http.Header { +func (c *LocationsBucketsLinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -17630,12 +19149,12 @@ func (c *LocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.delete" call. +// Do executes the "logging.locations.buckets.links.delete" call. // 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 +// *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 *LocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *LocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17654,7 +19173,7 @@ func (c *LocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17667,7 +19186,7 @@ func (c *LocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, e return ret, nil } -type LocationsBucketsGetCall struct { +type LocationsBucketsLinksGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17676,17 +19195,19 @@ type LocationsBucketsGetCall struct { header_ http.Header } -// Get: Gets a log bucket. +// Get: Gets a link. // -// - name: The resource name of the bucket: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// - name: The resource name of the link: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L +// INK_ID]" // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" +// ]/links/[LINK_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *LocationsBucketsService) Get(name string) *LocationsBucketsGetCall { - c := &LocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ET_ID]/links/[LINK_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN +// K_ID]". +func (r *LocationsBucketsLinksService) Get(name string) *LocationsBucketsLinksGetCall { + c := &LocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17694,7 +19215,7 @@ func (r *LocationsBucketsService) Get(name string) *LocationsBucketsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsBucketsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsGetCall { +func (c *LocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17702,27 +19223,27 @@ func (c *LocationsBucketsGetCall) Fields(s ...googleapi.Field) *LocationsBuckets // IfNoneMatch sets an 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. -func (c *LocationsBucketsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsGetCall { +func (c *LocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *LocationsBucketsLinksGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsGetCall) Context(ctx context.Context) *LocationsBucketsGetCall { +func (c *LocationsBucketsLinksGetCall) Context(ctx context.Context) *LocationsBucketsLinksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsGetCall) Header() http.Header { +func (c *LocationsBucketsLinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17743,12 +19264,12 @@ func (c *LocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.get" call. +// Do executes the "logging.locations.buckets.links.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LogBucket.ServerResponse.Header or (if a response was returned at all) in +// *Link.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 *LocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { +func (c *LocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17767,7 +19288,7 @@ func (c *LocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogBucket{ + ret := &Link{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17780,7 +19301,7 @@ func (c *LocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, return ret, nil } -type LocationsBucketsListCall struct { +type LocationsBucketsLinksListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -17789,35 +19310,31 @@ type LocationsBucketsListCall struct { header_ http.Header } -// List: Lists log buckets. +// List: Lists links. // -// - parent: The parent resource whose buckets are to be listed: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion -// of the resource must be specified, but supplying the character - in place -// of LOCATION_ID will return all buckets. -func (r *LocationsBucketsService) List(parent string) *LocationsBucketsListCall { - c := &LocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource whose links are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". +func (r *LocationsBucketsLinksService) List(parent string) *LocationsBucketsLinksListCall { + c := &LocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *LocationsBucketsListCall) PageSize(pageSize int64) *LocationsBucketsListCall { +// results to return from this request. +func (c *LocationsBucketsLinksListCall) PageSize(pageSize int64) *LocationsBucketsLinksListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": If present, then retrieve // the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *LocationsBucketsListCall) PageToken(pageToken string) *LocationsBucketsListCall { +// must be the value of nextPageToken from the previous response. +func (c *LocationsBucketsLinksListCall) PageToken(pageToken string) *LocationsBucketsLinksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17825,7 +19342,7 @@ func (c *LocationsBucketsListCall) PageToken(pageToken string) *LocationsBuckets // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsBucketsListCall) Fields(s ...googleapi.Field) *LocationsBucketsListCall { +func (c *LocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17833,27 +19350,27 @@ func (c *LocationsBucketsListCall) Fields(s ...googleapi.Field) *LocationsBucket // IfNoneMatch sets an 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. -func (c *LocationsBucketsListCall) IfNoneMatch(entityTag string) *LocationsBucketsListCall { +func (c *LocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *LocationsBucketsLinksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsListCall) Context(ctx context.Context) *LocationsBucketsListCall { +func (c *LocationsBucketsLinksListCall) Context(ctx context.Context) *LocationsBucketsLinksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsListCall) Header() http.Header { +func (c *LocationsBucketsLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsListCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17861,7 +19378,7 @@ func (c *LocationsBucketsListCall) 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, "v2/{+parent}/buckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17874,13 +19391,13 @@ func (c *LocationsBucketsListCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.list" call. +// Do executes the "logging.locations.buckets.links.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListBucketsResponse.ServerResponse.Header or (if a response was returned at +// *ListLinksResponse.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 *LocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) { +func (c *LocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17899,7 +19416,7 @@ func (c *LocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucket if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListBucketsResponse{ + ret := &ListLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17915,7 +19432,7 @@ func (c *LocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucket // 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 *LocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error { +func (c *LocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -17933,79 +19450,172 @@ func (c *LocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucket } } -type LocationsBucketsPatchCall struct { +type LocationsBucketsViewsCreateCall struct { + s *Service + parent string + logview *LogView + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a view over log entries in a log bucket. A bucket may +// contain a maximum of 30 views. +// +// - parent: The bucket in which to create the view +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *LocationsBucketsViewsService) Create(parent string, logview *LogView) *LocationsBucketsViewsCreateCall { + c := &LocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logview = logview + return c +} + +// ViewId sets the optional parameter "viewId": Required. A client-assigned +// identifier such as "my-view". Identifiers are limited to 100 characters and +// can include only letters, digits, underscores, hyphens, and periods. +func (c *LocationsBucketsViewsCreateCall) ViewId(viewId string) *LocationsBucketsViewsCreateCall { + c.urlParams_.Set("viewId", viewId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *LocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *LocationsBucketsViewsCreateCall) Context(ctx context.Context) *LocationsBucketsViewsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *LocationsBucketsViewsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") + 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 "logging.locations.buckets.views.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *LogView.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 *LocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, 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 := &LogView{ + 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 +} + +type LocationsBucketsViewsDeleteCall struct { s *Service name string - logbucket *LogBucket urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a log bucket.If the bucket has a lifecycle_state of -// DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket -// has been created, the bucket's location cannot be changed. +// Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned, +// this indicates that system is not in a state where it can delete the view. +// If this occurs, please try again in a few minutes. // -// - name: The full resource name of the bucket to update. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *LocationsBucketsService) Patch(name string, logbucket *LogBucket) *LocationsBucketsPatchCall { - c := &LocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the view to delete: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V +// IEW_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi +// ew". +func (r *LocationsBucketsViewsService) Delete(name string) *LocationsBucketsViewsDeleteCall { + c := &LocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.logbucket = logbucket - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Field mask -// that specifies the fields in bucket that need an update. A bucket field will -// be overwritten if, and only if, it is in the update mask. name and output -// only fields cannot be updated.For a detailed FieldMask definition, see: -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=retention_days -func (c *LocationsBucketsPatchCall) UpdateMask(updateMask string) *LocationsBucketsPatchCall { - 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 // details. -func (c *LocationsBucketsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsPatchCall { +func (c *LocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsPatchCall) Context(ctx context.Context) *LocationsBucketsPatchCall { +func (c *LocationsBucketsViewsDeleteCall) Context(ctx context.Context) *LocationsBucketsViewsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsPatchCall) Header() http.Header { +func (c *LocationsBucketsViewsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *LocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -18016,12 +19626,12 @@ func (c *LocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.patch" call. +// Do executes the "logging.locations.buckets.views.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *LogBucket.ServerResponse.Header or (if a response was returned at all) in +// *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 *LocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { +func (c *LocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18040,7 +19650,7 @@ func (c *LocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogBucket{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18053,67 +19663,70 @@ func (c *LocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket return ret, nil } -type LocationsBucketsUndeleteCall struct { - s *Service - name string - undeletebucketrequest *UndeleteBucketRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocationsBucketsViewsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Undelete: Undeletes a log bucket. A bucket that has been deleted can be -// undeleted within the grace period of 7 days. +// Get: Gets a view on a log bucket. // -// - name: The full resource name of the bucket to undelete. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *LocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *LocationsBucketsUndeleteCall { - c := &LocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the policy: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V +// IEW_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi +// ew". +func (r *LocationsBucketsViewsService) Get(name string) *LocationsBucketsViewsGetCall { + c := &LocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.undeletebucketrequest = undeletebucketrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsUndeleteCall { +func (c *LocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *LocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsUndeleteCall) Context(ctx context.Context) *LocationsBucketsUndeleteCall { +func (c *LocationsBucketsViewsGetCall) Context(ctx context.Context) *LocationsBucketsViewsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsUndeleteCall) Header() http.Header { +func (c *LocationsBucketsViewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest) - if err != nil { - return nil, err +func (c *LocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}:undelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 } @@ -18124,12 +19737,12 @@ func (c *LocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.undelete" call. +// Do executes the "logging.locations.buckets.views.get" call. // 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 +// *LogView.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 *LocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *LocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18148,7 +19761,7 @@ func (c *LocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &LogView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18161,78 +19774,61 @@ func (c *LocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, return ret, nil } -type LocationsBucketsUpdateAsyncCall struct { - s *Service - name string - logbucket *LogBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocationsBucketsViewsGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateAsync: Updates a log bucket asynchronously.If the bucket has a -// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be -// returned.After a bucket has been created, the bucket's location cannot be -// changed. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: The full resource name of the bucket to update. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *LocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *LocationsBucketsUpdateAsyncCall { - c := &LocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.logbucket = logbucket - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Field mask -// that specifies the fields in bucket that need an update. A bucket field will -// be overwritten if, and only if, it is in the update mask. name and output -// only fields cannot be updated.For a detailed FieldMask definition, see: -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=retention_days -func (c *LocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *LocationsBucketsUpdateAsyncCall { - c.urlParams_.Set("updateMask", updateMask) +// - 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 *LocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *LocationsBucketsViewsGetIamPolicyCall { + c := &LocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *LocationsBucketsUpdateAsyncCall { +func (c *LocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *LocationsBucketsUpdateAsyncCall { +func (c *LocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *LocationsBucketsViewsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsUpdateAsyncCall) Header() http.Header { +func (c *LocationsBucketsViewsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18240,17 +19836,17 @@ func (c *LocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.updateAsync" call. +// Do executes the "logging.locations.buckets.views.getIamPolicy" call. // 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 +// *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 *LocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *LocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18269,7 +19865,7 @@ func (c *LocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Ope if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18282,75 +19878,85 @@ func (c *LocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type LocationsBucketsLinksCreateCall struct { - s *Service - parent string - link *Link - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocationsBucketsViewsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Asynchronously creates a linked dataset in BigQuery which makes it -// possible to use BigQuery to read the logs stored in the log bucket. A log -// bucket may currently only contain one link. +// List: Lists views on a log bucket. // -// - parent: The full resource name of the bucket to create a link for. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". -func (r *LocationsBucketsLinksService) Create(parent string, link *Link) *LocationsBucketsLinksCreateCall { - c := &LocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The bucket whose views are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". +func (r *LocationsBucketsViewsService) List(parent string) *LocationsBucketsViewsListCall { + c := &LocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.link = link return c } -// LinkId sets the optional parameter "linkId": Required. The ID to use for the -// link. The link_id can have up to 100 characters. A valid link_id must only -// have alphanumeric characters and underscores within it. -func (c *LocationsBucketsLinksCreateCall) LinkId(linkId string) *LocationsBucketsLinksCreateCall { - c.urlParams_.Set("linkId", linkId) +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request.Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *LocationsBucketsViewsListCall) PageSize(pageSize int64) *LocationsBucketsViewsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *LocationsBucketsViewsListCall) PageToken(pageToken string) *LocationsBucketsViewsListCall { + 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 // details. -func (c *LocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksCreateCall { +func (c *LocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *LocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsLinksCreateCall) Context(ctx context.Context) *LocationsBucketsLinksCreateCall { +func (c *LocationsBucketsViewsListCall) Context(ctx context.Context) *LocationsBucketsViewsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsLinksCreateCall) Header() http.Header { +func (c *LocationsBucketsViewsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.link) - if err != nil { - return nil, err +func (c *LocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+parent}/links") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -18361,12 +19967,13 @@ func (c *LocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.links.create" call. +// Do executes the "logging.locations.buckets.views.list" call. // 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 *LocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *ListViewsResponse.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 *LocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18385,7 +19992,7 @@ func (c *LocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Ope if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ListViewsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18398,63 +20005,100 @@ func (c *LocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type LocationsBucketsLinksDeleteCall struct { +// 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 *LocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 LocationsBucketsViewsPatchCall struct { s *Service name string + logview *LogView urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a link. This will also delete the corresponding BigQuery -// linked dataset. +// Patch: Updates a view on a log bucket. This method replaces the value of the +// filter field from the existing view with the corresponding value from the +// new view. If an UNAVAILABLE error is returned, this indicates that system is +// not in a state where it can update the view. If this occurs, please try +// again in a few minutes. // -// - name: The full resource name of the link to delete. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L -// INK_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]/links/[LINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]/links/[LINK_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN -// K_ID]". -func (r *LocationsBucketsLinksService) Delete(name string) *LocationsBucketsLinksDeleteCall { - c := &LocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the view to update +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V +// IEW_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi +// ew". +func (r *LocationsBucketsViewsService) Patch(name string, logview *LogView) *LocationsBucketsViewsPatchCall { + c := &LocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.logview = logview + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask that +// specifies the fields in view that need an update. A field will be +// overwritten if, and only if, it is in the update mask. name and output only +// fields cannot be updated.For a detailed FieldMask definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=filter +func (c *LocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *LocationsBucketsViewsPatchCall { + 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 // details. -func (c *LocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksDeleteCall { +func (c *LocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsLinksDeleteCall) Context(ctx context.Context) *LocationsBucketsLinksDeleteCall { +func (c *LocationsBucketsViewsPatchCall) Context(ctx context.Context) *LocationsBucketsViewsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsLinksDeleteCall) Header() http.Header { +func (c *LocationsBucketsViewsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *LocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -18465,12 +20109,12 @@ func (c *LocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.links.delete" call. +// Do executes the "logging.locations.buckets.views.patch" call. // 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 +// *LogView.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 *LocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *LocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18489,7 +20133,7 @@ func (c *LocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Ope if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &LogView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18502,90 +20146,80 @@ func (c *LocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type LocationsBucketsLinksGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type LocationsBucketsViewsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a link. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// - name: The resource name of the link: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L -// INK_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]/links/[LINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]/links/[LINK_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN -// K_ID]". -func (r *LocationsBucketsLinksService) Get(name string) *LocationsBucketsLinksGetCall { - c := &LocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *LocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *LocationsBucketsViewsSetIamPolicyCall { + c := &LocationsBucketsViewsSetIamPolicyCall{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 // details. -func (c *LocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksGetCall { +func (c *LocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *LocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *LocationsBucketsLinksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsLinksGetCall) Context(ctx context.Context) *LocationsBucketsLinksGetCall { +func (c *LocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *LocationsBucketsViewsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsLinksGetCall) Header() http.Header { +func (c *LocationsBucketsViewsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *LocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.links.get" call. +// Do executes the "logging.locations.buckets.views.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Link.ServerResponse.Header or (if a response was returned at all) in +// *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 *LocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) { +func (c *LocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18604,7 +20238,7 @@ func (c *LocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Link{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18617,103 +20251,84 @@ func (c *LocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, return ret, nil } -type LocationsBucketsLinksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type LocationsBucketsViewsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists links. +// 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. // -// - parent: The parent resource whose links are to be listed: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". -func (r *LocationsBucketsLinksService) List(parent string) *LocationsBucketsLinksListCall { - c := &LocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. -func (c *LocationsBucketsLinksListCall) PageSize(pageSize int64) *LocationsBucketsLinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. -func (c *LocationsBucketsLinksListCall) PageToken(pageToken string) *LocationsBucketsLinksListCall { - c.urlParams_.Set("pageToken", pageToken) +// - 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 *LocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *LocationsBucketsViewsTestIamPermissionsCall { + c := &LocationsBucketsViewsTestIamPermissionsCall{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 // details. -func (c *LocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *LocationsBucketsLinksListCall { +func (c *LocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *LocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *LocationsBucketsLinksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsLinksListCall) Context(ctx context.Context) *LocationsBucketsLinksListCall { +func (c *LocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *LocationsBucketsViewsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsLinksListCall) Header() http.Header { +func (c *LocationsBucketsViewsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *LocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.links.list" call. +// Do executes the "logging.locations.buckets.views.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *ListLinksResponse.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 *LocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) { +// *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 *LocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18732,7 +20347,7 @@ func (c *LocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListL if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLinksResponse{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18745,90 +20360,66 @@ func (c *LocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListL return ret, nil } -// 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 *LocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 LocationsBucketsViewsCreateCall struct { - s *Service - parent string - logview *LogView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a view over log entries in a log bucket. A bucket may -// contain a maximum of 30 views. +// 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. // -// - parent: The bucket in which to create the view -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *LocationsBucketsViewsService) Create(parent string, logview *LogView) *LocationsBucketsViewsCreateCall { - c := &LocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.logview = logview - return c -} - -// ViewId sets the optional parameter "viewId": Required. A client-assigned -// identifier such as "my-view". Identifiers are limited to 100 characters and -// can include only letters, digits, underscores, hyphens, and periods. -func (c *LocationsBucketsViewsCreateCall) ViewId(viewId string) *LocationsBucketsViewsCreateCall { - c.urlParams_.Set("viewId", viewId) +// - name: The name of the operation resource to be cancelled. +func (r *LocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *LocationsOperationsCancelCall { + c := &LocationsOperationsCancelCall{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 // details. -func (c *LocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsCreateCall { +func (c *LocationsOperationsCancelCall) Fields(s ...googleapi.Field) *LocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsViewsCreateCall) Context(ctx context.Context) *LocationsBucketsViewsCreateCall { +func (c *LocationsOperationsCancelCall) Context(ctx context.Context) *LocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsViewsCreateCall) Header() http.Header { +func (c *LocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18836,17 +20427,17 @@ func (c *LocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, } 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 "logging.locations.buckets.views.create" call. +// Do executes the "logging.locations.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *LogView.ServerResponse.Header or (if a response was returned at all) in +// *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 *LocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) { +func (c *LocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18865,7 +20456,7 @@ func (c *LocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*Log if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogView{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18878,25 +20469,22 @@ func (c *LocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*Log return ret, nil } -type LocationsBucketsViewsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned, -// this indicates that system is not in a state where it can delete the view. -// If this occurs, please try again in a few minutes. +// 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 full resource name of the view to delete: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V -// IEW_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi -// ew". -func (r *LocationsBucketsViewsService) Delete(name string) *LocationsBucketsViewsDeleteCall { - c := &LocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *LocationsOperationsService) Get(name string) *LocationsOperationsGetCall { + c := &LocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -18904,34 +20492,45 @@ func (r *LocationsBucketsViewsService) Delete(name string) *LocationsBucketsView // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsDeleteCall { +func (c *LocationsOperationsGetCall) Fields(s ...googleapi.Field) *LocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *LocationsOperationsGetCall) IfNoneMatch(entityTag string) *LocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsViewsDeleteCall) Context(ctx context.Context) *LocationsBucketsViewsDeleteCall { +func (c *LocationsOperationsGetCall) Context(ctx context.Context) *LocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsViewsDeleteCall) Header() http.Header { +func (c *LocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -18942,12 +20541,12 @@ func (c *LocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.views.delete" call. +// Do executes the "logging.locations.operations.get" call. // 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 +// *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 *LocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *LocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18966,7 +20565,7 @@ func (c *LocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Emp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18979,7 +20578,7 @@ func (c *LocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Emp return ret, nil } -type LocationsBucketsViewsGetCall struct { +type LocationsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18988,23 +20587,40 @@ type LocationsBucketsViewsGetCall struct { header_ http.Header } -// Get: Gets a view on a log bucket. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns UNIMPLEMENTED. // -// - name: The resource name of the policy: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V -// IEW_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi -// ew". -func (r *LocationsBucketsViewsService) Get(name string) *LocationsBucketsViewsGetCall { - c := &LocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *LocationsOperationsService) List(name string) *LocationsOperationsListCall { + c := &LocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list filter. +func (c *LocationsOperationsListCall) Filter(filter string) *LocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *LocationsOperationsListCall) PageSize(pageSize int64) *LocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *LocationsOperationsListCall) PageToken(pageToken string) *LocationsOperationsListCall { + 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 // details. -func (c *LocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsGetCall { +func (c *LocationsOperationsListCall) Fields(s ...googleapi.Field) *LocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19012,27 +20628,27 @@ func (c *LocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *LocationsBu // IfNoneMatch sets an 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. -func (c *LocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsGetCall { +func (c *LocationsOperationsListCall) IfNoneMatch(entityTag string) *LocationsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsViewsGetCall) Context(ctx context.Context) *LocationsBucketsViewsGetCall { +func (c *LocationsOperationsListCall) Context(ctx context.Context) *LocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsViewsGetCall) Header() http.Header { +func (c *LocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *LocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19040,7 +20656,7 @@ func (c *LocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, er var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19053,12 +20669,13 @@ func (c *LocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.views.get" call. +// Do executes the "logging.locations.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LogView.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 *LocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) { +// *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 *LocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19077,7 +20694,7 @@ func (c *LocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogVie if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogView{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19090,79 +20707,101 @@ func (c *LocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogVie return ret, nil } -type LocationsBucketsViewsGetIamPolicyCall struct { - s *Service - resource string - getiampolicyrequest *GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *LocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 LogsDeleteCall struct { + s *Service + logName string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// Delete: Deletes all the log entries in a log for the _Default Log Bucket. +// The log reappears if it receives new entries. Log entries written shortly +// before the delete operation might not be deleted. Entries received after the +// delete operation with a timestamp before the operation will be deleted. // -// - 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 *LocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *LocationsBucketsViewsGetIamPolicyCall { - c := &LocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.getiampolicyrequest = getiampolicyrequest +// - logName: The resource name of the log to delete: +// projects/[PROJECT_ID]/logs/[LOG_ID] +// organizations/[ORGANIZATION_ID]/logs/[LOG_ID] +// billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] +// folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For +// example, "projects/my-project-id/logs/syslog", +// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more +// information about log names, see LogEntry. +func (r *LogsService) Delete(logName string) *LogsDeleteCall { + c := &LogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.logName = logName return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsGetIamPolicyCall { +func (c *LogsDeleteCall) Fields(s ...googleapi.Field) *LogsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *LocationsBucketsViewsGetIamPolicyCall { +func (c *LogsDeleteCall) Context(ctx context.Context) *LogsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsViewsGetIamPolicyCall) Header() http.Header { +func (c *LogsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *LogsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "logName": c.logName, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.views.getIamPolicy" call. +// Do executes the "logging.logs.delete" call. // 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 +// *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 *LocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *LogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19181,7 +20820,7 @@ func (c *LocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19194,7 +20833,7 @@ func (c *LocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) return ret, nil } -type LocationsBucketsViewsListCall struct { +type LogsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -19203,21 +20842,23 @@ type LocationsBucketsViewsListCall struct { header_ http.Header } -// List: Lists views on a log bucket. +// List: Lists the logs in projects, organizations, folders, or billing +// accounts. Only logs that have entries are listed. // -// - parent: The bucket whose views are to be listed: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". -func (r *LocationsBucketsViewsService) List(parent string) *LocationsBucketsViewsListCall { - c := &LocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name to list logs for: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]. +func (r *LogsService) List(parent string) *LogsListCall { + c := &LogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request.Non-positive values are ignored. The +// results to return from this request. Non-positive values are ignored. The // presence of nextPageToken in the response indicates that more results might // be available. -func (c *LocationsBucketsViewsListCall) PageSize(pageSize int64) *LocationsBucketsViewsListCall { +func (c *LogsListCall) PageSize(pageSize int64) *LogsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -19226,15 +20867,33 @@ func (c *LocationsBucketsViewsListCall) PageSize(pageSize int64) *LocationsBucke // the next batch of results from the preceding call to this method. pageToken // must be the value of nextPageToken from the previous response. The values of // other method parameters should be identical to those in the previous call. -func (c *LocationsBucketsViewsListCall) PageToken(pageToken string) *LocationsBucketsViewsListCall { +func (c *LogsListCall) PageToken(pageToken string) *LogsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ResourceNames sets the optional parameter "resourceNames": List of resource +// names to list logs for: +// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW +// _ID] +// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v +// iews/[VIEW_ID] +// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ +// ID]/views/[VIEW_ID] +// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I +// D]To support legacy queries, it could also be: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]The resource name in the parent field is added to this +// list. +func (c *LogsListCall) ResourceNames(resourceNames ...string) *LogsListCall { + c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsListCall { +func (c *LogsListCall) Fields(s ...googleapi.Field) *LogsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19242,27 +20901,27 @@ func (c *LocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *LocationsB // IfNoneMatch sets an 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. -func (c *LocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *LocationsBucketsViewsListCall { +func (c *LogsListCall) IfNoneMatch(entityTag string) *LogsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsViewsListCall) Context(ctx context.Context) *LocationsBucketsViewsListCall { +func (c *LogsListCall) Context(ctx context.Context) *LogsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsViewsListCall) Header() http.Header { +func (c *LogsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) { +func (c *LogsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19270,7 +20929,7 @@ func (c *LocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19283,13 +20942,13 @@ func (c *LocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.views.list" call. +// Do executes the "logging.logs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListViewsResponse.ServerResponse.Header or (if a response was returned at +// *ListLogsResponse.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 *LocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) { +func (c *LogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19308,7 +20967,7 @@ func (c *LocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListV if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListViewsResponse{ + ret := &ListLogsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19324,7 +20983,7 @@ func (c *LocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListV // 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 *LocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error { +func (c *LogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -19342,95 +21001,94 @@ func (c *LocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListV } } -type LocationsBucketsViewsPatchCall struct { - s *Service - name string - logview *LogView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MonitoredResourceDescriptorsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a view on a log bucket. This method replaces the value of the -// filter field from the existing view with the corresponding value from the -// new view. If an UNAVAILABLE error is returned, this indicates that system is -// not in a state where it can update the view. If this occurs, please try -// again in a few minutes. -// -// - name: The full resource name of the view to update -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V -// IEW_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi -// ew". -func (r *LocationsBucketsViewsService) Patch(name string, logview *LogView) *LocationsBucketsViewsPatchCall { - c := &LocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.logview = logview +// List: Lists the descriptors for monitored resource types used by Logging. +func (r *MonitoredResourceDescriptorsService) List() *MonitoredResourceDescriptorsListCall { + c := &MonitoredResourceDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c } -// UpdateMask sets the optional parameter "updateMask": Field mask that -// specifies the fields in view that need an update. A field will be -// overwritten if, and only if, it is in the update mask. name and output only -// fields cannot be updated.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=filter -func (c *LocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *LocationsBucketsViewsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *MonitoredResourceDescriptorsListCall) PageSize(pageSize int64) *MonitoredResourceDescriptorsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *MonitoredResourceDescriptorsListCall) PageToken(pageToken string) *MonitoredResourceDescriptorsListCall { + 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 // details. -func (c *LocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsPatchCall { +func (c *MonitoredResourceDescriptorsListCall) Fields(s ...googleapi.Field) *MonitoredResourceDescriptorsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *MonitoredResourceDescriptorsListCall) IfNoneMatch(entityTag string) *MonitoredResourceDescriptorsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsViewsPatchCall) Context(ctx context.Context) *LocationsBucketsViewsPatchCall { +func (c *MonitoredResourceDescriptorsListCall) Context(ctx context.Context) *MonitoredResourceDescriptorsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsViewsPatchCall) Header() http.Header { +func (c *MonitoredResourceDescriptorsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) - if err != nil { - return nil, err +func (c *MonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/monitoredResourceDescriptors") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "name": c.name, - }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.views.patch" call. +// Do executes the "logging.monitoredResourceDescriptors.list" call. // Any non-2xx status code is an error. Response headers are in either -// *LogView.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 *LocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) { +// *ListMonitoredResourceDescriptorsResponse.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 *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19449,7 +21107,7 @@ func (c *LocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogV if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogView{ + ret := &ListMonitoredResourceDescriptorsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19462,80 +21120,117 @@ func (c *LocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogV return ret, nil } -type LocationsBucketsViewsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 *MonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func(*ListMonitoredResourceDescriptorsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and -// PERMISSION_DENIED errors. +type OrganizationsGetCmekSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCmekSettings: Gets the Logging CMEK settings for the given resource.Note: +// CMEK for the Log Router can be configured for Google Cloud projects, +// folders, organizations, and billing accounts. Once configured for an +// organization, it applies to all projects and folders in the Google Cloud +// organization.See Enabling CMEK for Log Router +// (https://cloud.google.com/logging/docs/routing/managed-encryption) for more +// information. // -// - 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 *LocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *LocationsBucketsViewsSetIamPolicyCall { - c := &LocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The resource for which to retrieve CMEK settings. +// "projects/[PROJECT_ID]/cmekSettings" +// "organizations/[ORGANIZATION_ID]/cmekSettings" +// "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" +// "folders/[FOLDER_ID]/cmekSettings" For +// example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router +// can be configured for Google Cloud projects, folders, organizations, and +// billing accounts. Once configured for an organization, it applies to all +// projects and folders in the Google Cloud organization. +func (r *OrganizationsService) GetCmekSettings(name string) *OrganizationsGetCmekSettingsCall { + c := &OrganizationsGetCmekSettingsCall{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 // details. -func (c *LocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsSetIamPolicyCall { +func (c *OrganizationsGetCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetCmekSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsGetCmekSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetCmekSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *LocationsBucketsViewsSetIamPolicyCall { +func (c *OrganizationsGetCmekSettingsCall) Context(ctx context.Context) *OrganizationsGetCmekSettingsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsViewsSetIamPolicyCall) Header() http.Header { +func (c *OrganizationsGetCmekSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err +func (c *OrganizationsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.views.setIamPolicy" call. +// Do executes the "logging.organizations.getCmekSettings" call. // 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 +// *CmekSettings.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 *LocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *OrganizationsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19554,7 +21249,7 @@ func (c *LocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &CmekSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19567,84 +21262,92 @@ func (c *LocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) return ret, nil } -type LocationsBucketsViewsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsGetSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// GetSettings: Gets the settings for the given resource.Note: Settings can be +// retrieved for Google Cloud projects, folders, organizations, and billing +// accounts.See View default resource settings for Logging +// (https://cloud.google.com/logging/docs/default-settings#view-org-settings) +// for more information. // -// - 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 *LocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *LocationsBucketsViewsTestIamPermissionsCall { - c := &LocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The resource for which to retrieve settings. +// "projects/[PROJECT_ID]/settings" +// "organizations/[ORGANIZATION_ID]/settings" +// "billingAccounts/[BILLING_ACCOUNT_ID]/settings" +// "folders/[FOLDER_ID]/settings" For +// example:"organizations/12345/settings"Note: Settings can be retrieved for +// Google Cloud projects, folders, organizations, and billing accounts. +func (r *OrganizationsService) GetSettings(name string) *OrganizationsGetSettingsCall { + c := &OrganizationsGetSettingsCall{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 // details. -func (c *LocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *LocationsBucketsViewsTestIamPermissionsCall { +func (c *OrganizationsGetSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsGetSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *LocationsBucketsViewsTestIamPermissionsCall { +func (c *OrganizationsGetSettingsCall) Context(ctx context.Context) *OrganizationsGetSettingsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsBucketsViewsTestIamPermissionsCall) Header() http.Header { +func (c *OrganizationsGetSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err +func (c *OrganizationsGetSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.buckets.views.testIamPermissions" call. +// Do executes the "logging.organizations.getSettings" call. // 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 *LocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// *Settings.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 *OrganizationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19663,7 +21366,7 @@ func (c *LocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &Settings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19676,68 +21379,87 @@ func (c *LocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallO return ret, nil } -type LocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsUpdateCmekSettingsCall struct { + s *Service + name string + cmeksettings *CmekSettings + 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. +// UpdateCmekSettings: Updates the Log Router CMEK settings for the given +// resource.Note: CMEK for the Log Router can currently only be configured for +// Google Cloud organizations. Once configured, it applies to all projects and +// folders in the Google Cloud organization.UpdateCmekSettings fails when any +// of the following are true: The value of kms_key_name is invalid. The +// associated service account doesn't have the required +// roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access +// to the key is disabled.See Enabling CMEK for Log Router +// (https://cloud.google.com/logging/docs/routing/managed-encryption) for more +// information. // -// - name: The name of the operation resource to be cancelled. -func (r *LocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *LocationsOperationsCancelCall { - c := &LocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name for the CMEK settings to update. +// "projects/[PROJECT_ID]/cmekSettings" +// "organizations/[ORGANIZATION_ID]/cmekSettings" +// "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" +// "folders/[FOLDER_ID]/cmekSettings" For +// example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router +// can currently only be configured for Google Cloud organizations. Once +// configured, it applies to all projects and folders in the Google Cloud +// organization. +func (r *OrganizationsService) UpdateCmekSettings(name string, cmeksettings *CmekSettings) *OrganizationsUpdateCmekSettingsCall { + c := &OrganizationsUpdateCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.canceloperationrequest = canceloperationrequest + c.cmeksettings = cmeksettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask identifying +// which fields from cmek_settings should be updated. A field will be +// overwritten if and only if it is in the update mask. Output only fields +// cannot be updated.See FieldMask for more information.For example: +// "updateMask=kmsKeyName" +func (c *OrganizationsUpdateCmekSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateCmekSettingsCall { + 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 // details. -func (c *LocationsOperationsCancelCall) Fields(s ...googleapi.Field) *LocationsOperationsCancelCall { +func (c *OrganizationsUpdateCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateCmekSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LocationsOperationsCancelCall) Context(ctx context.Context) *LocationsOperationsCancelCall { +func (c *OrganizationsUpdateCmekSettingsCall) Context(ctx context.Context) *OrganizationsUpdateCmekSettingsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsOperationsCancelCall) Header() http.Header { +func (c *OrganizationsUpdateCmekSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsUpdateCmekSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cmeksettings) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -19748,12 +21470,12 @@ func (c *LocationsOperationsCancelCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.operations.cancel" call. +// Do executes the "logging.organizations.updateCmekSettings" call. // 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 +// *CmekSettings.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 *LocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *OrganizationsUpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19772,7 +21494,7 @@ func (c *LocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &CmekSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19785,68 +21507,82 @@ func (c *LocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty return ret, nil } -type LocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsUpdateSettingsCall struct { + s *Service + name string + settings *Settings + urlParams_ gensupport.URLParams + 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. +// UpdateSettings: Updates the settings for the given resource. This method +// applies to all feature configurations for organization and +// folders.UpdateSettings fails when any of the following are true: The value +// of storage_location either isn't supported by Logging or violates the +// location OrgPolicy. The default_sink_config field is set, but it has an +// unspecified filter write mode. The value of kms_key_name is invalid. The +// associated service account doesn't have the required +// roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access +// to the key is disabled.See Configure default settings for organizations and +// folders (https://cloud.google.com/logging/docs/default-settings) for more +// information. // -// - name: The name of the operation resource. -func (r *LocationsOperationsService) Get(name string) *LocationsOperationsGetCall { - c := &LocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name for the settings to update. +// "organizations/[ORGANIZATION_ID]/settings" "folders/[FOLDER_ID]/settings" +// For example:"organizations/12345/settings". +func (r *OrganizationsService) UpdateSettings(name string, settings *Settings) *OrganizationsUpdateSettingsCall { + c := &OrganizationsUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.settings = settings + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask identifying +// which fields from settings should be updated. A field will be overwritten if +// and only if it is in the update mask. Output only fields cannot be +// updated.See FieldMask for more information.For example: +// "updateMask=kmsKeyName" +func (c *OrganizationsUpdateSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateSettingsCall { + 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 // details. -func (c *LocationsOperationsGetCall) Fields(s ...googleapi.Field) *LocationsOperationsGetCall { +func (c *OrganizationsUpdateSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *LocationsOperationsGetCall) IfNoneMatch(entityTag string) *LocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LocationsOperationsGetCall) Context(ctx context.Context) *LocationsOperationsGetCall { +func (c *OrganizationsUpdateSettingsCall) Context(ctx context.Context) *OrganizationsUpdateSettingsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsOperationsGetCall) Header() http.Header { +func (c *OrganizationsUpdateSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsUpdateSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.settings) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -19857,12 +21593,12 @@ func (c *LocationsOperationsGetCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.operations.get" call. +// Do executes the "logging.organizations.updateSettings" call. // 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 +// *Settings.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 *LocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *OrganizationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19881,7 +21617,7 @@ func (c *LocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operatio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Settings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19894,104 +21630,81 @@ func (c *LocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type LocationsOperationsListCall struct { +type OrganizationsExclusionsCreateCall struct { s *Service - name string + parent string + logexclusion *LogExclusion 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. +// Create: Creates a new exclusion in the _Default sink in a specified parent +// resource. Only log entries belonging to that resource can be excluded. You +// can have up to 10 exclusions in a resource. // -// - name: The name of the operation's parent resource. -func (r *LocationsOperationsService) List(name string) *LocationsOperationsListCall { - c := &LocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *LocationsOperationsListCall) Filter(filter string) *LocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *LocationsOperationsListCall) PageSize(pageSize int64) *LocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *LocationsOperationsListCall) PageToken(pageToken string) *LocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: The parent resource in which to create the exclusion: +// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For +// examples:"projects/my-logging-project" "organizations/123456789". +func (r *OrganizationsExclusionsService) Create(parent string, logexclusion *LogExclusion) *OrganizationsExclusionsCreateCall { + c := &OrganizationsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logexclusion = logexclusion return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LocationsOperationsListCall) Fields(s ...googleapi.Field) *LocationsOperationsListCall { +func (c *OrganizationsExclusionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *LocationsOperationsListCall) IfNoneMatch(entityTag string) *LocationsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LocationsOperationsListCall) Context(ctx context.Context) *LocationsOperationsListCall { +func (c *OrganizationsExclusionsCreateCall) Context(ctx context.Context) *OrganizationsExclusionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LocationsOperationsListCall) Header() http.Header { +func (c *OrganizationsExclusionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.locations.operations.list" call. +// Do executes the "logging.organizations.exclusions.create" call. // 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 *LocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +// *LogExclusion.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 *OrganizationsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20010,7 +21723,7 @@ func (c *LocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOpe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &LogExclusion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20023,83 +21736,57 @@ func (c *LocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOpe return ret, nil } -// 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 *LocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 LogsDeleteCall struct { +type OrganizationsExclusionsDeleteCall struct { s *Service - logName string + name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes all the log entries in a log for the _Default Log Bucket. -// The log reappears if it receives new entries. Log entries written shortly -// before the delete operation might not be deleted. Entries received after the -// delete operation with a timestamp before the operation will be deleted. +// Delete: Deletes an exclusion in the _Default sink. // -// - logName: The resource name of the log to delete: -// projects/[PROJECT_ID]/logs/[LOG_ID] -// organizations/[ORGANIZATION_ID]/logs/[LOG_ID] -// billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] -// folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For -// example, "projects/my-project-id/logs/syslog", -// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more -// information about log names, see LogEntry. -func (r *LogsService) Delete(logName string) *LogsDeleteCall { - c := &LogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.logName = logName +// - name: The resource name of an existing exclusion to delete: +// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" +// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" +// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For +// example:"projects/my-project/exclusions/my-exclusion". +func (r *OrganizationsExclusionsService) Delete(name string) *OrganizationsExclusionsDeleteCall { + c := &OrganizationsExclusionsDeleteCall{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 // details. -func (c *LogsDeleteCall) Fields(s ...googleapi.Field) *LogsDeleteCall { +func (c *OrganizationsExclusionsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LogsDeleteCall) Context(ctx context.Context) *LogsDeleteCall { +func (c *OrganizationsExclusionsDeleteCall) Context(ctx context.Context) *OrganizationsExclusionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LogsDeleteCall) Header() http.Header { +func (c *OrganizationsExclusionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LogsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -20107,17 +21794,17 @@ func (c *LogsDeleteCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "logName": c.logName, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.logs.delete" call. +// Do executes the "logging.organizations.exclusions.delete" call. // 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 *LogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *OrganizationsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20134,82 +21821,48 @@ func (c *LogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { } 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 -} - -type LogsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists the logs in projects, organizations, folders, or billing -// accounts. Only logs that have entries are listed. -// -// - parent: The resource name to list logs for: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]. -func (r *LogsService) List(parent string) *LogsListCall { - c := &LogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *LogsListCall) PageSize(pageSize int64) *LogsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c + 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 } -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *LogsListCall) PageToken(pageToken string) *LogsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type OrganizationsExclusionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ResourceNames sets the optional parameter "resourceNames": List of resource -// names to list logs for: -// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW -// _ID] -// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v -// iews/[VIEW_ID] -// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ -// ID]/views/[VIEW_ID] -// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I -// D]To support legacy queries, it could also be: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]The resource name in the parent field is added to this -// list. -func (c *LogsListCall) ResourceNames(resourceNames ...string) *LogsListCall { - c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...)) +// Get: Gets the description of an exclusion in the _Default sink. +// +// - name: The resource name of an existing exclusion: +// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" +// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" +// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For +// example:"projects/my-project/exclusions/my-exclusion". +func (r *OrganizationsExclusionsService) Get(name string) *OrganizationsExclusionsGetCall { + c := &OrganizationsExclusionsGetCall{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 // details. -func (c *LogsListCall) Fields(s ...googleapi.Field) *LogsListCall { +func (c *OrganizationsExclusionsGetCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20217,27 +21870,27 @@ func (c *LogsListCall) Fields(s ...googleapi.Field) *LogsListCall { // IfNoneMatch sets an 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. -func (c *LogsListCall) IfNoneMatch(entityTag string) *LogsListCall { +func (c *OrganizationsExclusionsGetCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LogsListCall) Context(ctx context.Context) *LogsListCall { +func (c *OrganizationsExclusionsGetCall) Context(ctx context.Context) *OrganizationsExclusionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LogsListCall) Header() http.Header { +func (c *OrganizationsExclusionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LogsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsExclusionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20245,7 +21898,7 @@ func (c *LogsListCall) 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, "v2/{+parent}/logs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20253,18 +21906,17 @@ func (c *LogsListCall) doRequest(alt string) (*http.Response, error) { } 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 "logging.logs.list" call. +// Do executes the "logging.organizations.exclusions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *ListLogsResponse.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 *LogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) { +// *LogExclusion.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 *OrganizationsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20283,7 +21935,7 @@ func (c *LogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLogsResponse{ + ret := &LogExclusion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20296,38 +21948,23 @@ func (c *LogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, erro return ret, nil } -// 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 *LogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 MonitoredResourceDescriptorsListCall struct { +type OrganizationsExclusionsListCall struct { s *Service + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the descriptors for monitored resource types used by Logging. -func (r *MonitoredResourceDescriptorsService) List() *MonitoredResourceDescriptorsListCall { - c := &MonitoredResourceDescriptorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// List: Lists all the exclusions on the _Default sink in a parent resource. +// +// - parent: The parent resource whose exclusions are to be listed. +// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". +func (r *OrganizationsExclusionsService) List(parent string) *OrganizationsExclusionsListCall { + c := &OrganizationsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } @@ -20335,7 +21972,7 @@ func (r *MonitoredResourceDescriptorsService) List() *MonitoredResourceDescripto // results to return from this request. Non-positive values are ignored. The // presence of nextPageToken in the response indicates that more results might // be available. -func (c *MonitoredResourceDescriptorsListCall) PageSize(pageSize int64) *MonitoredResourceDescriptorsListCall { +func (c *OrganizationsExclusionsListCall) PageSize(pageSize int64) *OrganizationsExclusionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -20344,7 +21981,7 @@ func (c *MonitoredResourceDescriptorsListCall) PageSize(pageSize int64) *Monitor // the next batch of results from the preceding call to this method. pageToken // must be the value of nextPageToken from the previous response. The values of // other method parameters should be identical to those in the previous call. -func (c *MonitoredResourceDescriptorsListCall) PageToken(pageToken string) *MonitoredResourceDescriptorsListCall { +func (c *OrganizationsExclusionsListCall) PageToken(pageToken string) *OrganizationsExclusionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20352,7 +21989,7 @@ func (c *MonitoredResourceDescriptorsListCall) PageToken(pageToken string) *Moni // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MonitoredResourceDescriptorsListCall) Fields(s ...googleapi.Field) *MonitoredResourceDescriptorsListCall { +func (c *OrganizationsExclusionsListCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20360,27 +21997,27 @@ func (c *MonitoredResourceDescriptorsListCall) Fields(s ...googleapi.Field) *Mon // IfNoneMatch sets an 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. -func (c *MonitoredResourceDescriptorsListCall) IfNoneMatch(entityTag string) *MonitoredResourceDescriptorsListCall { +func (c *OrganizationsExclusionsListCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *MonitoredResourceDescriptorsListCall) Context(ctx context.Context) *MonitoredResourceDescriptorsListCall { +func (c *OrganizationsExclusionsListCall) Context(ctx context.Context) *OrganizationsExclusionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MonitoredResourceDescriptorsListCall) Header() http.Header { +func (c *OrganizationsExclusionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsExclusionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20388,23 +22025,26 @@ func (c *MonitoredResourceDescriptorsListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/monitoredResourceDescriptors") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") 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 "logging.monitoredResourceDescriptors.list" call. +// Do executes the "logging.organizations.exclusions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListMonitoredResourceDescriptorsResponse.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 *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) (*ListMonitoredResourceDescriptorsResponse, error) { +// *ListExclusionsResponse.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 *OrganizationsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20423,7 +22063,7 @@ func (c *MonitoredResourceDescriptorsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListMonitoredResourceDescriptorsResponse{ + ret := &ListExclusionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20439,7 +22079,7 @@ func (c *MonitoredResourceDescriptorsListCall) 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 *MonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func(*ListMonitoredResourceDescriptorsResponse) error) error { +func (c *OrganizationsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20457,80 +22097,77 @@ func (c *MonitoredResourceDescriptorsListCall) Pages(ctx context.Context, f func } } -type OrganizationsGetCmekSettingsCall struct { +type OrganizationsExclusionsPatchCall struct { s *Service name string + logexclusion *LogExclusion urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetCmekSettings: Gets the Logging CMEK settings for the given resource.Note: -// CMEK for the Log Router can be configured for Google Cloud projects, -// folders, organizations, and billing accounts. Once configured for an -// organization, it applies to all projects and folders in the Google Cloud -// organization.See Enabling CMEK for Log Router -// (https://cloud.google.com/logging/docs/routing/managed-encryption) for more -// information. +// Patch: Changes one or more properties of an existing exclusion in the +// _Default sink. // -// - name: The resource for which to retrieve CMEK settings. -// "projects/[PROJECT_ID]/cmekSettings" -// "organizations/[ORGANIZATION_ID]/cmekSettings" -// "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" -// "folders/[FOLDER_ID]/cmekSettings" For -// example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router -// can be configured for Google Cloud projects, folders, organizations, and -// billing accounts. Once configured for an organization, it applies to all -// projects and folders in the Google Cloud organization. -func (r *OrganizationsService) GetCmekSettings(name string) *OrganizationsGetCmekSettingsCall { - c := &OrganizationsGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the exclusion to update: +// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" +// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" +// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For +// example:"projects/my-project/exclusions/my-exclusion". +func (r *OrganizationsExclusionsService) Patch(name string, logexclusion *LogExclusion) *OrganizationsExclusionsPatchCall { + c := &OrganizationsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.logexclusion = logexclusion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A non-empty +// list of fields to change in the existing exclusion. New values for the +// fields are taken from the corresponding fields in the LogExclusion included +// in this request. Fields not mentioned in update_mask are not changed and are +// ignored in the request.For example, to change the filter and description of +// an exclusion, specify an update_mask of "filter,description". +func (c *OrganizationsExclusionsPatchCall) UpdateMask(updateMask string) *OrganizationsExclusionsPatchCall { + 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 // details. -func (c *OrganizationsGetCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetCmekSettingsCall { +func (c *OrganizationsExclusionsPatchCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsGetCmekSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetCmekSettingsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsGetCmekSettingsCall) Context(ctx context.Context) *OrganizationsGetCmekSettingsCall { +func (c *OrganizationsExclusionsPatchCall) Context(ctx context.Context) *OrganizationsExclusionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsGetCmekSettingsCall) Header() http.Header { +func (c *OrganizationsExclusionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -20541,12 +22178,12 @@ func (c *OrganizationsGetCmekSettingsCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.getCmekSettings" call. +// Do executes the "logging.organizations.exclusions.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *CmekSettings.ServerResponse.Header or (if a response was returned at all) +// *LogExclusion.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 *OrganizationsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) { +func (c *OrganizationsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20565,7 +22202,7 @@ func (c *OrganizationsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*Cm if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CmekSettings{ + ret := &LogExclusion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20578,7 +22215,7 @@ func (c *OrganizationsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*Cm return ret, nil } -type OrganizationsGetSettingsCall struct { +type OrganizationsLocationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20587,21 +22224,11 @@ type OrganizationsGetSettingsCall struct { header_ http.Header } -// GetSettings: Gets the settings for the given resource.Note: Settings can be -// retrieved for Google Cloud projects, folders, organizations, and billing -// accounts.See View default resource settings for Logging -// (https://cloud.google.com/logging/docs/default-settings#view-org-settings) -// for more information. +// Get: Gets information about a location. // -// - name: The resource for which to retrieve settings. -// "projects/[PROJECT_ID]/settings" -// "organizations/[ORGANIZATION_ID]/settings" -// "billingAccounts/[BILLING_ACCOUNT_ID]/settings" -// "folders/[FOLDER_ID]/settings" For -// example:"organizations/12345/settings"Note: Settings can be retrieved for -// Google Cloud projects, folders, organizations, and billing accounts. -func (r *OrganizationsService) GetSettings(name string) *OrganizationsGetSettingsCall { - c := &OrganizationsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name for the location. +func (r *OrganizationsLocationsService) Get(name string) *OrganizationsLocationsGetCall { + c := &OrganizationsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -20609,7 +22236,7 @@ func (r *OrganizationsService) GetSettings(name string) *OrganizationsGetSetting // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsGetSettingsCall) Fields(s ...googleapi.Field) *OrganizationsGetSettingsCall { +func (c *OrganizationsLocationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20617,27 +22244,27 @@ func (c *OrganizationsGetSettingsCall) Fields(s ...googleapi.Field) *Organizatio // IfNoneMatch sets an 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. -func (c *OrganizationsGetSettingsCall) IfNoneMatch(entityTag string) *OrganizationsGetSettingsCall { +func (c *OrganizationsLocationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsGetSettingsCall) Context(ctx context.Context) *OrganizationsGetSettingsCall { +func (c *OrganizationsLocationsGetCall) Context(ctx context.Context) *OrganizationsLocationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsGetSettingsCall) Header() http.Header { +func (c *OrganizationsLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsGetSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20645,7 +22272,7 @@ func (c *OrganizationsGetSettingsCall) doRequest(alt string) (*http.Response, er var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20658,12 +22285,12 @@ func (c *OrganizationsGetSettingsCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.getSettings" call. +// Do executes the "logging.organizations.locations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Settings.ServerResponse.Header or (if a response was returned at all) in +// *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 *OrganizationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) { +func (c *OrganizationsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20682,7 +22309,7 @@ func (c *OrganizationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Settings{ + ret := &Location{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20695,87 +22322,90 @@ func (c *OrganizationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settin return ret, nil } -type OrganizationsUpdateCmekSettingsCall struct { +type OrganizationsLocationsListCall struct { s *Service name string - cmeksettings *CmekSettings urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// UpdateCmekSettings: Updates the Log Router CMEK settings for the given -// resource.Note: CMEK for the Log Router can currently only be configured for -// Google Cloud organizations. Once configured, it applies to all projects and -// folders in the Google Cloud organization.UpdateCmekSettings fails when any -// of the following are true: The value of kms_key_name is invalid. The -// associated service account doesn't have the required -// roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access -// to the key is disabled.See Enabling CMEK for Log Router -// (https://cloud.google.com/logging/docs/routing/managed-encryption) for more -// information. +// List: Lists information about the supported locations for this service. // -// - name: The resource name for the CMEK settings to update. -// "projects/[PROJECT_ID]/cmekSettings" -// "organizations/[ORGANIZATION_ID]/cmekSettings" -// "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" -// "folders/[FOLDER_ID]/cmekSettings" For -// example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router -// can currently only be configured for Google Cloud organizations. Once -// configured, it applies to all projects and folders in the Google Cloud -// organization. -func (r *OrganizationsService) UpdateCmekSettings(name string, cmeksettings *CmekSettings) *OrganizationsUpdateCmekSettingsCall { - c := &OrganizationsUpdateCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource that owns the locations collection, if applicable. +func (r *OrganizationsLocationsService) List(name string) *OrganizationsLocationsListCall { + c := &OrganizationsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.cmeksettings = cmeksettings return c } -// UpdateMask sets the optional parameter "updateMask": Field mask identifying -// which fields from cmek_settings should be updated. A field will be -// overwritten if and only if it is in the update mask. Output only fields -// cannot be updated.See FieldMask for more information.For example: -// "updateMask=kmsKeyName" -func (c *OrganizationsUpdateCmekSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateCmekSettingsCall { - c.urlParams_.Set("updateMask", updateMask) +// 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 *OrganizationsLocationsListCall) Filter(filter string) *OrganizationsLocationsListCall { + 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 *OrganizationsLocationsListCall) PageSize(pageSize int64) *OrganizationsLocationsListCall { + 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 *OrganizationsLocationsListCall) PageToken(pageToken string) *OrganizationsLocationsListCall { + 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 // details. -func (c *OrganizationsUpdateCmekSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateCmekSettingsCall { +func (c *OrganizationsLocationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsLocationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsUpdateCmekSettingsCall) Context(ctx context.Context) *OrganizationsUpdateCmekSettingsCall { +func (c *OrganizationsLocationsListCall) Context(ctx context.Context) *OrganizationsLocationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsUpdateCmekSettingsCall) Header() http.Header { +func (c *OrganizationsLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsUpdateCmekSettingsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.cmeksettings) - if err != nil { - return nil, err +func (c *OrganizationsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}/cmekSettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -20786,12 +22416,13 @@ func (c *OrganizationsUpdateCmekSettingsCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.updateCmekSettings" call. +// Do executes the "logging.organizations.locations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *CmekSettings.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 *OrganizationsUpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) { +// *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 *OrganizationsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20810,7 +22441,7 @@ func (c *OrganizationsUpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CmekSettings{ + ret := &ListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20823,98 +22454,109 @@ func (c *OrganizationsUpdateCmekSettingsCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type OrganizationsUpdateSettingsCall struct { +// 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 *OrganizationsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 OrganizationsLocationsBucketsCreateCall struct { s *Service - name string - settings *Settings + parent string + logbucket *LogBucket urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// UpdateSettings: Updates the settings for the given resource. This method -// applies to all feature configurations for organization and -// folders.UpdateSettings fails when any of the following are true: The value -// of storage_location either isn't supported by Logging or violates the -// location OrgPolicy. The default_sink_config field is set, but it has an -// unspecified filter write mode. The value of kms_key_name is invalid. The -// associated service account doesn't have the required -// roles/cloudkms.cryptoKeyEncrypterDecrypter role assigned for the key. Access -// to the key is disabled.See Configure default settings for organizations and -// folders (https://cloud.google.com/logging/docs/default-settings) for more -// information. +// Create: Creates a log bucket that can be used to store log entries. After a +// bucket has been created, the bucket's location cannot be changed. // -// - name: The resource name for the settings to update. -// "organizations/[ORGANIZATION_ID]/settings" "folders/[FOLDER_ID]/settings" -// For example:"organizations/12345/settings". -func (r *OrganizationsService) UpdateSettings(name string, settings *Settings) *OrganizationsUpdateSettingsCall { - c := &OrganizationsUpdateSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.settings = settings +// - parent: The resource in which to create the log bucket: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For +// example:"projects/my-project/locations/global". +func (r *OrganizationsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *OrganizationsLocationsBucketsCreateCall { + c := &OrganizationsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logbucket = logbucket return c } -// UpdateMask sets the optional parameter "updateMask": Field mask identifying -// which fields from settings should be updated. A field will be overwritten if -// and only if it is in the update mask. Output only fields cannot be -// updated.See FieldMask for more information.For example: -// "updateMask=kmsKeyName" -func (c *OrganizationsUpdateSettingsCall) UpdateMask(updateMask string) *OrganizationsUpdateSettingsCall { - c.urlParams_.Set("updateMask", updateMask) +// BucketId sets the optional parameter "bucketId": Required. A client-assigned +// identifier such as "my-bucket". Identifiers are limited to 100 characters +// and can include only letters, digits, underscores, hyphens, and periods. +// Bucket identifiers must start with an alphanumeric character. +func (c *OrganizationsLocationsBucketsCreateCall) BucketId(bucketId string) *OrganizationsLocationsBucketsCreateCall { + c.urlParams_.Set("bucketId", bucketId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsUpdateSettingsCall) Fields(s ...googleapi.Field) *OrganizationsUpdateSettingsCall { +func (c *OrganizationsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsUpdateSettingsCall) Context(ctx context.Context) *OrganizationsUpdateSettingsCall { +func (c *OrganizationsLocationsBucketsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsUpdateSettingsCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsUpdateSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.settings) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.updateSettings" call. +// Do executes the "logging.organizations.locations.buckets.create" call. // Any non-2xx status code is an error. Response headers are in either -// *Settings.ServerResponse.Header or (if a response was returned at all) in +// *LogBucket.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 *OrganizationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) { +func (c *OrganizationsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20933,7 +22575,7 @@ func (c *OrganizationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Set if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Settings{ + ret := &LogBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20946,63 +22588,71 @@ func (c *OrganizationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*Set return ret, nil } -type OrganizationsExclusionsCreateCall struct { - s *Service - parent string - logexclusion *LogExclusion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsCreateAsyncCall struct { + s *Service + parent string + logbucket *LogBucket + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new exclusion in the _Default sink in a specified parent -// resource. Only log entries belonging to that resource can be excluded. You -// can have up to 10 exclusions in a resource. +// CreateAsync: Creates a log bucket asynchronously that can be used to store +// log entries.After a bucket has been created, the bucket's location cannot be +// changed. // -// - parent: The parent resource in which to create the exclusion: -// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For -// examples:"projects/my-logging-project" "organizations/123456789". -func (r *OrganizationsExclusionsService) Create(parent string, logexclusion *LogExclusion) *OrganizationsExclusionsCreateCall { - c := &OrganizationsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource in which to create the log bucket: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For +// example:"projects/my-project/locations/global". +func (r *OrganizationsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *OrganizationsLocationsBucketsCreateAsyncCall { + c := &OrganizationsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.logexclusion = logexclusion + c.logbucket = logbucket + return c +} + +// BucketId sets the optional parameter "bucketId": Required. A client-assigned +// identifier such as "my-bucket". Identifiers are limited to 100 characters +// and can include only letters, digits, underscores, hyphens, and periods. +// Bucket identifiers must start with an alphanumeric character. +func (c *OrganizationsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *OrganizationsLocationsBucketsCreateAsyncCall { + c.urlParams_.Set("bucketId", bucketId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsExclusionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsCreateCall { +func (c *OrganizationsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsCreateAsyncCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsExclusionsCreateCall) Context(ctx context.Context) *OrganizationsExclusionsCreateCall { +func (c *OrganizationsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *OrganizationsLocationsBucketsCreateAsyncCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsExclusionsCreateCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsCreateAsyncCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21015,12 +22665,12 @@ func (c *OrganizationsExclusionsCreateCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.exclusions.create" call. +// Do executes the "logging.organizations.locations.buckets.createAsync" call. // Any non-2xx status code is an error. Response headers are in either -// *LogExclusion.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *OrganizationsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { +func (c *OrganizationsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21039,7 +22689,7 @@ func (c *OrganizationsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*L if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogExclusion{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21052,7 +22702,7 @@ func (c *OrganizationsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*L return ret, nil } -type OrganizationsExclusionsDeleteCall struct { +type OrganizationsLocationsBucketsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21060,16 +22710,19 @@ type OrganizationsExclusionsDeleteCall struct { header_ http.Header } -// Delete: Deletes an exclusion in the _Default sink. +// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the +// DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log +// entries in the bucket will be permanently deleted. // -// - name: The resource name of an existing exclusion to delete: -// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" -// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" -// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For -// example:"projects/my-project/exclusions/my-exclusion". -func (r *OrganizationsExclusionsService) Delete(name string) *OrganizationsExclusionsDeleteCall { - c := &OrganizationsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the bucket to delete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *OrganizationsLocationsBucketsService) Delete(name string) *OrganizationsLocationsBucketsDeleteCall { + c := &OrganizationsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21077,27 +22730,27 @@ func (r *OrganizationsExclusionsService) Delete(name string) *OrganizationsExclu // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsExclusionsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsDeleteCall { +func (c *OrganizationsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsExclusionsDeleteCall) Context(ctx context.Context) *OrganizationsExclusionsDeleteCall { +func (c *OrganizationsLocationsBucketsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsExclusionsDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -21115,12 +22768,12 @@ func (c *OrganizationsExclusionsDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.exclusions.delete" call. +// Do executes the "logging.organizations.locations.buckets.delete" call. // 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 *OrganizationsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *OrganizationsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21152,7 +22805,7 @@ func (c *OrganizationsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*E return ret, nil } -type OrganizationsExclusionsGetCall struct { +type OrganizationsLocationsBucketsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21161,16 +22814,17 @@ type OrganizationsExclusionsGetCall struct { header_ http.Header } -// Get: Gets the description of an exclusion in the _Default sink. +// Get: Gets a log bucket. // -// - name: The resource name of an existing exclusion: -// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" -// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" -// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For -// example:"projects/my-project/exclusions/my-exclusion". -func (r *OrganizationsExclusionsService) Get(name string) *OrganizationsExclusionsGetCall { - c := &OrganizationsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the bucket: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *OrganizationsLocationsBucketsService) Get(name string) *OrganizationsLocationsBucketsGetCall { + c := &OrganizationsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21178,7 +22832,7 @@ func (r *OrganizationsExclusionsService) Get(name string) *OrganizationsExclusio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsExclusionsGetCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsGetCall { +func (c *OrganizationsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21186,27 +22840,27 @@ func (c *OrganizationsExclusionsGetCall) Fields(s ...googleapi.Field) *Organizat // IfNoneMatch sets an 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. -func (c *OrganizationsExclusionsGetCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsGetCall { +func (c *OrganizationsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsExclusionsGetCall) Context(ctx context.Context) *OrganizationsExclusionsGetCall { +func (c *OrganizationsLocationsBucketsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsExclusionsGetCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsExclusionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21227,12 +22881,12 @@ func (c *OrganizationsExclusionsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.exclusions.get" call. +// Do executes the "logging.organizations.locations.buckets.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LogExclusion.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *LogBucket.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 *OrganizationsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { +func (c *OrganizationsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21251,7 +22905,7 @@ func (c *OrganizationsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogE if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogExclusion{ + ret := &LogBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21264,7 +22918,7 @@ func (c *OrganizationsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogE return ret, nil } -type OrganizationsExclusionsListCall struct { +type OrganizationsLocationsBucketsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -21273,13 +22927,17 @@ type OrganizationsExclusionsListCall struct { header_ http.Header } -// List: Lists all the exclusions on the _Default sink in a parent resource. +// List: Lists log buckets. // -// - parent: The parent resource whose exclusions are to be listed. -// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". -func (r *OrganizationsExclusionsService) List(parent string) *OrganizationsExclusionsListCall { - c := &OrganizationsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource whose buckets are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion +// of the resource must be specified, but supplying the character - in place +// of LOCATION_ID will return all buckets. +func (r *OrganizationsLocationsBucketsService) List(parent string) *OrganizationsLocationsBucketsListCall { + c := &OrganizationsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -21288,79 +22946,220 @@ func (r *OrganizationsExclusionsService) List(parent string) *OrganizationsExclu // results to return from this request. Non-positive values are ignored. The // presence of nextPageToken in the response indicates that more results might // be available. -func (c *OrganizationsExclusionsListCall) PageSize(pageSize int64) *OrganizationsExclusionsListCall { +func (c *OrganizationsLocationsBucketsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *OrganizationsExclusionsListCall) PageToken(pageToken string) *OrganizationsExclusionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *OrganizationsLocationsBucketsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsListCall { + 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 +// details. +func (c *OrganizationsLocationsBucketsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *OrganizationsLocationsBucketsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsLocationsBucketsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsLocationsBucketsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+parent}/buckets") + 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 "logging.organizations.locations.buckets.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBucketsResponse.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 *OrganizationsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, 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 := &ListBucketsResponse{ + 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 +} + +// 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 *OrganizationsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 OrganizationsLocationsBucketsPatchCall struct { + s *Service + name string + logbucket *LogBucket + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a log bucket.If the bucket has a lifecycle_state of +// DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket +// has been created, the bucket's location cannot be changed. +// +// - name: The full resource name of the bucket to update. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *OrganizationsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *OrganizationsLocationsBucketsPatchCall { + c := &OrganizationsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.logbucket = logbucket + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask +// that specifies the fields in bucket that need an update. A bucket field will +// be overwritten if, and only if, it is in the update mask. name and output +// only fields cannot be updated.For a detailed FieldMask definition, see: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=retention_days +func (c *OrganizationsLocationsBucketsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsPatchCall { + 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 // details. -func (c *OrganizationsExclusionsListCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsListCall { +func (c *OrganizationsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsExclusionsListCall) IfNoneMatch(entityTag string) *OrganizationsExclusionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsExclusionsListCall) Context(ctx context.Context) *OrganizationsExclusionsListCall { +func (c *OrganizationsLocationsBucketsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsExclusionsListCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsExclusionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", 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 "logging.organizations.exclusions.list" call. +// Do executes the "logging.organizations.locations.buckets.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *ListExclusionsResponse.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 *OrganizationsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) { +// *LogBucket.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 *OrganizationsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21379,7 +23178,7 @@ func (c *OrganizationsExclusionsListCall) Do(opts ...googleapi.CallOption) (*Lis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListExclusionsResponse{ + ret := &LogBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21392,98 +23191,67 @@ func (c *OrganizationsExclusionsListCall) Do(opts ...googleapi.CallOption) (*Lis return ret, nil } -// 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 *OrganizationsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 OrganizationsExclusionsPatchCall struct { - s *Service - name string - logexclusion *LogExclusion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsUndeleteCall struct { + s *Service + name string + undeletebucketrequest *UndeleteBucketRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Changes one or more properties of an existing exclusion in the -// _Default sink. +// Undelete: Undeletes a log bucket. A bucket that has been deleted can be +// undeleted within the grace period of 7 days. // -// - name: The resource name of the exclusion to update: -// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" -// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" -// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For -// example:"projects/my-project/exclusions/my-exclusion". -func (r *OrganizationsExclusionsService) Patch(name string, logexclusion *LogExclusion) *OrganizationsExclusionsPatchCall { - c := &OrganizationsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the bucket to undelete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *OrganizationsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *OrganizationsLocationsBucketsUndeleteCall { + c := &OrganizationsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.logexclusion = logexclusion - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. A non-empty -// list of fields to change in the existing exclusion. New values for the -// fields are taken from the corresponding fields in the LogExclusion included -// in this request. Fields not mentioned in update_mask are not changed and are -// ignored in the request.For example, to change the filter and description of -// an exclusion, specify an update_mask of "filter,description". -func (c *OrganizationsExclusionsPatchCall) UpdateMask(updateMask string) *OrganizationsExclusionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.undeletebucketrequest = undeletebucketrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsExclusionsPatchCall) Fields(s ...googleapi.Field) *OrganizationsExclusionsPatchCall { +func (c *OrganizationsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsUndeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsExclusionsPatchCall) Context(ctx context.Context) *OrganizationsExclusionsPatchCall { +func (c *OrganizationsLocationsBucketsUndeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsUndeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsExclusionsPatchCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsUndeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -21494,12 +23262,12 @@ func (c *OrganizationsExclusionsPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.exclusions.patch" call. +// Do executes the "logging.organizations.locations.buckets.undelete" call. // Any non-2xx status code is an error. Response headers are in either -// *LogExclusion.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *OrganizationsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { +func (c *OrganizationsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21518,7 +23286,7 @@ func (c *OrganizationsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*Lo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogExclusion{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21531,66 +23299,80 @@ func (c *OrganizationsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*Lo return ret, nil } -type OrganizationsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsUpdateAsyncCall struct { + s *Service + name string + logbucket *LogBucket + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a location. +// UpdateAsync: Updates a log bucket asynchronously.If the bucket has a +// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be +// returned.After a bucket has been created, the bucket's location cannot be +// changed. // -// - name: Resource name for the location. -func (r *OrganizationsLocationsService) Get(name string) *OrganizationsLocationsGetCall { - c := &OrganizationsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the bucket to update. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *OrganizationsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *OrganizationsLocationsBucketsUpdateAsyncCall { + c := &OrganizationsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.logbucket = logbucket + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask +// that specifies the fields in bucket that need an update. A bucket field will +// be overwritten if, and only if, it is in the update mask. name and output +// only fields cannot be updated.For a detailed FieldMask definition, see: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=retention_days +func (c *OrganizationsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsUpdateAsyncCall { + 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 // details. -func (c *OrganizationsLocationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGetCall { +func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsUpdateAsyncCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsLocationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsGetCall) Context(ctx context.Context) *OrganizationsLocationsGetCall { +func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *OrganizationsLocationsBucketsUpdateAsyncCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -21601,12 +23383,12 @@ func (c *OrganizationsLocationsGetCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.get" call. +// Do executes the "logging.organizations.locations.buckets.updateAsync" call. // 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 +// *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 *OrganizationsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { +func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21625,120 +23407,104 @@ func (c *OrganizationsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Locat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + 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 -} - -type OrganizationsLocationsListCall 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 *OrganizationsLocationsService) List(name string) *OrganizationsLocationsListCall { - c := &OrganizationsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -// 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 *OrganizationsLocationsListCall) Filter(filter string) *OrganizationsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c +type OrganizationsLocationsBucketsLinksCreateCall struct { + s *Service + parent string + link *Link + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return. If not set, the service selects a default. -func (c *OrganizationsLocationsListCall) PageSize(pageSize int64) *OrganizationsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Create: Asynchronously creates a linked dataset in BigQuery which makes it +// possible to use BigQuery to read the logs stored in the log bucket. A log +// bucket may currently only contain one link. +// +// - parent: The full resource name of the bucket to create a link for. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". +func (r *OrganizationsLocationsBucketsLinksService) Create(parent string, link *Link) *OrganizationsLocationsBucketsLinksCreateCall { + c := &OrganizationsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.link = link 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 *OrganizationsLocationsListCall) PageToken(pageToken string) *OrganizationsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// LinkId sets the optional parameter "linkId": Required. The ID to use for the +// link. The link_id can have up to 100 characters. A valid link_id must only +// have alphanumeric characters and underscores within it. +func (c *OrganizationsLocationsBucketsLinksCreateCall) LinkId(linkId string) *OrganizationsLocationsBucketsLinksCreateCall { + c.urlParams_.Set("linkId", linkId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsListCall { +func (c *OrganizationsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsLocationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsListCall) Context(ctx context.Context) *OrganizationsLocationsListCall { +func (c *OrganizationsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsListCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsLinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.link) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.list" call. +// Do executes the "logging.organizations.locations.buckets.links.create" call. // 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 *OrganizationsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { +// *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 *OrganizationsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21757,7 +23523,7 @@ func (c *OrganizationsLocationsListCall) Do(opts ...googleapi.CallOption) (*List if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21770,109 +23536,79 @@ func (c *OrganizationsLocationsListCall) Do(opts ...googleapi.CallOption) (*List return ret, nil } -// 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 *OrganizationsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 OrganizationsLocationsBucketsCreateCall struct { +type OrganizationsLocationsBucketsLinksDeleteCall struct { s *Service - parent string - logbucket *LogBucket + name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a log bucket that can be used to store log entries. After a -// bucket has been created, the bucket's location cannot be changed. +// Delete: Deletes a link. This will also delete the corresponding BigQuery +// linked dataset. // -// - parent: The resource in which to create the log bucket: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For -// example:"projects/my-project/locations/global". -func (r *OrganizationsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *OrganizationsLocationsBucketsCreateCall { - c := &OrganizationsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.logbucket = logbucket - return c -} - -// BucketId sets the optional parameter "bucketId": Required. A client-assigned -// identifier such as "my-bucket". Identifiers are limited to 100 characters -// and can include only letters, digits, underscores, hyphens, and periods. -// Bucket identifiers must start with an alphanumeric character. -func (c *OrganizationsLocationsBucketsCreateCall) BucketId(bucketId string) *OrganizationsLocationsBucketsCreateCall { - c.urlParams_.Set("bucketId", bucketId) +// - name: The full resource name of the link to delete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L +// INK_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]/links/[LINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]/links/[LINK_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN +// K_ID]". +func (r *OrganizationsLocationsBucketsLinksService) Delete(name string) *OrganizationsLocationsBucketsLinksDeleteCall { + c := &OrganizationsLocationsBucketsLinksDeleteCall{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 // details. -func (c *OrganizationsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsCreateCall { +func (c *OrganizationsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsCreateCall { +func (c *OrganizationsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsCreateCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsLinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *OrganizationsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.create" call. +// Do executes the "logging.organizations.locations.buckets.links.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *LogBucket.ServerResponse.Header or (if a response was returned at all) in +// *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 *OrganizationsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { +func (c *OrganizationsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21891,7 +23627,7 @@ func (c *OrganizationsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogBucket{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21904,89 +23640,90 @@ func (c *OrganizationsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOptio return ret, nil } -type OrganizationsLocationsBucketsCreateAsyncCall struct { - s *Service - parent string - logbucket *LogBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsLinksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// CreateAsync: Creates a log bucket asynchronously that can be used to store -// log entries.After a bucket has been created, the bucket's location cannot be -// changed. +// Get: Gets a link. // -// - parent: The resource in which to create the log bucket: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For -// example:"projects/my-project/locations/global". -func (r *OrganizationsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *OrganizationsLocationsBucketsCreateAsyncCall { - c := &OrganizationsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.logbucket = logbucket - return c -} - -// BucketId sets the optional parameter "bucketId": Required. A client-assigned -// identifier such as "my-bucket". Identifiers are limited to 100 characters -// and can include only letters, digits, underscores, hyphens, and periods. -// Bucket identifiers must start with an alphanumeric character. -func (c *OrganizationsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *OrganizationsLocationsBucketsCreateAsyncCall { - c.urlParams_.Set("bucketId", bucketId) +// - name: The resource name of the link: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L +// INK_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]/links/[LINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]/links/[LINK_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN +// K_ID]". +func (r *OrganizationsLocationsBucketsLinksService) Get(name string) *OrganizationsLocationsBucketsLinksGetCall { + c := &OrganizationsLocationsBucketsLinksGetCall{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 // details. -func (c *OrganizationsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsCreateAsyncCall { +func (c *OrganizationsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsLinksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *OrganizationsLocationsBucketsCreateAsyncCall { +func (c *OrganizationsLocationsBucketsLinksGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsCreateAsyncCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsLinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) - if err != nil { - return nil, err +func (c *OrganizationsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+parent}/buckets:createAsync") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "logging.organizations.locations.buckets.createAsync" call. +// Do executes the "logging.organizations.locations.buckets.links.get" call. // 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 +// *Link.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 *OrganizationsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *OrganizationsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22005,7 +23742,7 @@ func (c *OrganizationsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Link{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22018,78 +23755,103 @@ func (c *OrganizationsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.Call return ret, nil } -type OrganizationsLocationsBucketsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsLinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the -// DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log -// entries in the bucket will be permanently deleted. +// List: Lists links. // -// - name: The full resource name of the bucket to delete. +// - parent: The parent resource whose links are to be listed: // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID // ]" // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *OrganizationsLocationsBucketsService) Delete(name string) *OrganizationsLocationsBucketsDeleteCall { - c := &OrganizationsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". +func (r *OrganizationsLocationsBucketsLinksService) List(parent string) *OrganizationsLocationsBucketsLinksListCall { + c := &OrganizationsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. +func (c *OrganizationsLocationsBucketsLinksListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. +func (c *OrganizationsLocationsBucketsLinksListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsLinksListCall { + 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 // details. -func (c *OrganizationsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsDeleteCall { +func (c *OrganizationsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsLinksListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsDeleteCall { +func (c *OrganizationsLocationsBucketsLinksListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.delete" call. +// Do executes the "logging.organizations.locations.buckets.links.list" call. // 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 *OrganizationsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *ListLinksResponse.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 *OrganizationsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22108,7 +23870,7 @@ func (c *OrganizationsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &ListLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22121,88 +23883,108 @@ func (c *OrganizationsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOptio return ret, nil } -type OrganizationsLocationsBucketsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *OrganizationsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// Get: Gets a log bucket. +type OrganizationsLocationsBucketsViewsCreateCall struct { + s *Service + parent string + logview *LogView + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a view over log entries in a log bucket. A bucket may +// contain a maximum of 30 views. // -// - name: The resource name of the bucket: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *OrganizationsLocationsBucketsService) Get(name string) *OrganizationsLocationsBucketsGetCall { - c := &OrganizationsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The bucket in which to create the view +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *OrganizationsLocationsBucketsViewsService) Create(parent string, logview *LogView) *OrganizationsLocationsBucketsViewsCreateCall { + c := &OrganizationsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logview = logview + return c +} + +// ViewId sets the optional parameter "viewId": Required. A client-assigned +// identifier such as "my-view". Identifiers are limited to 100 characters and +// can include only letters, digits, underscores, hyphens, and periods. +func (c *OrganizationsLocationsBucketsViewsCreateCall) ViewId(viewId string) *OrganizationsLocationsBucketsViewsCreateCall { + c.urlParams_.Set("viewId", viewId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsGetCall { +func (c *OrganizationsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsGetCall { +func (c *OrganizationsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsGetCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsViewsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.get" call. +// Do executes the "logging.organizations.locations.buckets.views.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LogBucket.ServerResponse.Header or (if a response was returned at all) in +// *LogView.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 *OrganizationsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { +func (c *OrganizationsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22221,7 +24003,7 @@ func (c *OrganizationsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogBucket{ + ret := &LogView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22234,107 +24016,76 @@ func (c *OrganizationsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type OrganizationsLocationsBucketsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsViewsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists log buckets. +// Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned, +// this indicates that system is not in a state where it can delete the view. +// If this occurs, please try again in a few minutes. // -// - parent: The parent resource whose buckets are to be listed: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion -// of the resource must be specified, but supplying the character - in place -// of LOCATION_ID will return all buckets. -func (r *OrganizationsLocationsBucketsService) List(parent string) *OrganizationsLocationsBucketsListCall { - c := &OrganizationsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *OrganizationsLocationsBucketsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *OrganizationsLocationsBucketsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsListCall { - 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 -// details. -func (c *OrganizationsLocationsBucketsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// - name: The full resource name of the view to delete: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V +// IEW_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi +// ew". +func (r *OrganizationsLocationsBucketsViewsService) Delete(name string) *OrganizationsLocationsBucketsViewsDeleteCall { + c := &OrganizationsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsLocationsBucketsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsListCall { - c.ifNoneMatch_ = entityTag +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OrganizationsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsListCall { +func (c *OrganizationsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsListCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsViewsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v2/{+parent}/buckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.list" call. +// Do executes the "logging.organizations.locations.buckets.views.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *ListBucketsResponse.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 *OrganizationsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) { +// *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 *OrganizationsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22353,7 +24104,7 @@ func (c *OrganizationsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListBucketsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22366,100 +24117,70 @@ func (c *OrganizationsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) return ret, nil } -// 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 *OrganizationsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 OrganizationsLocationsBucketsPatchCall struct { - s *Service - name string - logbucket *LogBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsViewsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a log bucket.If the bucket has a lifecycle_state of -// DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket -// has been created, the bucket's location cannot be changed. +// Get: Gets a view on a log bucket. // -// - name: The full resource name of the bucket to update. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *OrganizationsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *OrganizationsLocationsBucketsPatchCall { - c := &OrganizationsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the policy: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V +// IEW_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi +// ew". +func (r *OrganizationsLocationsBucketsViewsService) Get(name string) *OrganizationsLocationsBucketsViewsGetCall { + c := &OrganizationsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.logbucket = logbucket - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Field mask -// that specifies the fields in bucket that need an update. A bucket field will -// be overwritten if, and only if, it is in the update mask. name and output -// only fields cannot be updated.For a detailed FieldMask definition, see: -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=retention_days -func (c *OrganizationsLocationsBucketsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsPatchCall { - 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 // details. -func (c *OrganizationsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsPatchCall { +func (c *OrganizationsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsPatchCall { +func (c *OrganizationsLocationsBucketsViewsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsPatchCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsViewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) - if err != nil { - return nil, err +func (c *OrganizationsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -22470,12 +24191,12 @@ func (c *OrganizationsLocationsBucketsPatchCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.patch" call. +// Do executes the "logging.organizations.locations.buckets.views.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LogBucket.ServerResponse.Header or (if a response was returned at all) in +// *LogView.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 *OrganizationsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { +func (c *OrganizationsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22494,7 +24215,7 @@ func (c *OrganizationsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogBucket{ + ret := &LogView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22507,65 +24228,61 @@ func (c *OrganizationsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption return ret, nil } -type OrganizationsLocationsBucketsUndeleteCall struct { - s *Service - name string - undeletebucketrequest *UndeleteBucketRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsViewsGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Undelete: Undeletes a log bucket. A bucket that has been deleted can be -// undeleted within the grace period of 7 days. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: The full resource name of the bucket to undelete. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *OrganizationsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *OrganizationsLocationsBucketsUndeleteCall { - c := &OrganizationsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeletebucketrequest = undeletebucketrequest +// - 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 *OrganizationsLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsLocationsBucketsViewsGetIamPolicyCall { + c := &OrganizationsLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsUndeleteCall { +func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsUndeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsUndeleteCall { +func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsUndeleteCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22573,17 +24290,17 @@ func (c *OrganizationsLocationsBucketsUndeleteCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.undelete" call. +// Do executes the "logging.organizations.locations.buckets.views.getIamPolicy" call. // 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 +// *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 *OrganizationsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22602,7 +24319,7 @@ func (c *OrganizationsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22615,96 +24332,102 @@ func (c *OrganizationsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } -type OrganizationsLocationsBucketsUpdateAsyncCall struct { - s *Service - name string - logbucket *LogBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsViewsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateAsync: Updates a log bucket asynchronously.If the bucket has a -// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be -// returned.After a bucket has been created, the bucket's location cannot be -// changed. +// List: Lists views on a log bucket. // -// - name: The full resource name of the bucket to update. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *OrganizationsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *OrganizationsLocationsBucketsUpdateAsyncCall { - c := &OrganizationsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.logbucket = logbucket +// - parent: The bucket whose views are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". +func (r *OrganizationsLocationsBucketsViewsService) List(parent string) *OrganizationsLocationsBucketsViewsListCall { + c := &OrganizationsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UpdateMask sets the optional parameter "updateMask": Required. Field mask -// that specifies the fields in bucket that need an update. A bucket field will -// be overwritten if, and only if, it is in the update mask. name and output -// only fields cannot be updated.For a detailed FieldMask definition, see: -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=retention_days -func (c *OrganizationsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsUpdateAsyncCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request.Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *OrganizationsLocationsBucketsViewsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsViewsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *OrganizationsLocationsBucketsViewsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsViewsListCall { + 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 // details. -func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsUpdateAsyncCall { +func (c *OrganizationsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *OrganizationsLocationsBucketsUpdateAsyncCall { +func (c *OrganizationsLocationsBucketsViewsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsViewsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) - if err != nil { - return nil, err +func (c *OrganizationsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}:updateAsync") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.updateAsync" call. +// Do executes the "logging.organizations.locations.buckets.views.list" call. // 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 *OrganizationsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *ListViewsResponse.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 *OrganizationsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22723,7 +24446,7 @@ func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ListViewsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22736,91 +24459,116 @@ func (c *OrganizationsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.Call return ret, nil } -type OrganizationsLocationsBucketsLinksCreateCall struct { +// 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 *OrganizationsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 OrganizationsLocationsBucketsViewsPatchCall struct { s *Service - parent string - link *Link + name string + logview *LogView urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Asynchronously creates a linked dataset in BigQuery which makes it -// possible to use BigQuery to read the logs stored in the log bucket. A log -// bucket may currently only contain one link. +// Patch: Updates a view on a log bucket. This method replaces the value of the +// filter field from the existing view with the corresponding value from the +// new view. If an UNAVAILABLE error is returned, this indicates that system is +// not in a state where it can update the view. If this occurs, please try +// again in a few minutes. // -// - parent: The full resource name of the bucket to create a link for. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". -func (r *OrganizationsLocationsBucketsLinksService) Create(parent string, link *Link) *OrganizationsLocationsBucketsLinksCreateCall { - c := &OrganizationsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.link = link +// - name: The full resource name of the view to update +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V +// IEW_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi +// ew". +func (r *OrganizationsLocationsBucketsViewsService) Patch(name string, logview *LogView) *OrganizationsLocationsBucketsViewsPatchCall { + c := &OrganizationsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.logview = logview return c } -// LinkId sets the optional parameter "linkId": Required. The ID to use for the -// link. The link_id can have up to 100 characters. A valid link_id must only -// have alphanumeric characters and underscores within it. -func (c *OrganizationsLocationsBucketsLinksCreateCall) LinkId(linkId string) *OrganizationsLocationsBucketsLinksCreateCall { - c.urlParams_.Set("linkId", linkId) +// UpdateMask sets the optional parameter "updateMask": Field mask that +// specifies the fields in view that need an update. A field will be +// overwritten if, and only if, it is in the update mask. name and output only +// fields cannot be updated.For a detailed FieldMask definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=filter +func (c *OrganizationsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsViewsPatchCall { + 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 // details. -func (c *OrganizationsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksCreateCall { +func (c *OrganizationsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksCreateCall { +func (c *OrganizationsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsLinksCreateCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsViewsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.link) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", 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 "logging.organizations.locations.buckets.links.create" call. +// Do executes the "logging.organizations.locations.buckets.views.patch" call. // 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 +// *LogView.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 *OrganizationsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *OrganizationsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22839,7 +24587,7 @@ func (c *OrganizationsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &LogView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22852,79 +24600,80 @@ func (c *OrganizationsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.Call return ret, nil } -type OrganizationsLocationsBucketsLinksDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsViewsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a link. This will also delete the corresponding BigQuery -// linked dataset. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// - name: The full resource name of the link to delete. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L -// INK_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]/links/[LINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]/links/[LINK_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN -// K_ID]". -func (r *OrganizationsLocationsBucketsLinksService) Delete(name string) *OrganizationsLocationsBucketsLinksDeleteCall { - c := &OrganizationsLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *OrganizationsLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsLocationsBucketsViewsSetIamPolicyCall { + c := &OrganizationsLocationsBucketsViewsSetIamPolicyCall{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 // details. -func (c *OrganizationsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksDeleteCall { +func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksDeleteCall { +func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsLinksDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.links.delete" call. +// Do executes the "logging.organizations.locations.buckets.views.setIamPolicy" call. // 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 +// *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 *OrganizationsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22943,7 +24692,7 @@ func (c *OrganizationsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22956,90 +24705,84 @@ func (c *OrganizationsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type OrganizationsLocationsBucketsLinksGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsBucketsViewsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a link. +// 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. // -// - name: The resource name of the link: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L -// INK_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]/links/[LINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]/links/[LINK_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN -// K_ID]". -func (r *OrganizationsLocationsBucketsLinksService) Get(name string) *OrganizationsLocationsBucketsLinksGetCall { - c := &OrganizationsLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *OrganizationsLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall { + c := &OrganizationsLocationsBucketsViewsTestIamPermissionsCall{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 // details. -func (c *OrganizationsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksGetCall { +func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsLinksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsLinksGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksGetCall { +func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsLinksGetCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.links.get" call. +// Do executes the "logging.organizations.locations.buckets.views.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Link.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 *OrganizationsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) { +// *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 *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23058,7 +24801,7 @@ func (c *OrganizationsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Link{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23071,7 +24814,7 @@ func (c *OrganizationsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOpt return ret, nil } -type OrganizationsLocationsBucketsLinksListCall struct { +type OrganizationsLocationsBucketsViewsLogsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -23080,39 +24823,58 @@ type OrganizationsLocationsBucketsLinksListCall struct { header_ http.Header } -// List: Lists links. +// List: Lists the logs in projects, organizations, folders, or billing +// accounts. Only logs that have entries are listed. // -// - parent: The parent resource whose links are to be listed: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". -func (r *OrganizationsLocationsBucketsLinksService) List(parent string) *OrganizationsLocationsBucketsLinksListCall { - c := &OrganizationsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name to list logs for: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]. +func (r *OrganizationsLocationsBucketsViewsLogsService) List(parent string) *OrganizationsLocationsBucketsViewsLogsListCall { + c := &OrganizationsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. -func (c *OrganizationsLocationsBucketsLinksListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsLinksListCall { +// results to return from this request. Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *OrganizationsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsViewsLogsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": If present, then retrieve // the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. -func (c *OrganizationsLocationsBucketsLinksListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsLinksListCall { +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *OrganizationsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsViewsLogsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ResourceNames sets the optional parameter "resourceNames": List of resource +// names to list logs for: +// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW +// _ID] +// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v +// iews/[VIEW_ID] +// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ +// ID]/views/[VIEW_ID] +// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I +// D]To support legacy queries, it could also be: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]The resource name in the parent field is added to this +// list. +func (c *OrganizationsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *OrganizationsLocationsBucketsViewsLogsListCall { + c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsLinksListCall { +func (c *OrganizationsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsLogsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23120,27 +24882,27 @@ func (c *OrganizationsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field // IfNoneMatch sets an 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. -func (c *OrganizationsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsLinksListCall { +func (c *OrganizationsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsLogsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsLinksListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsLinksListCall { +func (c *OrganizationsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsLogsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsLinksListCall) Header() http.Header { +func (c *OrganizationsLocationsBucketsViewsLogsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23148,7 +24910,7 @@ func (c *OrganizationsLocationsBucketsLinksListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23161,13 +24923,13 @@ func (c *OrganizationsLocationsBucketsLinksListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.links.list" call. +// Do executes the "logging.organizations.locations.buckets.views.logs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListLinksResponse.ServerResponse.Header or (if a response was returned at +// *ListLogsResponse.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 *OrganizationsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) { +func (c *OrganizationsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23186,7 +24948,7 @@ func (c *OrganizationsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLinksResponse{ + ret := &ListLogsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23202,7 +24964,7 @@ func (c *OrganizationsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOp // 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 *OrganizationsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error { +func (c *OrganizationsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -23220,69 +24982,69 @@ func (c *OrganizationsLocationsBucketsLinksListCall) Pages(ctx context.Context, } } -type OrganizationsLocationsBucketsViewsCreateCall struct { +type OrganizationsLocationsLogScopesCreateCall struct { s *Service parent string - logview *LogView + logscope *LogScope urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a view over log entries in a log bucket. A bucket may -// contain a maximum of 30 views. +// Create: Creates a log scope. // -// - parent: The bucket in which to create the view -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *OrganizationsLocationsBucketsViewsService) Create(parent string, logview *LogView) *OrganizationsLocationsBucketsViewsCreateCall { - c := &OrganizationsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent project in which to create the log scope +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For +// example:"projects/my-project/locations/global". +func (r *OrganizationsLocationsLogScopesService) Create(parent string, logscope *LogScope) *OrganizationsLocationsLogScopesCreateCall { + c := &OrganizationsLocationsLogScopesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.logview = logview + c.logscope = logscope return c } -// ViewId sets the optional parameter "viewId": Required. A client-assigned -// identifier such as "my-view". Identifiers are limited to 100 characters and -// can include only letters, digits, underscores, hyphens, and periods. -func (c *OrganizationsLocationsBucketsViewsCreateCall) ViewId(viewId string) *OrganizationsLocationsBucketsViewsCreateCall { - c.urlParams_.Set("viewId", viewId) +// LogScopeId sets the optional parameter "logScopeId": Required. A +// client-assigned identifier such as "log-scope". Identifiers are limited to +// 100 characters and can include only letters, digits, underscores, hyphens, +// and periods. First character has to be alphanumeric. +func (c *OrganizationsLocationsLogScopesCreateCall) LogScopeId(logScopeId string) *OrganizationsLocationsLogScopesCreateCall { + c.urlParams_.Set("logScopeId", logScopeId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsCreateCall { +func (c *OrganizationsLocationsLogScopesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsLogScopesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsCreateCall { +func (c *OrganizationsLocationsLogScopesCreateCall) Context(ctx context.Context) *OrganizationsLocationsLogScopesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsViewsCreateCall) Header() http.Header { +func (c *OrganizationsLocationsLogScopesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsLogScopesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logscope) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logScopes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23295,12 +25057,12 @@ func (c *OrganizationsLocationsBucketsViewsCreateCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.views.create" call. +// Do executes the "logging.organizations.locations.logScopes.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LogView.ServerResponse.Header or (if a response was returned at all) in +// *LogScope.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 *OrganizationsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) { +func (c *OrganizationsLocationsLogScopesCreateCall) Do(opts ...googleapi.CallOption) (*LogScope, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23319,7 +25081,7 @@ func (c *OrganizationsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogView{ + ret := &LogScope{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23332,7 +25094,7 @@ func (c *OrganizationsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.Call return ret, nil } -type OrganizationsLocationsBucketsViewsDeleteCall struct { +type OrganizationsLocationsLogScopesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23340,17 +25102,13 @@ type OrganizationsLocationsBucketsViewsDeleteCall struct { header_ http.Header } -// Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned, -// this indicates that system is not in a state where it can delete the view. -// If this occurs, please try again in a few minutes. +// Delete: Deletes a log scope. // -// - name: The full resource name of the view to delete: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V -// IEW_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi -// ew". -func (r *OrganizationsLocationsBucketsViewsService) Delete(name string) *OrganizationsLocationsBucketsViewsDeleteCall { - c := &OrganizationsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the log scope to delete: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]" +// For example:"projects/my-project/locations/global/logScopes/my-log-scope". +func (r *OrganizationsLocationsLogScopesService) Delete(name string) *OrganizationsLocationsLogScopesDeleteCall { + c := &OrganizationsLocationsLogScopesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23358,27 +25116,27 @@ func (r *OrganizationsLocationsBucketsViewsService) Delete(name string) *Organiz // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsDeleteCall { +func (c *OrganizationsLocationsLogScopesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsLogScopesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsDeleteCall { +func (c *OrganizationsLocationsLogScopesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsLogScopesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsViewsDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsLogScopesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsLogScopesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -23396,12 +25154,12 @@ func (c *OrganizationsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.views.delete" call. +// Do executes the "logging.organizations.locations.logScopes.delete" call. // 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 *OrganizationsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *OrganizationsLocationsLogScopesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23433,7 +25191,7 @@ func (c *OrganizationsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type OrganizationsLocationsBucketsViewsGetCall struct { +type OrganizationsLocationsLogScopesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23442,15 +25200,13 @@ type OrganizationsLocationsBucketsViewsGetCall struct { header_ http.Header } -// Get: Gets a view on a log bucket. +// Get: Gets a log scope. // -// - name: The resource name of the policy: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V -// IEW_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi -// ew". -func (r *OrganizationsLocationsBucketsViewsService) Get(name string) *OrganizationsLocationsBucketsViewsGetCall { - c := &OrganizationsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the log scope: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]" +// For example:"projects/my-project/locations/global/logScopes/my-log-scope". +func (r *OrganizationsLocationsLogScopesService) Get(name string) *OrganizationsLocationsLogScopesGetCall { + c := &OrganizationsLocationsLogScopesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23458,7 +25214,7 @@ func (r *OrganizationsLocationsBucketsViewsService) Get(name string) *Organizati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsGetCall { +func (c *OrganizationsLocationsLogScopesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsLogScopesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23466,27 +25222,27 @@ func (c *OrganizationsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an 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. -func (c *OrganizationsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsGetCall { +func (c *OrganizationsLocationsLogScopesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsLogScopesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsViewsGetCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsGetCall { +func (c *OrganizationsLocationsLogScopesGetCall) Context(ctx context.Context) *OrganizationsLocationsLogScopesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsViewsGetCall) Header() http.Header { +func (c *OrganizationsLocationsLogScopesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsLogScopesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23507,116 +25263,12 @@ func (c *OrganizationsLocationsBucketsViewsGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.views.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *LogView.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 *OrganizationsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, 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 := &LogView{ - 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 -} - -type OrganizationsLocationsBucketsViewsGetIamPolicyCall struct { - s *Service - resource string - getiampolicyrequest *GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. -// -// - 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 *OrganizationsLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *OrganizationsLocationsBucketsViewsGetIamPolicyCall { - c := &OrganizationsLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.getiampolicyrequest = getiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") - 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 "logging.organizations.locations.buckets.views.getIamPolicy" call. +// Do executes the "logging.organizations.locations.logScopes.get" call. // 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 +// *LogScope.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 *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *OrganizationsLocationsLogScopesGetCall) Do(opts ...googleapi.CallOption) (*LogScope, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23635,7 +25287,7 @@ func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &LogScope{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23648,7 +25300,7 @@ func (c *OrganizationsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleap return ret, nil } -type OrganizationsLocationsBucketsViewsListCall struct { +type OrganizationsLocationsLogScopesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -23657,12 +25309,12 @@ type OrganizationsLocationsBucketsViewsListCall struct { header_ http.Header } -// List: Lists views on a log bucket. +// List: Lists log scopes. // -// - parent: The bucket whose views are to be listed: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". -func (r *OrganizationsLocationsBucketsViewsService) List(parent string) *OrganizationsLocationsBucketsViewsListCall { - c := &OrganizationsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource whose log scopes are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]". +func (r *OrganizationsLocationsLogScopesService) List(parent string) *OrganizationsLocationsLogScopesListCall { + c := &OrganizationsLocationsLogScopesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -23671,7 +25323,7 @@ func (r *OrganizationsLocationsBucketsViewsService) List(parent string) *Organiz // results to return from this request.Non-positive values are ignored. The // presence of nextPageToken in the response indicates that more results might // be available. -func (c *OrganizationsLocationsBucketsViewsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsViewsListCall { +func (c *OrganizationsLocationsLogScopesListCall) PageSize(pageSize int64) *OrganizationsLocationsLogScopesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -23680,7 +25332,7 @@ func (c *OrganizationsLocationsBucketsViewsListCall) PageSize(pageSize int64) *O // the next batch of results from the preceding call to this method. pageToken // must be the value of nextPageToken from the previous response. The values of // other method parameters should be identical to those in the previous call. -func (c *OrganizationsLocationsBucketsViewsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsViewsListCall { +func (c *OrganizationsLocationsLogScopesListCall) PageToken(pageToken string) *OrganizationsLocationsLogScopesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -23688,7 +25340,7 @@ func (c *OrganizationsLocationsBucketsViewsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsListCall { +func (c *OrganizationsLocationsLogScopesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsLogScopesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23696,27 +25348,27 @@ func (c *OrganizationsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field // IfNoneMatch sets an 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. -func (c *OrganizationsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsListCall { +func (c *OrganizationsLocationsLogScopesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsLogScopesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsViewsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsListCall { +func (c *OrganizationsLocationsLogScopesListCall) Context(ctx context.Context) *OrganizationsLocationsLogScopesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsViewsListCall) Header() http.Header { +func (c *OrganizationsLocationsLogScopesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsLogScopesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23724,7 +25376,7 @@ func (c *OrganizationsLocationsBucketsViewsListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logScopes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23737,13 +25389,13 @@ func (c *OrganizationsLocationsBucketsViewsListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.views.list" call. +// Do executes the "logging.organizations.locations.logScopes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListViewsResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *ListLogScopesResponse.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 *OrganizationsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) { +func (c *OrganizationsLocationsLogScopesListCall) Do(opts ...googleapi.CallOption) (*ListLogScopesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23762,7 +25414,7 @@ func (c *OrganizationsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListViewsResponse{ + ret := &ListLogScopesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23778,7 +25430,7 @@ func (c *OrganizationsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOp // 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 *OrganizationsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error { +func (c *OrganizationsLocationsLogScopesListCall) Pages(ctx context.Context, f func(*ListLogScopesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -23796,40 +25448,33 @@ func (c *OrganizationsLocationsBucketsViewsListCall) Pages(ctx context.Context, } } -type OrganizationsLocationsBucketsViewsPatchCall struct { +type OrganizationsLocationsLogScopesPatchCall struct { s *Service name string - logview *LogView + logscope *LogScope urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a view on a log bucket. This method replaces the value of the -// filter field from the existing view with the corresponding value from the -// new view. If an UNAVAILABLE error is returned, this indicates that system is -// not in a state where it can update the view. If this occurs, please try -// again in a few minutes. +// Patch: Updates a log scope. // -// - name: The full resource name of the view to update -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V -// IEW_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi -// ew". -func (r *OrganizationsLocationsBucketsViewsService) Patch(name string, logview *LogView) *OrganizationsLocationsBucketsViewsPatchCall { - c := &OrganizationsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The resource name of the log scope.For +// example:projects/my-project/locations/global/logScopes/my-log-scope. +func (r *OrganizationsLocationsLogScopesService) Patch(name string, logscope *LogScope) *OrganizationsLocationsLogScopesPatchCall { + c := &OrganizationsLocationsLogScopesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.logview = logview + c.logscope = logscope return c } // UpdateMask sets the optional parameter "updateMask": Field mask that -// specifies the fields in view that need an update. A field will be +// specifies the fields in log_scope that need an update. A field will be // overwritten if, and only if, it is in the update mask. name and output only // fields cannot be updated.For a detailed FieldMask definition, see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=filter -func (c *OrganizationsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsBucketsViewsPatchCall { +// example: updateMask=description +func (c *OrganizationsLocationsLogScopesPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsLogScopesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -23837,30 +25482,30 @@ func (c *OrganizationsLocationsBucketsViewsPatchCall) UpdateMask(updateMask stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsPatchCall { +func (c *OrganizationsLocationsLogScopesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsLogScopesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsPatchCall { +func (c *OrganizationsLocationsLogScopesPatchCall) Context(ctx context.Context) *OrganizationsLocationsLogScopesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsViewsPatchCall) Header() http.Header { +func (c *OrganizationsLocationsLogScopesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsLogScopesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logscope) if err != nil { return nil, err } @@ -23879,12 +25524,12 @@ func (c *OrganizationsLocationsBucketsViewsPatchCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.views.patch" call. +// Do executes the "logging.organizations.locations.logScopes.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *LogView.ServerResponse.Header or (if a response was returned at all) in +// *LogScope.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 *OrganizationsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) { +func (c *OrganizationsLocationsLogScopesPatchCall) Do(opts ...googleapi.CallOption) (*LogScope, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23903,7 +25548,7 @@ func (c *OrganizationsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogView{ + ret := &LogScope{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23916,62 +25561,66 @@ func (c *OrganizationsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallO return ret, nil } -type OrganizationsLocationsBucketsViewsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + 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. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Code.CANCELLED. // -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *OrganizationsLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *OrganizationsLocationsBucketsViewsSetIamPolicyCall { - c := &OrganizationsLocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The name of the operation resource to be cancelled. +func (r *OrganizationsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OrganizationsLocationsOperationsCancelCall { + c := &OrganizationsLocationsOperationsCancelCall{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 // details. -func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsSetIamPolicyCall { +func (c *OrganizationsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsSetIamPolicyCall { +func (c *OrganizationsLocationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23979,17 +25628,17 @@ func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) doRequest(alt strin } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.views.setIamPolicy" call. +// Do executes the "logging.organizations.locations.operations.cancel" call. // 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 +// *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 *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24008,7 +25657,7 @@ func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24021,84 +25670,84 @@ func (c *OrganizationsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleap return ret, nil } -type OrganizationsLocationsBucketsViewsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *OrganizationsLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall { - c := &OrganizationsLocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The name of the operation resource. +func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { + c := &OrganizationsLocationsOperationsGetCall{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 // details. -func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall { +func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsTestIamPermissionsCall { +func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err +func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.buckets.views.testIamPermissions" call. +// Do executes the "logging.organizations.locations.operations.get" call. // 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 *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// *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 *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24117,7 +25766,7 @@ func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24130,67 +25779,49 @@ func (c *OrganizationsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...go return ret, nil } -type OrganizationsLocationsBucketsViewsLogsListCall struct { +type OrganizationsLocationsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the logs in projects, organizations, folders, or billing -// accounts. Only logs that have entries are listed. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns UNIMPLEMENTED. // -// - parent: The resource name to list logs for: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]. -func (r *OrganizationsLocationsBucketsViewsLogsService) List(parent string) *OrganizationsLocationsBucketsViewsLogsListCall { - c := &OrganizationsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall { + c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *OrganizationsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *OrganizationsLocationsBucketsViewsLogsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *OrganizationsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *OrganizationsLocationsBucketsViewsLogsListCall { - c.urlParams_.Set("pageToken", pageToken) +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ResourceNames sets the optional parameter "resourceNames": List of resource -// names to list logs for: -// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW -// _ID] -// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v -// iews/[VIEW_ID] -// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ -// ID]/views/[VIEW_ID] -// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I -// D]To support legacy queries, it could also be: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]The resource name in the parent field is added to this -// list. -func (c *OrganizationsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *OrganizationsLocationsBucketsViewsLogsListCall { - c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...)) +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall { + 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 // details. -func (c *OrganizationsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsBucketsViewsLogsListCall { +func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24198,27 +25829,27 @@ func (c *OrganizationsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.F // IfNoneMatch sets an 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. -func (c *OrganizationsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsBucketsViewsLogsListCall { +func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *OrganizationsLocationsBucketsViewsLogsListCall { +func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsBucketsViewsLogsListCall) Header() http.Header { +func (c *OrganizationsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24226,7 +25857,7 @@ func (c *OrganizationsLocationsBucketsViewsLogsListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24234,18 +25865,18 @@ func (c *OrganizationsLocationsBucketsViewsLogsListCall) doRequest(alt string) ( } 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 "logging.organizations.locations.buckets.views.logs.list" call. +// Do executes the "logging.organizations.locations.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListLogsResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *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 *OrganizationsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) { +func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24264,7 +25895,7 @@ func (c *OrganizationsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLogsResponse{ + ret := &ListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24280,7 +25911,7 @@ func (c *OrganizationsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.Ca // 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 *OrganizationsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { +func (c *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -24298,84 +25929,118 @@ func (c *OrganizationsLocationsBucketsViewsLogsListCall) Pages(ctx context.Conte } } -type OrganizationsLocationsOperationsCancelCall struct { - s *Service - name string - canceloperationrequest *CancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsRecentQueriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + 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. +// List: Lists the RecentQueries that were created by the user making the +// request. // -// - name: The name of the operation resource to be cancelled. -func (r *OrganizationsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OrganizationsLocationsOperationsCancelCall { - c := &OrganizationsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.canceloperationrequest = canceloperationrequest +// - parent: The resource to which the listed queries belong. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For +// example:projects/my-project/locations/us-central1Note: The location +// portion of the resource must be specified, but supplying the character - +// in place of LOCATION_ID will return all recent queries. +func (r *OrganizationsLocationsRecentQueriesService) List(parent string) *OrganizationsLocationsRecentQueriesListCall { + c := &OrganizationsLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Specifies the type ("Logging" +// or "OpsAnalytics") of the recent queries to list. The only valid value for +// this field is one of the two allowable type function calls, which are the +// following: type("Logging") type("OpsAnalytics") +func (c *OrganizationsLocationsRecentQueriesListCall) Filter(filter string) *OrganizationsLocationsRecentQueriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *OrganizationsLocationsRecentQueriesListCall) PageSize(pageSize int64) *OrganizationsLocationsRecentQueriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *OrganizationsLocationsRecentQueriesListCall) PageToken(pageToken string) *OrganizationsLocationsRecentQueriesListCall { + 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 // details. -func (c *OrganizationsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsCancelCall { +func (c *OrganizationsLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecentQueriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsRecentQueriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsOperationsCancelCall) Context(ctx context.Context) *OrganizationsLocationsOperationsCancelCall { +func (c *OrganizationsLocationsRecentQueriesListCall) Context(ctx context.Context) *OrganizationsLocationsRecentQueriesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsOperationsCancelCall) Header() http.Header { +func (c *OrganizationsLocationsRecentQueriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) - if err != nil { - return nil, err +func (c *OrganizationsLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.operations.cancel" call. +// Do executes the "logging.organizations.locations.recentQueries.list" call. // 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 *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *ListRecentQueriesResponse.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 *OrganizationsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24394,7 +26059,7 @@ func (c *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &ListRecentQueriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24407,84 +26072,115 @@ func (c *OrganizationsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOp return ret, nil } -type OrganizationsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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 *OrganizationsLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } } -// 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. +type OrganizationsLocationsSavedQueriesCreateCall struct { + s *Service + parent string + savedquery *SavedQuery + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new SavedQuery for the user making the request. // -// - name: The name of the operation resource. -func (r *OrganizationsLocationsOperationsService) Get(name string) *OrganizationsLocationsOperationsGetCall { - c := &OrganizationsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource in which to create the saved query: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: +// "projects/my-project/locations/global" +// "organizations/123456789/locations/us-central1". +func (r *OrganizationsLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *OrganizationsLocationsSavedQueriesCreateCall { + c := &OrganizationsLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.savedquery = savedquery + return c +} + +// SavedQueryId sets the optional parameter "savedQueryId": The ID to use for +// the saved query, which will become the final component of the saved query's +// resource name.If the saved_query_id is not provided, the system will +// generate an alphanumeric ID.The saved_query_id is limited to 100 characters +// and can include only the following characters: upper and lower-case +// alphanumeric characters, underscores, hyphens, periods.First character has +// to be alphanumeric. +func (c *OrganizationsLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *OrganizationsLocationsSavedQueriesCreateCall { + c.urlParams_.Set("savedQueryId", savedQueryId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsGetCall { +func (c *OrganizationsLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsOperationsGetCall) Context(ctx context.Context) *OrganizationsLocationsOperationsGetCall { +func (c *OrganizationsLocationsSavedQueriesCreateCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsOperationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsSavedQueriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *OrganizationsLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.operations.get" call. +// Do executes the "logging.organizations.locations.savedQueries.create" call. // 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 +// *SavedQuery.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 *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *OrganizationsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24503,7 +26199,7 @@ func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &SavedQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24516,87 +26212,63 @@ func (c *OrganizationsLocationsOperationsGetCall) Do(opts ...googleapi.CallOptio return ret, nil } -type OrganizationsLocationsOperationsListCall 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. -// -// - name: The name of the operation's parent resource. -func (r *OrganizationsLocationsOperationsService) List(name string) *OrganizationsLocationsOperationsListCall { - c := &OrganizationsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *OrganizationsLocationsOperationsListCall) Filter(filter string) *OrganizationsLocationsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *OrganizationsLocationsOperationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type OrganizationsLocationsSavedQueriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *OrganizationsLocationsOperationsListCall) PageToken(pageToken string) *OrganizationsLocationsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Delete: Deletes an existing SavedQuery that was created by the user making +// the request. +// +// - name: The full resource name of the saved query to delete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER +// Y_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/ +// [QUERY_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For +// example: +// "projects/my-project/locations/global/savedQueries/my-saved-query". +func (r *OrganizationsLocationsSavedQueriesService) Delete(name string) *OrganizationsLocationsSavedQueriesDeleteCall { + c := &OrganizationsLocationsSavedQueriesDeleteCall{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 // details. -func (c *OrganizationsLocationsOperationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOperationsListCall { +func (c *OrganizationsLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsLocationsOperationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsOperationsListCall) Context(ctx context.Context) *OrganizationsLocationsOperationsListCall { +func (c *OrganizationsLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsOperationsListCall) Header() http.Header { +func (c *OrganizationsLocationsSavedQueriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v2/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -24607,13 +26279,12 @@ func (c *OrganizationsLocationsOperationsListCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.operations.list" call. +// Do executes the "logging.organizations.locations.savedQueries.delete" call. // 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 *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { +// *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 *OrganizationsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24632,7 +26303,7 @@ func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListOperationsResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24645,84 +26316,36 @@ func (c *OrganizationsLocationsOperationsListCall) Do(opts ...googleapi.CallOpti return ret, nil } -// 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 *OrganizationsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 OrganizationsLocationsRecentQueriesListCall struct { +type OrganizationsLocationsSavedQueriesGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the RecentQueries that were created by the user making the -// request. +// Get: Returns all data associated with the requested query. // -// - parent: The resource to which the listed queries belong. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For -// example:projects/my-project/locations/us-central1Note: The location -// portion of the resource must be specified, but supplying the character - -// in place of LOCATION_ID will return all recent queries. -func (r *OrganizationsLocationsRecentQueriesService) List(parent string) *OrganizationsLocationsRecentQueriesListCall { - c := &OrganizationsLocationsRecentQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Specifies the type ("Logging" -// or "OpsAnalytics") of the recent queries to list. The only valid value for -// this field is one of the two allowable type function calls, which are the -// following: type("Logging") type("OpsAnalytics") -func (c *OrganizationsLocationsRecentQueriesListCall) Filter(filter string) *OrganizationsLocationsRecentQueriesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *OrganizationsLocationsRecentQueriesListCall) PageSize(pageSize int64) *OrganizationsLocationsRecentQueriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *OrganizationsLocationsRecentQueriesListCall) PageToken(pageToken string) *OrganizationsLocationsRecentQueriesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the saved query. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER +// Y_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/ +// [QUERY_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For +// example: +// "projects/my-project/locations/global/savedQueries/my-saved-query". +func (r *OrganizationsLocationsSavedQueriesService) Get(name string) *OrganizationsLocationsSavedQueriesGetCall { + c := &OrganizationsLocationsSavedQueriesGetCall{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 // details. -func (c *OrganizationsLocationsRecentQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecentQueriesListCall { +func (c *OrganizationsLocationsSavedQueriesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24730,27 +26353,27 @@ func (c *OrganizationsLocationsRecentQueriesListCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an 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. -func (c *OrganizationsLocationsRecentQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsRecentQueriesListCall { +func (c *OrganizationsLocationsSavedQueriesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSavedQueriesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsRecentQueriesListCall) Context(ctx context.Context) *OrganizationsLocationsRecentQueriesListCall { +func (c *OrganizationsLocationsSavedQueriesGetCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsRecentQueriesListCall) Header() http.Header { +func (c *OrganizationsLocationsSavedQueriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsRecentQueriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsSavedQueriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24758,7 +26381,7 @@ func (c *OrganizationsLocationsRecentQueriesListCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/recentQueries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24766,18 +26389,17 @@ func (c *OrganizationsLocationsRecentQueriesListCall) doRequest(alt string) (*ht } 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 "logging.organizations.locations.recentQueries.list" call. +// Do executes the "logging.organizations.locations.savedQueries.get" call. // Any non-2xx status code is an error. Response headers are in either -// *ListRecentQueriesResponse.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 *OrganizationsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallOption) (*ListRecentQueriesResponse, error) { +// *SavedQuery.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 *OrganizationsLocationsSavedQueriesGetCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24796,7 +26418,7 @@ func (c *OrganizationsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListRecentQueriesResponse{ + ret := &SavedQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24809,99 +26431,108 @@ func (c *OrganizationsLocationsRecentQueriesListCall) Do(opts ...googleapi.CallO return ret, nil } -// 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 *OrganizationsLocationsRecentQueriesListCall) Pages(ctx context.Context, f func(*ListRecentQueriesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 OrganizationsLocationsSavedQueriesCreateCall struct { - s *Service - parent string - savedquery *SavedQuery - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsSavedQueriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new SavedQuery for the user making the request. +// List: Lists the SavedQueries that were created by the user making the +// request. // -// - parent: The parent resource in which to create the saved query: +// - parent: The resource to which the listed queries belong. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]" // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" // "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: -// "projects/my-project/locations/global" -// "organizations/123456789/locations/us-central1". -func (r *OrganizationsLocationsSavedQueriesService) Create(parent string, savedquery *SavedQuery) *OrganizationsLocationsSavedQueriesCreateCall { - c := &OrganizationsLocationsSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// "projects/my-project/locations/us-central1" Note: The locations portion of +// the resource must be specified. To get a list of all saved queries, a +// wildcard character - can be used for LOCATION_ID, for example: +// "projects/my-project/locations/-". +func (r *OrganizationsLocationsSavedQueriesService) List(parent string) *OrganizationsLocationsSavedQueriesListCall { + c := &OrganizationsLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.savedquery = savedquery return c } -// SavedQueryId sets the optional parameter "savedQueryId": The ID to use for -// the saved query, which will become the final component of the saved query's -// resource name.If the saved_query_id is not provided, the system will -// generate an alphanumeric ID.The saved_query_id is limited to 100 characters -// and can include only the following characters: upper and lower-case -// alphanumeric characters, underscores, hyphens, periods.First character has -// to be alphanumeric. -func (c *OrganizationsLocationsSavedQueriesCreateCall) SavedQueryId(savedQueryId string) *OrganizationsLocationsSavedQueriesCreateCall { - c.urlParams_.Set("savedQueryId", savedQueryId) +// Filter sets the optional parameter "filter": Specifies the type ("Logging" +// or "OpsAnalytics") and the visibility (PRIVATE or SHARED) of the saved +// queries to list. If provided, the filter must contain either the type +// function or a visibility token, or both. If both are chosen, they can be +// placed in any order, but they must be joined by the AND operator or the +// empty character.The two supported type function calls are: type("Logging") +// type("OpsAnalytics")The two supported visibility tokens are: visibility = +// PRIVATE visibility = SHAREDFor example:type("Logging") AND visibility = +// PRIVATE visibility=SHARED type("OpsAnalytics") type("OpsAnalytics)" +// visibility = PRIVATE visibility = SHARED +func (c *OrganizationsLocationsSavedQueriesListCall) Filter(filter string) *OrganizationsLocationsSavedQueriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request.Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *OrganizationsLocationsSavedQueriesListCall) PageSize(pageSize int64) *OrganizationsLocationsSavedQueriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *OrganizationsLocationsSavedQueriesListCall) PageToken(pageToken string) *OrganizationsLocationsSavedQueriesListCall { + 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 // details. -func (c *OrganizationsLocationsSavedQueriesCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesCreateCall { +func (c *OrganizationsLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSavedQueriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsSavedQueriesCreateCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesCreateCall { +func (c *OrganizationsLocationsSavedQueriesListCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsSavedQueriesCreateCall) Header() http.Header { +func (c *OrganizationsLocationsSavedQueriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery) - if err != nil { - return nil, err +func (c *OrganizationsLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+parent}/savedQueries") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -24912,12 +26543,13 @@ func (c *OrganizationsLocationsSavedQueriesCreateCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.savedQueries.create" call. +// Do executes the "logging.organizations.locations.savedQueries.list" call. // Any non-2xx status code is an error. Response headers are in either -// *SavedQuery.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 *OrganizationsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { +// *ListSavedQueriesResponse.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 *OrganizationsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24936,7 +26568,7 @@ func (c *OrganizationsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SavedQuery{ + ret := &ListSavedQueriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24949,63 +26581,99 @@ func (c *OrganizationsLocationsSavedQueriesCreateCall) Do(opts ...googleapi.Call return ret, nil } -type OrganizationsLocationsSavedQueriesDeleteCall struct { +// 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 *OrganizationsLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 OrganizationsLocationsSavedQueriesPatchCall struct { s *Service name string + savedquery *SavedQuery urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes an existing SavedQuery that was created by the user making -// the request. +// Patch: Updates an existing SavedQuery. // -// - name: The full resource name of the saved query to delete. +// - name: Output only. Resource name of the saved query.In the format: // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER -// Y_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/ -// [QUERY_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For -// example: -// "projects/my-project/locations/global/savedQueries/my-saved-query". -func (r *OrganizationsLocationsSavedQueriesService) Delete(name string) *OrganizationsLocationsSavedQueriesDeleteCall { - c := &OrganizationsLocationsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// For a list of supported locations, see Supported Regions +// (https://cloud.google.com/logging/docs/region-support#bucket-regions)After +// the saved query is created, the location cannot be changed.If the user +// doesn't provide a QUERY_ID, the system will generate an alphanumeric ID. +func (r *OrganizationsLocationsSavedQueriesService) Patch(name string, savedquery *SavedQuery) *OrganizationsLocationsSavedQueriesPatchCall { + c := &OrganizationsLocationsSavedQueriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.savedquery = savedquery + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A non-empty +// list of fields to change in the existing saved query. Fields are relative to +// the saved_query and new values for the fields are taken from the +// corresponding fields in the SavedQuery included in this request. Fields not +// mentioned in update_mask are not changed and are ignored in the request.To +// update all mutable fields, specify an update_mask of *.For example, to +// change the description and query filter text of a saved query, specify an +// update_mask of "description, query.filter". +func (c *OrganizationsLocationsSavedQueriesPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsSavedQueriesPatchCall { + 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 // details. -func (c *OrganizationsLocationsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesDeleteCall { +func (c *OrganizationsLocationsSavedQueriesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsSavedQueriesDeleteCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesDeleteCall { +func (c *OrganizationsLocationsSavedQueriesPatchCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsSavedQueriesDeleteCall) Header() http.Header { +func (c *OrganizationsLocationsSavedQueriesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *OrganizationsLocationsSavedQueriesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -25016,12 +26684,12 @@ func (c *OrganizationsLocationsSavedQueriesDeleteCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.savedQueries.delete" call. +// Do executes the "logging.organizations.locations.savedQueries.patch" call. // 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 +// *SavedQuery.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 *OrganizationsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *OrganizationsLocationsSavedQueriesPatchCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25040,7 +26708,7 @@ func (c *OrganizationsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &SavedQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25053,90 +26721,80 @@ func (c *OrganizationsLocationsSavedQueriesDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type OrganizationsLocationsSavedQueriesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLogsDeleteCall struct { + s *Service + logName string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns all data associated with the requested query. +// Delete: Deletes all the log entries in a log for the _Default Log Bucket. +// The log reappears if it receives new entries. Log entries written shortly +// before the delete operation might not be deleted. Entries received after the +// delete operation with a timestamp before the operation will be deleted. // -// - name: The resource name of the saved query. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/savedQueries/[QUER -// Y_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/savedQueries/ -// [QUERY_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" For -// example: -// "projects/my-project/locations/global/savedQueries/my-saved-query". -func (r *OrganizationsLocationsSavedQueriesService) Get(name string) *OrganizationsLocationsSavedQueriesGetCall { - c := &OrganizationsLocationsSavedQueriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - logName: The resource name of the log to delete: +// projects/[PROJECT_ID]/logs/[LOG_ID] +// organizations/[ORGANIZATION_ID]/logs/[LOG_ID] +// billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] +// folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For +// example, "projects/my-project-id/logs/syslog", +// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more +// information about log names, see LogEntry. +func (r *OrganizationsLogsService) Delete(logName string) *OrganizationsLogsDeleteCall { + c := &OrganizationsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.logName = logName return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsSavedQueriesGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesGetCall { +func (c *OrganizationsLogsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLogsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsLocationsSavedQueriesGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSavedQueriesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsSavedQueriesGetCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesGetCall { +func (c *OrganizationsLogsDeleteCall) Context(ctx context.Context) *OrganizationsLogsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsSavedQueriesGetCall) Header() http.Header { +func (c *OrganizationsLogsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsSavedQueriesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLogsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+logName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "logName": c.logName, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.savedQueries.get" call. +// Do executes the "logging.organizations.logs.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *SavedQuery.ServerResponse.Header or (if a response was returned at all) in +// *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 *OrganizationsLocationsSavedQueriesGetCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { +func (c *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25155,7 +26813,7 @@ func (c *OrganizationsLocationsSavedQueriesGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SavedQuery{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25168,7 +26826,7 @@ func (c *OrganizationsLocationsSavedQueriesGetCall) Do(opts ...googleapi.CallOpt return ret, nil } -type OrganizationsLocationsSavedQueriesListCall struct { +type OrganizationsLogsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -25177,44 +26835,23 @@ type OrganizationsLocationsSavedQueriesListCall struct { header_ http.Header } -// List: Lists the SavedQueries that were created by the user making the -// request. +// List: Lists the logs in projects, organizations, folders, or billing +// accounts. Only logs that have entries are listed. // -// - parent: The resource to which the listed queries belong. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" For example: -// "projects/my-project/locations/us-central1" Note: The locations portion of -// the resource must be specified. To get a list of all saved queries, a -// wildcard character - can be used for LOCATION_ID, for example: -// "projects/my-project/locations/-". -func (r *OrganizationsLocationsSavedQueriesService) List(parent string) *OrganizationsLocationsSavedQueriesListCall { - c := &OrganizationsLocationsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name to list logs for: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]. +func (r *OrganizationsLogsService) List(parent string) *OrganizationsLogsListCall { + c := &OrganizationsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Specifies the type ("Logging" -// or "OpsAnalytics") and the visibility (PRIVATE or SHARED) of the saved -// queries to list. If provided, the filter must contain either the type -// function or a visibility token, or both. If both are chosen, they can be -// placed in any order, but they must be joined by the AND operator or the -// empty character.The two supported type function calls are: type("Logging") -// type("OpsAnalytics")The two supported visibility tokens are: visibility = -// PRIVATE visibility = SHAREDFor example:type("Logging") AND visibility = -// PRIVATE visibility=SHARED type("OpsAnalytics") type("OpsAnalytics)" -// visibility = PRIVATE visibility = SHARED -func (c *OrganizationsLocationsSavedQueriesListCall) Filter(filter string) *OrganizationsLocationsSavedQueriesListCall { - c.urlParams_.Set("filter", filter) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request.Non-positive values are ignored. The +// results to return from this request. Non-positive values are ignored. The // presence of nextPageToken in the response indicates that more results might // be available. -func (c *OrganizationsLocationsSavedQueriesListCall) PageSize(pageSize int64) *OrganizationsLocationsSavedQueriesListCall { +func (c *OrganizationsLogsListCall) PageSize(pageSize int64) *OrganizationsLogsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -25223,15 +26860,33 @@ func (c *OrganizationsLocationsSavedQueriesListCall) PageSize(pageSize int64) *O // the next batch of results from the preceding call to this method. pageToken // must be the value of nextPageToken from the previous response. The values of // other method parameters should be identical to those in the previous call. -func (c *OrganizationsLocationsSavedQueriesListCall) PageToken(pageToken string) *OrganizationsLocationsSavedQueriesListCall { +func (c *OrganizationsLogsListCall) PageToken(pageToken string) *OrganizationsLogsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ResourceNames sets the optional parameter "resourceNames": List of resource +// names to list logs for: +// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW +// _ID] +// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v +// iews/[VIEW_ID] +// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ +// ID]/views/[VIEW_ID] +// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I +// D]To support legacy queries, it could also be: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]The resource name in the parent field is added to this +// list. +func (c *OrganizationsLogsListCall) ResourceNames(resourceNames ...string) *OrganizationsLogsListCall { + c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsSavedQueriesListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesListCall { +func (c *OrganizationsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLogsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25239,27 +26894,27 @@ func (c *OrganizationsLocationsSavedQueriesListCall) Fields(s ...googleapi.Field // IfNoneMatch sets an 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. -func (c *OrganizationsLocationsSavedQueriesListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSavedQueriesListCall { +func (c *OrganizationsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLogsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsSavedQueriesListCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesListCall { +func (c *OrganizationsLogsListCall) Context(ctx context.Context) *OrganizationsLogsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsSavedQueriesListCall) Header() http.Header { +func (c *OrganizationsLogsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLogsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -25267,7 +26922,7 @@ func (c *OrganizationsLocationsSavedQueriesListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/savedQueries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25280,13 +26935,13 @@ func (c *OrganizationsLocationsSavedQueriesListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.savedQueries.list" call. +// Do executes the "logging.organizations.logs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListSavedQueriesResponse.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 *OrganizationsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) { +// *ListLogsResponse.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 *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25305,7 +26960,7 @@ func (c *OrganizationsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSavedQueriesResponse{ + ret := &ListLogsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25321,7 +26976,7 @@ func (c *OrganizationsLocationsSavedQueriesListCall) Do(opts ...googleapi.CallOp // 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 *OrganizationsLocationsSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error { +func (c *OrganizationsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -25339,94 +26994,110 @@ func (c *OrganizationsLocationsSavedQueriesListCall) Pages(ctx context.Context, } } -type OrganizationsLocationsSavedQueriesPatchCall struct { +type OrganizationsSinksCreateCall struct { s *Service - name string - savedquery *SavedQuery + parent string + logsink *LogSink urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates an existing SavedQuery. +// Create: Creates a sink that exports specified log entries to a destination. +// The export begins upon ingress, unless the sink's writer_identity is not +// permitted to write to the destination. A sink can export log entries only +// from the resource owning the sink. // -// - name: Output only. Resource name of the saved query.In the format: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/savedQueries/[QUERY_ID]" -// For a list of supported locations, see Supported Regions -// (https://cloud.google.com/logging/docs/region-support#bucket-regions)After -// the saved query is created, the location cannot be changed.If the user -// doesn't provide a QUERY_ID, the system will generate an alphanumeric ID. -func (r *OrganizationsLocationsSavedQueriesService) Patch(name string, savedquery *SavedQuery) *OrganizationsLocationsSavedQueriesPatchCall { - c := &OrganizationsLocationsSavedQueriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.savedquery = savedquery +// - parent: The resource in which to create the sink: "projects/[PROJECT_ID]" +// "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" +// "folders/[FOLDER_ID]" For examples:"projects/my-project" +// "organizations/123456789". +func (r *OrganizationsSinksService) Create(parent string, logsink *LogSink) *OrganizationsSinksCreateCall { + c := &OrganizationsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logsink = logsink return c } -// UpdateMask sets the optional parameter "updateMask": Required. A non-empty -// list of fields to change in the existing saved query. Fields are relative to -// the saved_query and new values for the fields are taken from the -// corresponding fields in the SavedQuery included in this request. Fields not -// mentioned in update_mask are not changed and are ignored in the request.To -// update all mutable fields, specify an update_mask of *.For example, to -// change the description and query filter text of a saved query, specify an -// update_mask of "description, query.filter". -func (c *OrganizationsLocationsSavedQueriesPatchCall) UpdateMask(updateMask string) *OrganizationsLocationsSavedQueriesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The +// service account provided by the caller that will be used to write the log +// entries. The format must be serviceAccount:some@email. This field can only +// be specified when you are routing logs to a log bucket that is in a +// different project than the sink. When not specified, a Logging service +// account will automatically be generated. +func (c *OrganizationsSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksCreateCall { + c.urlParams_.Set("customWriterIdentity", customWriterIdentity) + return c +} + +// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": +// Determines the kind of IAM identity returned as writer_identity in the new +// sink. If this value is omitted or set to false, and if the sink's parent is +// a project, then the value returned as writer_identity is the same group or +// service account used by Cloud Logging before the addition of writer +// identities to this API. The sink's destination must be in the same project +// as the sink itself.If this field is set to true, or if the sink is owned by +// a non-project resource such as an organization, then the value of +// writer_identity will be a service agent +// (https://cloud.google.com/iam/docs/service-account-types#service-agents) +// used by the sinks with the same parent. For more information, see +// writer_identity in LogSink. +func (c *OrganizationsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksCreateCall { + c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLocationsSavedQueriesPatchCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSavedQueriesPatchCall { +func (c *OrganizationsSinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsSinksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLocationsSavedQueriesPatchCall) Context(ctx context.Context) *OrganizationsLocationsSavedQueriesPatchCall { +func (c *OrganizationsSinksCreateCall) Context(ctx context.Context) *OrganizationsSinksCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLocationsSavedQueriesPatchCall) Header() http.Header { +func (c *OrganizationsSinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsSavedQueriesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSinksCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.locations.savedQueries.patch" call. +// Do executes the "logging.organizations.sinks.create" call. // Any non-2xx status code is an error. Response headers are in either -// *SavedQuery.ServerResponse.Header or (if a response was returned at all) in +// *LogSink.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 *OrganizationsLocationsSavedQueriesPatchCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) { +func (c *OrganizationsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25445,7 +27116,7 @@ func (c *OrganizationsLocationsSavedQueriesPatchCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SavedQuery{ + ret := &LogSink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25458,80 +27129,189 @@ func (c *OrganizationsLocationsSavedQueriesPatchCall) Do(opts ...googleapi.CallO return ret, nil } -type OrganizationsLogsDeleteCall struct { +type OrganizationsSinksDeleteCall struct { s *Service - logName string + sinkNameid string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes all the log entries in a log for the _Default Log Bucket. -// The log reappears if it receives new entries. Log entries written shortly -// before the delete operation might not be deleted. Entries received after the -// delete operation with a timestamp before the operation will be deleted. +// Delete: Deletes a sink. If the sink has a unique writer_identity, then that +// service account is also deleted. // -// - logName: The resource name of the log to delete: -// projects/[PROJECT_ID]/logs/[LOG_ID] -// organizations/[ORGANIZATION_ID]/logs/[LOG_ID] -// billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID] -// folders/[FOLDER_ID]/logs/[LOG_ID][LOG_ID] must be URL-encoded. For -// example, "projects/my-project-id/logs/syslog", -// "organizations/123/logs/cloudaudit.googleapis.com%2Factivity".For more -// information about log names, see LogEntry. -func (r *OrganizationsLogsService) Delete(logName string) *OrganizationsLogsDeleteCall { - c := &OrganizationsLogsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.logName = logName +// - sinkName: The full resource name of the sink to delete, including the +// parent resource and the sink identifier: +// "projects/[PROJECT_ID]/sinks/[SINK_ID]" +// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" +// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For +// example:"projects/my-project/sinks/my-sink". +func (r *OrganizationsSinksService) Delete(sinkNameid string) *OrganizationsSinksDeleteCall { + c := &OrganizationsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLogsDeleteCall) Fields(s ...googleapi.Field) *OrganizationsLogsDeleteCall { +func (c *OrganizationsSinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsSinksDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsSinksDeleteCall) Context(ctx context.Context) *OrganizationsSinksDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsSinksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsSinksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + 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{ + "sinkName": c.sinkNameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.organizations.sinks.delete" call. +// 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 *OrganizationsSinksDeleteCall) 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 +} + +type OrganizationsSinksGetCall struct { + s *Service + sinkName string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a sink. +// +// - sinkName: The resource name of the sink: +// "projects/[PROJECT_ID]/sinks/[SINK_ID]" +// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" +// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For +// example:"projects/my-project/sinks/my-sink". +func (r *OrganizationsSinksService) Get(sinkName string) *OrganizationsSinksGetCall { + c := &OrganizationsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkName = sinkName + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OrganizationsSinksGetCall) Fields(s ...googleapi.Field) *OrganizationsSinksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *OrganizationsSinksGetCall) IfNoneMatch(entityTag string) *OrganizationsSinksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLogsDeleteCall) Context(ctx context.Context) *OrganizationsLogsDeleteCall { +func (c *OrganizationsSinksGetCall) Context(ctx context.Context) *OrganizationsSinksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLogsDeleteCall) Header() http.Header { +func (c *OrganizationsSinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLogsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSinksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+logName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "logName": c.logName, + "sinkName": c.sinkName, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.logs.delete" call. +// Do executes the "logging.organizations.sinks.get" call. // 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 +// *LogSink.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 *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *OrganizationsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25550,7 +27330,7 @@ func (c *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &LogSink{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25563,7 +27343,7 @@ func (c *OrganizationsLogsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, return ret, nil } -type OrganizationsLogsListCall struct { +type OrganizationsSinksListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -25572,23 +27352,35 @@ type OrganizationsLogsListCall struct { header_ http.Header } -// List: Lists the logs in projects, organizations, folders, or billing -// accounts. Only logs that have entries are listed. +// List: Lists sinks. // -// - parent: The resource name to list logs for: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]. -func (r *OrganizationsLogsService) List(parent string) *OrganizationsLogsListCall { - c := &OrganizationsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource whose sinks are to be listed: +// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". +func (r *OrganizationsSinksService) List(parent string) *OrganizationsSinksListCall { + c := &OrganizationsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// Filter sets the optional parameter "filter": A filter expression to +// constrain the sinks returned. Today, this only supports the following +// strings: ā€ 'in_scope("ALL")', 'in_scope("ANCESTOR")', +// 'in_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the +// sinks which can be returned in any other scope. ANCESTOR: Includes +// intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks +// owned by parent.When the empty string is provided, then the filter +// 'in_scope("DEFAULT")' is applied. +func (c *OrganizationsSinksListCall) Filter(filter string) *OrganizationsSinksListCall { + c.urlParams_.Set("filter", filter) + return c +} + // PageSize sets the optional parameter "pageSize": The maximum number of // results to return from this request. Non-positive values are ignored. The // presence of nextPageToken in the response indicates that more results might // be available. -func (c *OrganizationsLogsListCall) PageSize(pageSize int64) *OrganizationsLogsListCall { +func (c *OrganizationsSinksListCall) PageSize(pageSize int64) *OrganizationsSinksListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -25597,33 +27389,15 @@ func (c *OrganizationsLogsListCall) PageSize(pageSize int64) *OrganizationsLogsL // the next batch of results from the preceding call to this method. pageToken // must be the value of nextPageToken from the previous response. The values of // other method parameters should be identical to those in the previous call. -func (c *OrganizationsLogsListCall) PageToken(pageToken string) *OrganizationsLogsListCall { +func (c *OrganizationsSinksListCall) PageToken(pageToken string) *OrganizationsSinksListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ResourceNames sets the optional parameter "resourceNames": List of resource -// names to list logs for: -// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW -// _ID] -// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v -// iews/[VIEW_ID] -// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ -// ID]/views/[VIEW_ID] -// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I -// D]To support legacy queries, it could also be: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]The resource name in the parent field is added to this -// list. -func (c *OrganizationsLogsListCall) ResourceNames(resourceNames ...string) *OrganizationsLogsListCall { - c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsLogsListCall { +func (c *OrganizationsSinksListCall) Fields(s ...googleapi.Field) *OrganizationsSinksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25631,27 +27405,27 @@ func (c *OrganizationsLogsListCall) Fields(s ...googleapi.Field) *OrganizationsL // IfNoneMatch sets an 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. -func (c *OrganizationsLogsListCall) IfNoneMatch(entityTag string) *OrganizationsLogsListCall { +func (c *OrganizationsSinksListCall) IfNoneMatch(entityTag string) *OrganizationsSinksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsLogsListCall) Context(ctx context.Context) *OrganizationsLogsListCall { +func (c *OrganizationsSinksListCall) Context(ctx context.Context) *OrganizationsSinksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsLogsListCall) Header() http.Header { +func (c *OrganizationsSinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLogsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSinksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -25659,7 +27433,7 @@ func (c *OrganizationsLogsListCall) 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, "v2/{+parent}/logs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25672,13 +27446,13 @@ func (c *OrganizationsLogsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.logs.list" call. +// Do executes the "logging.organizations.sinks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListLogsResponse.ServerResponse.Header or (if a response was returned at +// *ListSinksResponse.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 *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) { +func (c *OrganizationsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25697,7 +27471,7 @@ func (c *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsR if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLogsResponse{ + ret := &ListSinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25713,7 +27487,7 @@ func (c *OrganizationsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsR // 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 *OrganizationsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { +func (c *OrganizationsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -25731,27 +27505,181 @@ func (c *OrganizationsLogsListCall) Pages(ctx context.Context, f func(*ListLogsR } } -type OrganizationsSinksCreateCall struct { +type OrganizationsSinksPatchCall struct { + s *Service + sinkNameid string + logsink *LogSink + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a sink. This method replaces the values of the destination +// and filter fields of the existing sink with the corresponding values from +// the new sink.The updated sink might also have a new writer_identity; see the +// unique_writer_identity field. +// +// - sinkName: The full resource name of the sink to update, including the +// parent resource and the sink identifier: +// "projects/[PROJECT_ID]/sinks/[SINK_ID]" +// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" +// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For +// example:"projects/my-project/sinks/my-sink". +func (r *OrganizationsSinksService) Patch(sinkNameid string, logsink *LogSink) *OrganizationsSinksPatchCall { + c := &OrganizationsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid + c.logsink = logsink + return c +} + +// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The +// service account provided by the caller that will be used to write the log +// entries. The format must be serviceAccount:some@email. This field can only +// be specified when you are routing logs to a log bucket that is in a +// different project than the sink. When not specified, a Logging service +// account will automatically be generated. +func (c *OrganizationsSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksPatchCall { + c.urlParams_.Set("customWriterIdentity", customWriterIdentity) + return c +} + +// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See +// sinks.create for a description of this field. When updating a sink, the +// effect of this field on the value of writer_identity in the updated sink +// depends on both the old and new values of this field: If the old and new +// values of this field are both false or both true, then there is no change to +// the sink's writer_identity. If the old value is false and the new value is +// true, then writer_identity is changed to a service agent +// (https://cloud.google.com/iam/docs/service-account-types#service-agents) +// owned by Cloud Logging. It is an error if the old value is true and the new +// value is set to false or defaulted to false. +func (c *OrganizationsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksPatchCall { + c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask that +// specifies the fields in sink that need an update. A sink field will be +// overwritten if, and only if, it is in the update mask. name and output only +// fields cannot be updated.An empty updateMask is temporarily treated as using +// the following mask for backwards compatibility +// purposes:destination,filter,includeChildrenAt some point in the future, +// behavior will be removed and specifying an empty updateMask will be an +// error.For a detailed FieldMask definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=filter +func (c *OrganizationsSinksPatchCall) UpdateMask(updateMask string) *OrganizationsSinksPatchCall { + 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 +// details. +func (c *OrganizationsSinksPatchCall) Fields(s ...googleapi.Field) *OrganizationsSinksPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsSinksPatchCall) Context(ctx context.Context) *OrganizationsSinksPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsSinksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsSinksPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + 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{ + "sinkName": c.sinkNameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "logging.organizations.sinks.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *LogSink.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 *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, 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 := &LogSink{ + 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 +} + +type OrganizationsSinksUpdateCall struct { s *Service - parent string + sinkNameid string logsink *LogSink urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a sink that exports specified log entries to a destination. -// The export begins upon ingress, unless the sink's writer_identity is not -// permitted to write to the destination. A sink can export log entries only -// from the resource owning the sink. +// Update: Updates a sink. This method replaces the values of the destination +// and filter fields of the existing sink with the corresponding values from +// the new sink.The updated sink might also have a new writer_identity; see the +// unique_writer_identity field. // -// - parent: The resource in which to create the sink: "projects/[PROJECT_ID]" -// "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" -// "folders/[FOLDER_ID]" For examples:"projects/my-project" -// "organizations/123456789". -func (r *OrganizationsSinksService) Create(parent string, logsink *LogSink) *OrganizationsSinksCreateCall { - c := &OrganizationsSinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - sinkName: The full resource name of the sink to update, including the +// parent resource and the sink identifier: +// "projects/[PROJECT_ID]/sinks/[SINK_ID]" +// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" +// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For +// example:"projects/my-project/sinks/my-sink". +func (r *OrganizationsSinksService) Update(sinkNameid string, logsink *LogSink) *OrganizationsSinksUpdateCall { + c := &OrganizationsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.sinkNameid = sinkNameid c.logsink = logsink return c } @@ -25762,52 +27690,65 @@ func (r *OrganizationsSinksService) Create(parent string, logsink *LogSink) *Org // be specified when you are routing logs to a log bucket that is in a // different project than the sink. When not specified, a Logging service // account will automatically be generated. -func (c *OrganizationsSinksCreateCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksCreateCall { +func (c *OrganizationsSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksUpdateCall { c.urlParams_.Set("customWriterIdentity", customWriterIdentity) return c } -// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": -// Determines the kind of IAM identity returned as writer_identity in the new -// sink. If this value is omitted or set to false, and if the sink's parent is -// a project, then the value returned as writer_identity is the same group or -// service account used by Cloud Logging before the addition of writer -// identities to this API. The sink's destination must be in the same project -// as the sink itself.If this field is set to true, or if the sink is owned by -// a non-project resource such as an organization, then the value of -// writer_identity will be a service agent +// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See +// sinks.create for a description of this field. When updating a sink, the +// effect of this field on the value of writer_identity in the updated sink +// depends on both the old and new values of this field: If the old and new +// values of this field are both false or both true, then there is no change to +// the sink's writer_identity. If the old value is false and the new value is +// true, then writer_identity is changed to a service agent // (https://cloud.google.com/iam/docs/service-account-types#service-agents) -// used by the sinks with the same parent. For more information, see -// writer_identity in LogSink. -func (c *OrganizationsSinksCreateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksCreateCall { +// owned by Cloud Logging. It is an error if the old value is true and the new +// value is set to false or defaulted to false. +func (c *OrganizationsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksUpdateCall { c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) return c } +// UpdateMask sets the optional parameter "updateMask": Field mask that +// specifies the fields in sink that need an update. A sink field will be +// overwritten if, and only if, it is in the update mask. name and output only +// fields cannot be updated.An empty updateMask is temporarily treated as using +// the following mask for backwards compatibility +// purposes:destination,filter,includeChildrenAt some point in the future, +// behavior will be removed and specifying an empty updateMask will be an +// error.For a detailed FieldMask definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=filter +func (c *OrganizationsSinksUpdateCall) UpdateMask(updateMask string) *OrganizationsSinksUpdateCall { + 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 // details. -func (c *OrganizationsSinksCreateCall) Fields(s ...googleapi.Field) *OrganizationsSinksCreateCall { +func (c *OrganizationsSinksUpdateCall) Fields(s ...googleapi.Field) *OrganizationsSinksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsSinksCreateCall) Context(ctx context.Context) *OrganizationsSinksCreateCall { +func (c *OrganizationsSinksUpdateCall) Context(ctx context.Context) *OrganizationsSinksUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsSinksCreateCall) Header() http.Header { +func (c *OrganizationsSinksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSinksCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsSinksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) @@ -25816,25 +27757,25 @@ func (c *OrganizationsSinksCreateCall) doRequest(alt string) (*http.Response, er } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "sinkName": c.sinkNameid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.sinks.create" call. +// Do executes the "logging.organizations.sinks.update" call. // Any non-2xx status code is an error. Response headers are in either // *LogSink.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 *OrganizationsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { +func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25866,77 +27807,96 @@ func (c *OrganizationsSinksCreateCall) Do(opts ...googleapi.CallOption) (*LogSin return ret, nil } -type OrganizationsSinksDeleteCall struct { - s *Service - sinkNameid string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsGetCmekSettingsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a sink. If the sink has a unique writer_identity, then that -// service account is also deleted. +// GetCmekSettings: Gets the Logging CMEK settings for the given resource.Note: +// CMEK for the Log Router can be configured for Google Cloud projects, +// folders, organizations, and billing accounts. Once configured for an +// organization, it applies to all projects and folders in the Google Cloud +// organization.See Enabling CMEK for Log Router +// (https://cloud.google.com/logging/docs/routing/managed-encryption) for more +// information. // -// - sinkName: The full resource name of the sink to delete, including the -// parent resource and the sink identifier: -// "projects/[PROJECT_ID]/sinks/[SINK_ID]" -// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" -// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For -// example:"projects/my-project/sinks/my-sink". -func (r *OrganizationsSinksService) Delete(sinkNameid string) *OrganizationsSinksDeleteCall { - c := &OrganizationsSinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sinkNameid = sinkNameid +// - name: The resource for which to retrieve CMEK settings. +// "projects/[PROJECT_ID]/cmekSettings" +// "organizations/[ORGANIZATION_ID]/cmekSettings" +// "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" +// "folders/[FOLDER_ID]/cmekSettings" For +// example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router +// can be configured for Google Cloud projects, folders, organizations, and +// billing accounts. Once configured for an organization, it applies to all +// projects and folders in the Google Cloud organization. +func (r *ProjectsService) GetCmekSettings(name string) *ProjectsGetCmekSettingsCall { + c := &ProjectsGetCmekSettingsCall{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 // details. -func (c *OrganizationsSinksDeleteCall) Fields(s ...googleapi.Field) *OrganizationsSinksDeleteCall { +func (c *ProjectsGetCmekSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetCmekSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsGetCmekSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetCmekSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsSinksDeleteCall) Context(ctx context.Context) *OrganizationsSinksDeleteCall { +func (c *ProjectsGetCmekSettingsCall) Context(ctx context.Context) *ProjectsGetCmekSettingsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsSinksDeleteCall) Header() http.Header { +func (c *ProjectsGetCmekSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSinksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+sinkName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "sinkName": c.sinkNameid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.sinks.delete" call. +// Do executes the "logging.projects.getCmekSettings" call. // 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 +// *CmekSettings.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 *OrganizationsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25955,7 +27915,7 @@ func (c *OrganizationsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &CmekSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25968,33 +27928,38 @@ func (c *OrganizationsSinksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, return ret, nil } -type OrganizationsSinksGetCall struct { +type ProjectsGetSettingsCall struct { s *Service - sinkName string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a sink. +// GetSettings: Gets the settings for the given resource.Note: Settings can be +// retrieved for Google Cloud projects, folders, organizations, and billing +// accounts.See View default resource settings for Logging +// (https://cloud.google.com/logging/docs/default-settings#view-org-settings) +// for more information. // -// - sinkName: The resource name of the sink: -// "projects/[PROJECT_ID]/sinks/[SINK_ID]" -// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" -// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For -// example:"projects/my-project/sinks/my-sink". -func (r *OrganizationsSinksService) Get(sinkName string) *OrganizationsSinksGetCall { - c := &OrganizationsSinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sinkName = sinkName +// - name: The resource for which to retrieve settings. +// "projects/[PROJECT_ID]/settings" +// "organizations/[ORGANIZATION_ID]/settings" +// "billingAccounts/[BILLING_ACCOUNT_ID]/settings" +// "folders/[FOLDER_ID]/settings" For +// example:"organizations/12345/settings"Note: Settings can be retrieved for +// Google Cloud projects, folders, organizations, and billing accounts. +func (r *ProjectsService) GetSettings(name string) *ProjectsGetSettingsCall { + c := &ProjectsGetSettingsCall{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 // details. -func (c *OrganizationsSinksGetCall) Fields(s ...googleapi.Field) *OrganizationsSinksGetCall { +func (c *ProjectsGetSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetSettingsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26002,27 +27967,27 @@ func (c *OrganizationsSinksGetCall) Fields(s ...googleapi.Field) *OrganizationsS // IfNoneMatch sets an 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. -func (c *OrganizationsSinksGetCall) IfNoneMatch(entityTag string) *OrganizationsSinksGetCall { +func (c *ProjectsGetSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetSettingsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsSinksGetCall) Context(ctx context.Context) *OrganizationsSinksGetCall { +func (c *ProjectsGetSettingsCall) Context(ctx context.Context) *ProjectsGetSettingsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsSinksGetCall) Header() http.Header { +func (c *ProjectsGetSettingsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSinksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsGetSettingsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -26030,7 +27995,7 @@ func (c *OrganizationsSinksGetCall) 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, "v2/{+sinkName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26038,17 +28003,17 @@ func (c *OrganizationsSinksGetCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "sinkName": c.sinkName, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.sinks.get" call. +// Do executes the "logging.projects.getSettings" call. // Any non-2xx status code is an error. Response headers are in either -// *LogSink.ServerResponse.Header or (if a response was returned at all) in +// *Settings.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 *OrganizationsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { +func (c *ProjectsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26067,7 +28032,7 @@ func (c *OrganizationsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogSink{ + ret := &Settings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26080,99 +28045,65 @@ func (c *OrganizationsSinksGetCall) Do(opts ...googleapi.CallOption) (*LogSink, return ret, nil } -type OrganizationsSinksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists sinks. -// -// - parent: The parent resource whose sinks are to be listed: -// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". -func (r *OrganizationsSinksService) List(parent string) *OrganizationsSinksListCall { - c := &OrganizationsSinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter expression to -// constrain the sinks returned. Today, this only supports the following -// strings: ā€ 'in_scope("ALL")', 'in_scope("ANCESTOR")', -// 'in_scope("DEFAULT")'.Description of scopes below. ALL: Includes all of the -// sinks which can be returned in any other scope. ANCESTOR: Includes -// intercepting sinks owned by ancestor resources. DEFAULT: Includes sinks -// owned by parent.When the empty string is provided, then the filter -// 'in_scope("DEFAULT")' is applied. -func (c *OrganizationsSinksListCall) Filter(filter string) *OrganizationsSinksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *OrganizationsSinksListCall) PageSize(pageSize int64) *OrganizationsSinksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *OrganizationsSinksListCall) PageToken(pageToken string) *OrganizationsSinksListCall { - c.urlParams_.Set("pageToken", pageToken) +type ProjectsExclusionsCreateCall struct { + s *Service + parent string + logexclusion *LogExclusion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new exclusion in the _Default sink in a specified parent +// resource. Only log entries belonging to that resource can be excluded. You +// can have up to 10 exclusions in a resource. +// +// - parent: The parent resource in which to create the exclusion: +// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For +// examples:"projects/my-logging-project" "organizations/123456789". +func (r *ProjectsExclusionsService) Create(parent string, logexclusion *LogExclusion) *ProjectsExclusionsCreateCall { + c := &ProjectsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logexclusion = logexclusion return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *OrganizationsSinksListCall) Fields(s ...googleapi.Field) *OrganizationsSinksListCall { +func (c *ProjectsExclusionsCreateCall) Fields(s ...googleapi.Field) *ProjectsExclusionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *OrganizationsSinksListCall) IfNoneMatch(entityTag string) *OrganizationsSinksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *OrganizationsSinksListCall) Context(ctx context.Context) *OrganizationsSinksListCall { +func (c *ProjectsExclusionsCreateCall) Context(ctx context.Context) *ProjectsExclusionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsSinksListCall) Header() http.Header { +func (c *ProjectsExclusionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSinksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/sinks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -26183,13 +28114,12 @@ func (c *OrganizationsSinksListCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.sinks.list" call. +// Do executes the "logging.projects.exclusions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *ListSinksResponse.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 *OrganizationsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSinksResponse, error) { +// *LogExclusion.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 *ProjectsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26208,7 +28138,7 @@ func (c *OrganizationsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSink if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListSinksResponse{ + ret := &LogExclusion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26221,147 +28151,75 @@ func (c *OrganizationsSinksListCall) Do(opts ...googleapi.CallOption) (*ListSink return ret, nil } -// 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 *OrganizationsSinksListCall) Pages(ctx context.Context, f func(*ListSinksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 OrganizationsSinksPatchCall struct { +type ProjectsExclusionsDeleteCall struct { s *Service - sinkNameid string - logsink *LogSink + name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a sink. This method replaces the values of the destination -// and filter fields of the existing sink with the corresponding values from -// the new sink.The updated sink might also have a new writer_identity; see the -// unique_writer_identity field. +// Delete: Deletes an exclusion in the _Default sink. // -// - sinkName: The full resource name of the sink to update, including the -// parent resource and the sink identifier: -// "projects/[PROJECT_ID]/sinks/[SINK_ID]" -// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" -// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For -// example:"projects/my-project/sinks/my-sink". -func (r *OrganizationsSinksService) Patch(sinkNameid string, logsink *LogSink) *OrganizationsSinksPatchCall { - c := &OrganizationsSinksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sinkNameid = sinkNameid - c.logsink = logsink - return c -} - -// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The -// service account provided by the caller that will be used to write the log -// entries. The format must be serviceAccount:some@email. This field can only -// be specified when you are routing logs to a log bucket that is in a -// different project than the sink. When not specified, a Logging service -// account will automatically be generated. -func (c *OrganizationsSinksPatchCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksPatchCall { - c.urlParams_.Set("customWriterIdentity", customWriterIdentity) - return c -} - -// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See -// sinks.create for a description of this field. When updating a sink, the -// effect of this field on the value of writer_identity in the updated sink -// depends on both the old and new values of this field: If the old and new -// values of this field are both false or both true, then there is no change to -// the sink's writer_identity. If the old value is false and the new value is -// true, then writer_identity is changed to a service agent -// (https://cloud.google.com/iam/docs/service-account-types#service-agents) -// owned by Cloud Logging. It is an error if the old value is true and the new -// value is set to false or defaulted to false. -func (c *OrganizationsSinksPatchCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksPatchCall { - c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask that -// specifies the fields in sink that need an update. A sink field will be -// overwritten if, and only if, it is in the update mask. name and output only -// fields cannot be updated.An empty updateMask is temporarily treated as using -// the following mask for backwards compatibility -// purposes:destination,filter,includeChildrenAt some point in the future, -// behavior will be removed and specifying an empty updateMask will be an -// error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=filter -func (c *OrganizationsSinksPatchCall) UpdateMask(updateMask string) *OrganizationsSinksPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - name: The resource name of an existing exclusion to delete: +// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" +// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" +// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For +// example:"projects/my-project/exclusions/my-exclusion". +func (r *ProjectsExclusionsService) Delete(name string) *ProjectsExclusionsDeleteCall { + c := &ProjectsExclusionsDeleteCall{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 // details. -func (c *OrganizationsSinksPatchCall) Fields(s ...googleapi.Field) *OrganizationsSinksPatchCall { +func (c *ProjectsExclusionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsExclusionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *OrganizationsSinksPatchCall) Context(ctx context.Context) *OrganizationsSinksPatchCall { +func (c *ProjectsExclusionsDeleteCall) Context(ctx context.Context) *ProjectsExclusionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsSinksPatchCall) Header() http.Header { +func (c *ProjectsExclusionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSinksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+sinkName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "sinkName": c.sinkNameid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.sinks.patch" call. +// Do executes the "logging.projects.exclusions.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *LogSink.ServerResponse.Header or (if a response was returned at all) in +// *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 *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { +func (c *ProjectsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26380,7 +28238,7 @@ func (c *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogSink{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26392,127 +28250,88 @@ func (c *OrganizationsSinksPatchCall) Do(opts ...googleapi.CallOption) (*LogSink } return ret, nil } - -type OrganizationsSinksUpdateCall struct { - s *Service - sinkNameid string - logsink *LogSink - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates a sink. This method replaces the values of the destination -// and filter fields of the existing sink with the corresponding values from -// the new sink.The updated sink might also have a new writer_identity; see the -// unique_writer_identity field. -// -// - sinkName: The full resource name of the sink to update, including the -// parent resource and the sink identifier: -// "projects/[PROJECT_ID]/sinks/[SINK_ID]" -// "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" -// "folders/[FOLDER_ID]/sinks/[SINK_ID]" For -// example:"projects/my-project/sinks/my-sink". -func (r *OrganizationsSinksService) Update(sinkNameid string, logsink *LogSink) *OrganizationsSinksUpdateCall { - c := &OrganizationsSinksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.sinkNameid = sinkNameid - c.logsink = logsink - return c -} - -// CustomWriterIdentity sets the optional parameter "customWriterIdentity": The -// service account provided by the caller that will be used to write the log -// entries. The format must be serviceAccount:some@email. This field can only -// be specified when you are routing logs to a log bucket that is in a -// different project than the sink. When not specified, a Logging service -// account will automatically be generated. -func (c *OrganizationsSinksUpdateCall) CustomWriterIdentity(customWriterIdentity string) *OrganizationsSinksUpdateCall { - c.urlParams_.Set("customWriterIdentity", customWriterIdentity) - return c -} - -// UniqueWriterIdentity sets the optional parameter "uniqueWriterIdentity": See -// sinks.create for a description of this field. When updating a sink, the -// effect of this field on the value of writer_identity in the updated sink -// depends on both the old and new values of this field: If the old and new -// values of this field are both false or both true, then there is no change to -// the sink's writer_identity. If the old value is false and the new value is -// true, then writer_identity is changed to a service agent -// (https://cloud.google.com/iam/docs/service-account-types#service-agents) -// owned by Cloud Logging. It is an error if the old value is true and the new -// value is set to false or defaulted to false. -func (c *OrganizationsSinksUpdateCall) UniqueWriterIdentity(uniqueWriterIdentity bool) *OrganizationsSinksUpdateCall { - c.urlParams_.Set("uniqueWriterIdentity", fmt.Sprint(uniqueWriterIdentity)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask that -// specifies the fields in sink that need an update. A sink field will be -// overwritten if, and only if, it is in the update mask. name and output only -// fields cannot be updated.An empty updateMask is temporarily treated as using -// the following mask for backwards compatibility -// purposes:destination,filter,includeChildrenAt some point in the future, -// behavior will be removed and specifying an empty updateMask will be an -// error.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=filter -func (c *OrganizationsSinksUpdateCall) UpdateMask(updateMask string) *OrganizationsSinksUpdateCall { - c.urlParams_.Set("updateMask", updateMask) + +type ProjectsExclusionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the description of an exclusion in the _Default sink. +// +// - name: The resource name of an existing exclusion: +// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" +// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" +// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For +// example:"projects/my-project/exclusions/my-exclusion". +func (r *ProjectsExclusionsService) Get(name string) *ProjectsExclusionsGetCall { + c := &ProjectsExclusionsGetCall{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 // details. -func (c *OrganizationsSinksUpdateCall) Fields(s ...googleapi.Field) *OrganizationsSinksUpdateCall { +func (c *ProjectsExclusionsGetCall) Fields(s ...googleapi.Field) *ProjectsExclusionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsExclusionsGetCall) IfNoneMatch(entityTag string) *ProjectsExclusionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *OrganizationsSinksUpdateCall) Context(ctx context.Context) *OrganizationsSinksUpdateCall { +func (c *ProjectsExclusionsGetCall) Context(ctx context.Context) *ProjectsExclusionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *OrganizationsSinksUpdateCall) Header() http.Header { +func (c *ProjectsExclusionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsSinksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logsink) - if err != nil { - return nil, err +func (c *ProjectsExclusionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+sinkName}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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{ - "sinkName": c.sinkNameid, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.organizations.sinks.update" call. +// Do executes the "logging.projects.exclusions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LogSink.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *LogExclusion.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 *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSink, error) { +func (c *ProjectsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26531,7 +28350,7 @@ func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogSink{ + ret := &LogExclusion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26544,42 +28363,48 @@ func (c *OrganizationsSinksUpdateCall) Do(opts ...googleapi.CallOption) (*LogSin return ret, nil } -type ProjectsGetCmekSettingsCall struct { +type ProjectsExclusionsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetCmekSettings: Gets the Logging CMEK settings for the given resource.Note: -// CMEK for the Log Router can be configured for Google Cloud projects, -// folders, organizations, and billing accounts. Once configured for an -// organization, it applies to all projects and folders in the Google Cloud -// organization.See Enabling CMEK for Log Router -// (https://cloud.google.com/logging/docs/routing/managed-encryption) for more -// information. +// List: Lists all the exclusions on the _Default sink in a parent resource. // -// - name: The resource for which to retrieve CMEK settings. -// "projects/[PROJECT_ID]/cmekSettings" -// "organizations/[ORGANIZATION_ID]/cmekSettings" -// "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" -// "folders/[FOLDER_ID]/cmekSettings" For -// example:"organizations/12345/cmekSettings"Note: CMEK for the Log Router -// can be configured for Google Cloud projects, folders, organizations, and -// billing accounts. Once configured for an organization, it applies to all -// projects and folders in the Google Cloud organization. -func (r *ProjectsService) GetCmekSettings(name string) *ProjectsGetCmekSettingsCall { - c := &ProjectsGetCmekSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource whose exclusions are to be listed. +// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". +func (r *ProjectsExclusionsService) List(parent string) *ProjectsExclusionsListCall { + c := &ProjectsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *ProjectsExclusionsListCall) PageSize(pageSize int64) *ProjectsExclusionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *ProjectsExclusionsListCall) PageToken(pageToken string) *ProjectsExclusionsListCall { + 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 // details. -func (c *ProjectsGetCmekSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetCmekSettingsCall { +func (c *ProjectsExclusionsListCall) Fields(s ...googleapi.Field) *ProjectsExclusionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26587,27 +28412,27 @@ func (c *ProjectsGetCmekSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetC // IfNoneMatch sets an 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. -func (c *ProjectsGetCmekSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetCmekSettingsCall { +func (c *ProjectsExclusionsListCall) IfNoneMatch(entityTag string) *ProjectsExclusionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCmekSettingsCall) Context(ctx context.Context) *ProjectsGetCmekSettingsCall { +func (c *ProjectsExclusionsListCall) Context(ctx context.Context) *ProjectsExclusionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsGetCmekSettingsCall) Header() http.Header { +func (c *ProjectsExclusionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetCmekSettingsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsExclusionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -26615,7 +28440,7 @@ func (c *ProjectsGetCmekSettingsCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/cmekSettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26623,17 +28448,18 @@ func (c *ProjectsGetCmekSettingsCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.getCmekSettings" call. +// Do executes the "logging.projects.exclusions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *CmekSettings.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 *ProjectsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSettings, error) { +// *ListExclusionsResponse.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 *ProjectsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26652,7 +28478,7 @@ func (c *ProjectsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSet if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CmekSettings{ + ret := &ListExclusionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26665,76 +28491,98 @@ func (c *ProjectsGetCmekSettingsCall) Do(opts ...googleapi.CallOption) (*CmekSet return ret, nil } -type ProjectsGetSettingsCall struct { +// 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 *ProjectsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsExclusionsPatchCall struct { s *Service name string + logexclusion *LogExclusion urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetSettings: Gets the settings for the given resource.Note: Settings can be -// retrieved for Google Cloud projects, folders, organizations, and billing -// accounts.See View default resource settings for Logging -// (https://cloud.google.com/logging/docs/default-settings#view-org-settings) -// for more information. +// Patch: Changes one or more properties of an existing exclusion in the +// _Default sink. // -// - name: The resource for which to retrieve settings. -// "projects/[PROJECT_ID]/settings" -// "organizations/[ORGANIZATION_ID]/settings" -// "billingAccounts/[BILLING_ACCOUNT_ID]/settings" -// "folders/[FOLDER_ID]/settings" For -// example:"organizations/12345/settings"Note: Settings can be retrieved for -// Google Cloud projects, folders, organizations, and billing accounts. -func (r *ProjectsService) GetSettings(name string) *ProjectsGetSettingsCall { - c := &ProjectsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the exclusion to update: +// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" +// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" +// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For +// example:"projects/my-project/exclusions/my-exclusion". +func (r *ProjectsExclusionsService) Patch(name string, logexclusion *LogExclusion) *ProjectsExclusionsPatchCall { + c := &ProjectsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.logexclusion = logexclusion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A non-empty +// list of fields to change in the existing exclusion. New values for the +// fields are taken from the corresponding fields in the LogExclusion included +// in this request. Fields not mentioned in update_mask are not changed and are +// ignored in the request.For example, to change the filter and description of +// an exclusion, specify an update_mask of "filter,description". +func (c *ProjectsExclusionsPatchCall) UpdateMask(updateMask string) *ProjectsExclusionsPatchCall { + 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 // details. -func (c *ProjectsGetSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetSettingsCall { +func (c *ProjectsExclusionsPatchCall) Fields(s ...googleapi.Field) *ProjectsExclusionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsGetSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetSettingsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetSettingsCall) Context(ctx context.Context) *ProjectsGetSettingsCall { +func (c *ProjectsExclusionsPatchCall) Context(ctx context.Context) *ProjectsExclusionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsGetSettingsCall) Header() http.Header { +func (c *ProjectsExclusionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetSettingsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/settings") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -26745,12 +28593,12 @@ func (c *ProjectsGetSettingsCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.getSettings" call. +// Do executes the "logging.projects.exclusions.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Settings.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *LogExclusion.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 *ProjectsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, error) { +func (c *ProjectsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26769,7 +28617,7 @@ func (c *ProjectsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Settings{ + ret := &LogExclusion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26782,81 +28630,82 @@ func (c *ProjectsGetSettingsCall) Do(opts ...googleapi.CallOption) (*Settings, e return ret, nil } -type ProjectsExclusionsCreateCall struct { +type ProjectsLocationsGetCall struct { s *Service - parent string - logexclusion *LogExclusion + name string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Create: Creates a new exclusion in the _Default sink in a specified parent -// resource. Only log entries belonging to that resource can be excluded. You -// can have up to 10 exclusions in a resource. +// Get: Gets information about a location. // -// - parent: The parent resource in which to create the exclusion: -// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For -// examples:"projects/my-logging-project" "organizations/123456789". -func (r *ProjectsExclusionsService) Create(parent string, logexclusion *LogExclusion) *ProjectsExclusionsCreateCall { - c := &ProjectsExclusionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.logexclusion = logexclusion +// - 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 // details. -func (c *ProjectsExclusionsCreateCall) Fields(s ...googleapi.Field) *ProjectsExclusionsCreateCall { +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +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. -func (c *ProjectsExclusionsCreateCall) Context(ctx context.Context) *ProjectsExclusionsCreateCall { +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsExclusionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsExclusionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion) - if err != nil { - return nil, err +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+parent}/exclusions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "logging.projects.exclusions.create" call. +// Do executes the "logging.projects.locations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LogExclusion.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *ProjectsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { +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 { @@ -26875,7 +28724,7 @@ func (c *ProjectsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogExclusion{ + ret := &Location{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26888,59 +28737,90 @@ func (c *ProjectsExclusionsCreateCall) Do(opts ...googleapi.CallOption) (*LogExc return ret, nil } -type ProjectsExclusionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an exclusion in the _Default sink. +// List: Lists information about the supported locations for this service. // -// - name: The resource name of an existing exclusion to delete: -// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" -// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" -// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For -// example:"projects/my-project/exclusions/my-exclusion". -func (r *ProjectsExclusionsService) Delete(name string) *ProjectsExclusionsDeleteCall { - c := &ProjectsExclusionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 // details. -func (c *ProjectsExclusionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsExclusionsDeleteCall { +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +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. -func (c *ProjectsExclusionsDeleteCall) Context(ctx context.Context) *ProjectsExclusionsDeleteCall { +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsExclusionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsExclusionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -26951,12 +28831,13 @@ func (c *ProjectsExclusionsDeleteCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.exclusions.delete" call. +// Do executes the "logging.projects.locations.list" call. // 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 *ProjectsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *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 { @@ -26975,7 +28856,7 @@ func (c *ProjectsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &ListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26988,87 +28869,109 @@ func (c *ProjectsExclusionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, return ret, nil } -type ProjectsExclusionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// 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")) + 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) + } } -// Get: Gets the description of an exclusion in the _Default sink. +type ProjectsLocationsBucketsCreateCall struct { + s *Service + parent string + logbucket *LogBucket + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a log bucket that can be used to store log entries. After a +// bucket has been created, the bucket's location cannot be changed. // -// - name: The resource name of an existing exclusion: -// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" -// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" -// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For -// example:"projects/my-project/exclusions/my-exclusion". -func (r *ProjectsExclusionsService) Get(name string) *ProjectsExclusionsGetCall { - c := &ProjectsExclusionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource in which to create the log bucket: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For +// example:"projects/my-project/locations/global". +func (r *ProjectsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *ProjectsLocationsBucketsCreateCall { + c := &ProjectsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logbucket = logbucket + return c +} + +// BucketId sets the optional parameter "bucketId": Required. A client-assigned +// identifier such as "my-bucket". Identifiers are limited to 100 characters +// and can include only letters, digits, underscores, hyphens, and periods. +// Bucket identifiers must start with an alphanumeric character. +func (c *ProjectsLocationsBucketsCreateCall) BucketId(bucketId string) *ProjectsLocationsBucketsCreateCall { + c.urlParams_.Set("bucketId", bucketId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsExclusionsGetCall) Fields(s ...googleapi.Field) *ProjectsExclusionsGetCall { +func (c *ProjectsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsExclusionsGetCall) IfNoneMatch(entityTag string) *ProjectsExclusionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsExclusionsGetCall) Context(ctx context.Context) *ProjectsExclusionsGetCall { +func (c *ProjectsLocationsBucketsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsExclusionsGetCall) Header() http.Header { +func (c *ProjectsLocationsBucketsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsExclusionsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.exclusions.get" call. +// Do executes the "logging.projects.locations.buckets.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LogExclusion.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *LogBucket.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 *ProjectsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { +func (c *ProjectsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27087,7 +28990,7 @@ func (c *ProjectsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclus if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogExclusion{ + ret := &LogBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27100,86 +29003,73 @@ func (c *ProjectsExclusionsGetCall) Do(opts ...googleapi.CallOption) (*LogExclus return ret, nil } -type ProjectsExclusionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the exclusions on the _Default sink in a parent resource. -// -// - parent: The parent resource whose exclusions are to be listed. -// "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]". -func (r *ProjectsExclusionsService) List(parent string) *ProjectsExclusionsListCall { - c := &ProjectsExclusionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c +type ProjectsLocationsBucketsCreateAsyncCall struct { + s *Service + parent string + logbucket *LogBucket + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *ProjectsExclusionsListCall) PageSize(pageSize int64) *ProjectsExclusionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// CreateAsync: Creates a log bucket asynchronously that can be used to store +// log entries.After a bucket has been created, the bucket's location cannot be +// changed. +// +// - parent: The resource in which to create the log bucket: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For +// example:"projects/my-project/locations/global". +func (r *ProjectsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *ProjectsLocationsBucketsCreateAsyncCall { + c := &ProjectsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logbucket = logbucket return c } -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *ProjectsExclusionsListCall) PageToken(pageToken string) *ProjectsExclusionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// BucketId sets the optional parameter "bucketId": Required. A client-assigned +// identifier such as "my-bucket". Identifiers are limited to 100 characters +// and can include only letters, digits, underscores, hyphens, and periods. +// Bucket identifiers must start with an alphanumeric character. +func (c *ProjectsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *ProjectsLocationsBucketsCreateAsyncCall { + c.urlParams_.Set("bucketId", bucketId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsExclusionsListCall) Fields(s ...googleapi.Field) *ProjectsExclusionsListCall { +func (c *ProjectsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsCreateAsyncCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsExclusionsListCall) IfNoneMatch(entityTag string) *ProjectsExclusionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsExclusionsListCall) Context(ctx context.Context) *ProjectsExclusionsListCall { +func (c *ProjectsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *ProjectsLocationsBucketsCreateAsyncCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsExclusionsListCall) Header() http.Header { +func (c *ProjectsLocationsBucketsCreateAsyncCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsExclusionsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/exclusions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -27190,13 +29080,12 @@ func (c *ProjectsExclusionsListCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.exclusions.list" call. +// Do executes the "logging.projects.locations.buckets.createAsync" call. // Any non-2xx status code is an error. Response headers are in either -// *ListExclusionsResponse.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 *ProjectsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExclusionsResponse, error) { +// *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 *ProjectsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27215,7 +29104,7 @@ func (c *ProjectsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExcl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListExclusionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27228,98 +29117,62 @@ func (c *ProjectsExclusionsListCall) Do(opts ...googleapi.CallOption) (*ListExcl return ret, nil } -// 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 *ProjectsExclusionsListCall) Pages(ctx context.Context, f func(*ListExclusionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProjectsExclusionsPatchCall struct { - s *Service - name string - logexclusion *LogExclusion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Changes one or more properties of an existing exclusion in the -// _Default sink. +// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the +// DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log +// entries in the bucket will be permanently deleted. // -// - name: The resource name of the exclusion to update: -// "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" -// "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" -// "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" For -// example:"projects/my-project/exclusions/my-exclusion". -func (r *ProjectsExclusionsService) Patch(name string, logexclusion *LogExclusion) *ProjectsExclusionsPatchCall { - c := &ProjectsExclusionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the bucket to delete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *ProjectsLocationsBucketsService) Delete(name string) *ProjectsLocationsBucketsDeleteCall { + c := &ProjectsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.logexclusion = logexclusion - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. A non-empty -// list of fields to change in the existing exclusion. New values for the -// fields are taken from the corresponding fields in the LogExclusion included -// in this request. Fields not mentioned in update_mask are not changed and are -// ignored in the request.For example, to change the filter and description of -// an exclusion, specify an update_mask of "filter,description". -func (c *ProjectsExclusionsPatchCall) UpdateMask(updateMask string) *ProjectsExclusionsPatchCall { - 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 // details. -func (c *ProjectsExclusionsPatchCall) Fields(s ...googleapi.Field) *ProjectsExclusionsPatchCall { +func (c *ProjectsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsExclusionsPatchCall) Context(ctx context.Context) *ProjectsExclusionsPatchCall { +func (c *ProjectsLocationsBucketsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsExclusionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsBucketsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsExclusionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logexclusion) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -27330,12 +29183,12 @@ func (c *ProjectsExclusionsPatchCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.exclusions.patch" call. +// Do executes the "logging.projects.locations.buckets.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *LogExclusion.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *ProjectsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExclusion, error) { +func (c *ProjectsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27354,7 +29207,7 @@ func (c *ProjectsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExcl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogExclusion{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27367,7 +29220,7 @@ func (c *ProjectsExclusionsPatchCall) Do(opts ...googleapi.CallOption) (*LogExcl return ret, nil } -type ProjectsLocationsGetCall struct { +type ProjectsLocationsBucketsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27376,11 +29229,17 @@ type ProjectsLocationsGetCall struct { header_ http.Header } -// Get: Gets information about a location. +// Get: Gets a log bucket. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the bucket: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *ProjectsLocationsBucketsService) Get(name string) *ProjectsLocationsBucketsGetCall { + c := &ProjectsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27388,7 +29247,7 @@ func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27396,27 +29255,27 @@ func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocatio // IfNoneMatch sets an 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. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsBucketsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *ProjectsLocationsBucketsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27437,12 +29296,12 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.get" call. +// Do executes the "logging.projects.locations.buckets.get" call. // 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 +// *LogBucket.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) { +func (c *ProjectsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27461,7 +29320,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Location{ + ret := &LogBucket{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27474,44 +29333,44 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, return ret, nil } -type ProjectsLocationsListCall struct { +type ProjectsLocationsBucketsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists information about the supported locations for this service. +// List: Lists log buckets. // -// - 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) +// - parent: The parent resource whose buckets are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion +// of the resource must be specified, but supplying the character - in place +// of LOCATION_ID will return all buckets. +func (r *ProjectsLocationsBucketsService) List(parent string) *ProjectsLocationsBucketsListCall { + c := &ProjectsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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 { +// results to return from this request. Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *ProjectsLocationsBucketsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token received -// from the next_page_token field in the response. Send that page token to -// receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *ProjectsLocationsBucketsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -27519,7 +29378,7 @@ func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *ProjectsLocationsBucketsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27527,27 +29386,27 @@ func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocati // IfNoneMatch sets an 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. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { +func (c *ProjectsLocationsBucketsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *ProjectsLocationsBucketsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsBucketsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27555,7 +29414,7 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27563,18 +29422,18 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.list" call. +// Do executes the "logging.projects.locations.buckets.list" call. // 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 +// *ListBucketsResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { +func (c *ProjectsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27593,7 +29452,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLocationsResponse{ + ret := &ListBucketsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27609,7 +29468,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { +func (c *ProjectsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -27627,61 +29486,68 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } -type ProjectsLocationsBucketsCreateCall struct { +type ProjectsLocationsBucketsPatchCall struct { s *Service - parent string + name string logbucket *LogBucket urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a log bucket that can be used to store log entries. After a -// bucket has been created, the bucket's location cannot be changed. +// Patch: Updates a log bucket.If the bucket has a lifecycle_state of +// DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket +// has been created, the bucket's location cannot be changed. // -// - parent: The resource in which to create the log bucket: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For -// example:"projects/my-project/locations/global". -func (r *ProjectsLocationsBucketsService) Create(parent string, logbucket *LogBucket) *ProjectsLocationsBucketsCreateCall { - c := &ProjectsLocationsBucketsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The full resource name of the bucket to update. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *ProjectsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *ProjectsLocationsBucketsPatchCall { + c := &ProjectsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.logbucket = logbucket return c } -// BucketId sets the optional parameter "bucketId": Required. A client-assigned -// identifier such as "my-bucket". Identifiers are limited to 100 characters -// and can include only letters, digits, underscores, hyphens, and periods. -// Bucket identifiers must start with an alphanumeric character. -func (c *ProjectsLocationsBucketsCreateCall) BucketId(bucketId string) *ProjectsLocationsBucketsCreateCall { - c.urlParams_.Set("bucketId", bucketId) +// UpdateMask sets the optional parameter "updateMask": Required. Field mask +// that specifies the fields in bucket that need an update. A bucket field will +// be overwritten if, and only if, it is in the update mask. name and output +// only fields cannot be updated.For a detailed FieldMask definition, see: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=retention_days +func (c *ProjectsLocationsBucketsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsPatchCall { + 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 // details. -func (c *ProjectsLocationsBucketsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsCreateCall { +func (c *ProjectsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsCreateCall { +func (c *ProjectsLocationsBucketsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsCreateCall) Header() http.Header { +func (c *ProjectsLocationsBucketsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) @@ -27690,25 +29556,25 @@ func (c *ProjectsLocationsBucketsCreateCall) doRequest(alt string) (*http.Respon } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", 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 "logging.projects.locations.buckets.create" call. +// Do executes the "logging.projects.locations.buckets.patch" call. // Any non-2xx status code is an error. Response headers are in either // *LogBucket.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 *ProjectsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { +func (c *ProjectsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27740,71 +29606,65 @@ func (c *ProjectsLocationsBucketsCreateCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsBucketsCreateAsyncCall struct { - s *Service - parent string - logbucket *LogBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsUndeleteCall struct { + s *Service + name string + undeletebucketrequest *UndeleteBucketRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CreateAsync: Creates a log bucket asynchronously that can be used to store -// log entries.After a bucket has been created, the bucket's location cannot be -// changed. +// Undelete: Undeletes a log bucket. A bucket that has been deleted can be +// undeleted within the grace period of 7 days. // -// - parent: The resource in which to create the log bucket: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For -// example:"projects/my-project/locations/global". -func (r *ProjectsLocationsBucketsService) CreateAsync(parent string, logbucket *LogBucket) *ProjectsLocationsBucketsCreateAsyncCall { - c := &ProjectsLocationsBucketsCreateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.logbucket = logbucket - return c -} - -// BucketId sets the optional parameter "bucketId": Required. A client-assigned -// identifier such as "my-bucket". Identifiers are limited to 100 characters -// and can include only letters, digits, underscores, hyphens, and periods. -// Bucket identifiers must start with an alphanumeric character. -func (c *ProjectsLocationsBucketsCreateAsyncCall) BucketId(bucketId string) *ProjectsLocationsBucketsCreateAsyncCall { - c.urlParams_.Set("bucketId", bucketId) +// - name: The full resource name of the bucket to undelete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// For example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *ProjectsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *ProjectsLocationsBucketsUndeleteCall { + c := &ProjectsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.undeletebucketrequest = undeletebucketrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBucketsCreateAsyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsCreateAsyncCall { +func (c *ProjectsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsUndeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsCreateAsyncCall) Context(ctx context.Context) *ProjectsLocationsBucketsCreateAsyncCall { +func (c *ProjectsLocationsBucketsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsUndeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsCreateAsyncCall) Header() http.Header { +func (c *ProjectsLocationsBucketsUndeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/buckets:createAsync") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:undelete") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27812,17 +29672,17 @@ func (c *ProjectsLocationsBucketsCreateAsyncCall) doRequest(alt string) (*http.R } 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 "logging.projects.locations.buckets.createAsync" call. +// Do executes the "logging.projects.locations.buckets.undelete" call. // 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 +// *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 *ProjectsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27841,7 +29701,7 @@ func (c *ProjectsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27854,62 +29714,80 @@ func (c *ProjectsLocationsBucketsCreateAsyncCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsBucketsDeleteCall struct { +type ProjectsLocationsBucketsUpdateAsyncCall struct { s *Service name string + logbucket *LogBucket urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a log bucket.Changes the bucket's lifecycle_state to the -// DELETE_REQUESTED state. After 7 days, the bucket will be purged and all log -// entries in the bucket will be permanently deleted. +// UpdateAsync: Updates a log bucket asynchronously.If the bucket has a +// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be +// returned.After a bucket has been created, the bucket's location cannot be +// changed. // -// - name: The full resource name of the bucket to delete. +// - name: The full resource name of the bucket to update. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID // ]" // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK // ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *ProjectsLocationsBucketsService) Delete(name string) *ProjectsLocationsBucketsDeleteCall { - c := &ProjectsLocationsBucketsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *ProjectsLocationsBucketsUpdateAsyncCall { + c := &ProjectsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.logbucket = logbucket + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field mask +// that specifies the fields in bucket that need an update. A bucket field will +// be overwritten if, and only if, it is in the update mask. name and output +// only fields cannot be updated.For a detailed FieldMask definition, see: +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=retention_days +func (c *ProjectsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsUpdateAsyncCall { + 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 // details. -func (c *ProjectsLocationsBucketsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsDeleteCall { +func (c *ProjectsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsUpdateAsyncCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsDeleteCall { +func (c *ProjectsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *ProjectsLocationsBucketsUpdateAsyncCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsBucketsUpdateAsyncCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -27920,12 +29798,12 @@ func (c *ProjectsLocationsBucketsDeleteCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.delete" call. +// Do executes the "logging.projects.locations.buckets.updateAsync" call. // 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 +// *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 *ProjectsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27944,7 +29822,7 @@ func (c *ProjectsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27957,88 +29835,91 @@ func (c *ProjectsLocationsBucketsDeleteCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsBucketsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsLinksCreateCall struct { + s *Service + parent string + link *Link + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a log bucket. +// Create: Asynchronously creates a linked dataset in BigQuery which makes it +// possible to use BigQuery to read the logs stored in the log bucket. A log +// bucket may currently only contain one link. // -// - name: The resource name of the bucket: +// - parent: The full resource name of the bucket to create a link for. // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID // ]" // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *ProjectsLocationsBucketsService) Get(name string) *ProjectsLocationsBucketsGetCall { - c := &ProjectsLocationsBucketsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". +func (r *ProjectsLocationsBucketsLinksService) Create(parent string, link *Link) *ProjectsLocationsBucketsLinksCreateCall { + c := &ProjectsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.link = link + return c +} + +// LinkId sets the optional parameter "linkId": Required. The ID to use for the +// link. The link_id can have up to 100 characters. A valid link_id must only +// have alphanumeric characters and underscores within it. +func (c *ProjectsLocationsBucketsLinksCreateCall) LinkId(linkId string) *ProjectsLocationsBucketsLinksCreateCall { + c.urlParams_.Set("linkId", linkId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBucketsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsGetCall { +func (c *ProjectsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsBucketsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsGetCall { +func (c *ProjectsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsGetCall) Header() http.Header { +func (c *ProjectsLocationsBucketsLinksCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ProjectsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.link) + if err != nil { + return nil, err } - var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.get" call. +// Do executes the "logging.projects.locations.buckets.links.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LogBucket.ServerResponse.Header or (if a response was returned at all) in +// *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 *ProjectsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { +func (c *ProjectsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28057,7 +29938,7 @@ func (c *ProjectsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*Log if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogBucket{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28070,107 +29951,79 @@ func (c *ProjectsLocationsBucketsGetCall) Do(opts ...googleapi.CallOption) (*Log return ret, nil } -type ProjectsLocationsBucketsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsLinksDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists log buckets. +// Delete: Deletes a link. This will also delete the corresponding BigQuery +// linked dataset. // -// - parent: The parent resource whose buckets are to be listed: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]" Note: The locations portion -// of the resource must be specified, but supplying the character - in place -// of LOCATION_ID will return all buckets. -func (r *ProjectsLocationsBucketsService) List(parent string) *ProjectsLocationsBucketsListCall { - c := &ProjectsLocationsBucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The -// presence of nextPageToken in the response indicates that more results might -// be available. -func (c *ProjectsLocationsBucketsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": If present, then retrieve -// the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. The values of -// other method parameters should be identical to those in the previous call. -func (c *ProjectsLocationsBucketsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The full resource name of the link to delete. +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L +// INK_ID]" +// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID +// ]/links/[LINK_ID]" +// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK +// ET_ID]/links/[LINK_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN +// K_ID]". +func (r *ProjectsLocationsBucketsLinksService) Delete(name string) *ProjectsLocationsBucketsLinksDeleteCall { + c := &ProjectsLocationsBucketsLinksDeleteCall{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 // details. -func (c *ProjectsLocationsBucketsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsListCall { +func (c *ProjectsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsBucketsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsListCall { +func (c *ProjectsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsListCall) Header() http.Header { +func (c *ProjectsLocationsBucketsLinksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - 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, "v2/{+parent}/buckets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.list" call. +// Do executes the "logging.projects.locations.buckets.links.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *ListBucketsResponse.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 *ProjectsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*ListBucketsResponse, error) { +// *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 *ProjectsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28189,7 +30042,7 @@ func (c *ProjectsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*Li if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListBucketsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28202,100 +30055,74 @@ func (c *ProjectsLocationsBucketsListCall) Do(opts ...googleapi.CallOption) (*Li return ret, nil } -// 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 *ProjectsLocationsBucketsListCall) Pages(ctx context.Context, f func(*ListBucketsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - 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 ProjectsLocationsBucketsPatchCall struct { - s *Service - name string - logbucket *LogBucket - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsLinksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a log bucket.If the bucket has a lifecycle_state of -// DELETE_REQUESTED, then FAILED_PRECONDITION will be returned.After a bucket -// has been created, the bucket's location cannot be changed. +// Get: Gets a link. // -// - name: The full resource name of the bucket to update. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" +// - name: The resource name of the link: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L +// INK_ID]" // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" +// ]/links/[LINK_ID]" // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *ProjectsLocationsBucketsService) Patch(name string, logbucket *LogBucket) *ProjectsLocationsBucketsPatchCall { - c := &ProjectsLocationsBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ET_ID]/links/[LINK_ID]" +// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN +// K_ID]". +func (r *ProjectsLocationsBucketsLinksService) Get(name string) *ProjectsLocationsBucketsLinksGetCall { + c := &ProjectsLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.logbucket = logbucket - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Field mask -// that specifies the fields in bucket that need an update. A bucket field will -// be overwritten if, and only if, it is in the update mask. name and output -// only fields cannot be updated.For a detailed FieldMask definition, see: -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=retention_days -func (c *ProjectsLocationsBucketsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsPatchCall { - 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 // details. -func (c *ProjectsLocationsBucketsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsPatchCall { +func (c *ProjectsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsLinksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsPatchCall { +func (c *ProjectsLocationsBucketsLinksGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsPatchCall) Header() http.Header { +func (c *ProjectsLocationsBucketsLinksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) - if err != nil { - return nil, err +func (c *ProjectsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -28306,12 +30133,12 @@ func (c *ProjectsLocationsBucketsPatchCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.patch" call. +// Do executes the "logging.projects.locations.buckets.links.get" call. // Any non-2xx status code is an error. Response headers are in either -// *LogBucket.ServerResponse.Header or (if a response was returned at all) in +// *Link.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 *ProjectsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*LogBucket, error) { +func (c *ProjectsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28330,7 +30157,7 @@ func (c *ProjectsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*L if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogBucket{ + ret := &Link{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28343,83 +30170,103 @@ func (c *ProjectsLocationsBucketsPatchCall) Do(opts ...googleapi.CallOption) (*L return ret, nil } -type ProjectsLocationsBucketsUndeleteCall struct { - s *Service - name string - undeletebucketrequest *UndeleteBucketRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsLinksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Undelete: Undeletes a log bucket. A bucket that has been deleted can be -// undeleted within the grace period of 7 days. +// List: Lists links. // -// - name: The full resource name of the bucket to undelete. +// - parent: The parent resource whose links are to be listed: // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" // "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID // ]" // "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *ProjectsLocationsBucketsService) Undelete(name string, undeletebucketrequest *UndeleteBucketRequest) *ProjectsLocationsBucketsUndeleteCall { - c := &ProjectsLocationsBucketsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.undeletebucketrequest = undeletebucketrequest +// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". +func (r *ProjectsLocationsBucketsLinksService) List(parent string) *ProjectsLocationsBucketsLinksListCall { + c := &ProjectsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return from this request. +func (c *ProjectsLocationsBucketsLinksListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsLinksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, then retrieve +// the next batch of results from the preceding call to this method. pageToken +// must be the value of nextPageToken from the previous response. +func (c *ProjectsLocationsBucketsLinksListCall) PageToken(pageToken string) *ProjectsLocationsBucketsLinksListCall { + 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 // details. -func (c *ProjectsLocationsBucketsUndeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsUndeleteCall { +func (c *ProjectsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsLinksListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsUndeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsUndeleteCall { +func (c *ProjectsLocationsBucketsLinksListCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsUndeleteCall) Header() http.Header { +func (c *ProjectsLocationsBucketsLinksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsUndeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletebucketrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}:undelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.undelete" call. +// Do executes the "logging.projects.locations.buckets.links.list" call. // 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 *ProjectsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// *ListLinksResponse.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 *ProjectsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28438,7 +30285,7 @@ func (c *ProjectsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &ListLinksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28451,78 +30298,90 @@ func (c *ProjectsLocationsBucketsUndeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsBucketsUpdateAsyncCall struct { +// 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 *ProjectsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsBucketsViewsCreateCall struct { s *Service - name string - logbucket *LogBucket + parent string + logview *LogView urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// UpdateAsync: Updates a log bucket asynchronously.If the bucket has a -// lifecycle_state of DELETE_REQUESTED, then FAILED_PRECONDITION will be -// returned.After a bucket has been created, the bucket's location cannot be -// changed. +// Create: Creates a view over log entries in a log bucket. A bucket may +// contain a maximum of 30 views. // -// - name: The full resource name of the bucket to update. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// For example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *ProjectsLocationsBucketsService) UpdateAsync(name string, logbucket *LogBucket) *ProjectsLocationsBucketsUpdateAsyncCall { - c := &ProjectsLocationsBucketsUpdateAsyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.logbucket = logbucket +// - parent: The bucket in which to create the view +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket". +func (r *ProjectsLocationsBucketsViewsService) Create(parent string, logview *LogView) *ProjectsLocationsBucketsViewsCreateCall { + c := &ProjectsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logview = logview return c } -// UpdateMask sets the optional parameter "updateMask": Required. Field mask -// that specifies the fields in bucket that need an update. A bucket field will -// be overwritten if, and only if, it is in the update mask. name and output -// only fields cannot be updated.For a detailed FieldMask definition, see: -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=retention_days -func (c *ProjectsLocationsBucketsUpdateAsyncCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsUpdateAsyncCall { - c.urlParams_.Set("updateMask", updateMask) +// ViewId sets the optional parameter "viewId": Required. A client-assigned +// identifier such as "my-view". Identifiers are limited to 100 characters and +// can include only letters, digits, underscores, hyphens, and periods. +func (c *ProjectsLocationsBucketsViewsCreateCall) ViewId(viewId string) *ProjectsLocationsBucketsViewsCreateCall { + c.urlParams_.Set("viewId", viewId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBucketsUpdateAsyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsUpdateAsyncCall { +func (c *ProjectsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsUpdateAsyncCall) Context(ctx context.Context) *ProjectsLocationsBucketsUpdateAsyncCall { +func (c *ProjectsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsUpdateAsyncCall) Header() http.Header { +func (c *ProjectsLocationsBucketsViewsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logbucket) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:updateAsync") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28530,17 +30389,17 @@ func (c *ProjectsLocationsBucketsUpdateAsyncCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.updateAsync" call. +// Do executes the "logging.projects.locations.buckets.views.create" call. // 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 +// *LogView.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 *ProjectsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28559,7 +30418,7 @@ func (c *ProjectsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &LogView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28572,91 +30431,76 @@ func (c *ProjectsLocationsBucketsUpdateAsyncCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsBucketsLinksCreateCall struct { +type ProjectsLocationsBucketsViewsDeleteCall struct { s *Service - parent string - link *Link + name string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Asynchronously creates a linked dataset in BigQuery which makes it -// possible to use BigQuery to read the logs stored in the log bucket. A log -// bucket may currently only contain one link. +// Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned, +// this indicates that system is not in a state where it can delete the view. +// If this occurs, please try again in a few minutes. // -// - parent: The full resource name of the bucket to create a link for. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". -func (r *ProjectsLocationsBucketsLinksService) Create(parent string, link *Link) *ProjectsLocationsBucketsLinksCreateCall { - c := &ProjectsLocationsBucketsLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.link = link - return c -} - -// LinkId sets the optional parameter "linkId": Required. The ID to use for the -// link. The link_id can have up to 100 characters. A valid link_id must only -// have alphanumeric characters and underscores within it. -func (c *ProjectsLocationsBucketsLinksCreateCall) LinkId(linkId string) *ProjectsLocationsBucketsLinksCreateCall { - c.urlParams_.Set("linkId", linkId) +// - name: The full resource name of the view to delete: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V +// IEW_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi +// ew". +func (r *ProjectsLocationsBucketsViewsService) Delete(name string) *ProjectsLocationsBucketsViewsDeleteCall { + c := &ProjectsLocationsBucketsViewsDeleteCall{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 // details. -func (c *ProjectsLocationsBucketsLinksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksCreateCall { +func (c *ProjectsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsLinksCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksCreateCall { +func (c *ProjectsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsLinksCreateCall) Header() http.Header { +func (c *ProjectsLocationsBucketsViewsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsLinksCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.link) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.links.create" call. +// Do executes the "logging.projects.locations.buckets.views.delete" call. // 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 +// *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 *ProjectsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28675,7 +30519,7 @@ func (c *ProjectsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28688,28 +30532,24 @@ func (c *ProjectsLocationsBucketsLinksCreateCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsBucketsLinksDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsViewsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a link. This will also delete the corresponding BigQuery -// linked dataset. +// Get: Gets a view on a log bucket. // -// - name: The full resource name of the link to delete. -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L -// INK_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]/links/[LINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]/links/[LINK_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN -// K_ID]". -func (r *ProjectsLocationsBucketsLinksService) Delete(name string) *ProjectsLocationsBucketsLinksDeleteCall { - c := &ProjectsLocationsBucketsLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the policy: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V +// IEW_ID]" For +// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi +// ew". +func (r *ProjectsLocationsBucketsViewsService) Get(name string) *ProjectsLocationsBucketsViewsGetCall { + c := &ProjectsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -28717,34 +30557,45 @@ func (r *ProjectsLocationsBucketsLinksService) Delete(name string) *ProjectsLoca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBucketsLinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksDeleteCall { +func (c *ProjectsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsLinksDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksDeleteCall { +func (c *ProjectsLocationsBucketsViewsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsLinksDeleteCall) Header() http.Header { +func (c *ProjectsLocationsBucketsViewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -28755,12 +30606,12 @@ func (c *ProjectsLocationsBucketsLinksDeleteCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.links.delete" call. +// Do executes the "logging.projects.locations.buckets.views.get" call. // 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 +// *LogView.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 *ProjectsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28779,7 +30630,7 @@ func (c *ProjectsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &LogView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28792,90 +30643,79 @@ func (c *ProjectsLocationsBucketsLinksDeleteCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsBucketsLinksGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsViewsGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a link. +// GetIamPolicy: Gets the access control policy for a resource. Returns an +// empty policy if the resource exists and does not have a policy set. // -// - name: The resource name of the link: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[L -// INK_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]/links/[LINK_ID]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]/links/[LINK_ID]" -// "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LIN -// K_ID]". -func (r *ProjectsLocationsBucketsLinksService) Get(name string) *ProjectsLocationsBucketsLinksGetCall { - c := &ProjectsLocationsBucketsLinksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsBucketsViewsGetIamPolicyCall { + c := &ProjectsLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBucketsLinksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksGetCall { +func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsBucketsLinksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsLinksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsLinksGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksGetCall { +func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsLinksGetCall) Header() http.Header { +func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsLinksGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.links.get" call. +// Do executes the "logging.projects.locations.buckets.views.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Link.ServerResponse.Header or (if a response was returned at all) in +// *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 *ProjectsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) (*Link, error) { +func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28894,7 +30734,7 @@ func (c *ProjectsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Link{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28907,7 +30747,7 @@ func (c *ProjectsLocationsBucketsLinksGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsBucketsLinksListCall struct { +type ProjectsLocationsBucketsViewsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -28916,31 +30756,30 @@ type ProjectsLocationsBucketsLinksListCall struct { header_ http.Header } -// List: Lists links. +// List: Lists views on a log bucket. // -// - parent: The parent resource whose links are to be listed: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" -// "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID -// ]" -// "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCK -// ET_ID]" "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". -func (r *ProjectsLocationsBucketsLinksService) List(parent string) *ProjectsLocationsBucketsLinksListCall { - c := &ProjectsLocationsBucketsLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The bucket whose views are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". +func (r *ProjectsLocationsBucketsViewsService) List(parent string) *ProjectsLocationsBucketsViewsListCall { + c := &ProjectsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. -func (c *ProjectsLocationsBucketsLinksListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsLinksListCall { +// results to return from this request.Non-positive values are ignored. The +// presence of nextPageToken in the response indicates that more results might +// be available. +func (c *ProjectsLocationsBucketsViewsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsViewsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": If present, then retrieve // the next batch of results from the preceding call to this method. pageToken -// must be the value of nextPageToken from the previous response. -func (c *ProjectsLocationsBucketsLinksListCall) PageToken(pageToken string) *ProjectsLocationsBucketsLinksListCall { +// must be the value of nextPageToken from the previous response. The values of +// other method parameters should be identical to those in the previous call. +func (c *ProjectsLocationsBucketsViewsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsViewsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28948,7 +30787,7 @@ func (c *ProjectsLocationsBucketsLinksListCall) PageToken(pageToken string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsLinksListCall { +func (c *ProjectsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28956,27 +30795,27 @@ func (c *ProjectsLocationsBucketsLinksListCall) Fields(s ...googleapi.Field) *Pr // IfNoneMatch sets an 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. -func (c *ProjectsLocationsBucketsLinksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsLinksListCall { +func (c *ProjectsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsLinksListCall) Context(ctx context.Context) *ProjectsLocationsBucketsLinksListCall { +func (c *ProjectsLocationsBucketsViewsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsLinksListCall) Header() http.Header { +func (c *ProjectsLocationsBucketsViewsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28984,7 +30823,7 @@ func (c *ProjectsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/links") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28997,13 +30836,13 @@ func (c *ProjectsLocationsBucketsLinksListCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.links.list" call. +// Do executes the "logging.projects.locations.buckets.views.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListLinksResponse.ServerResponse.Header or (if a response was returned at +// *ListViewsResponse.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 *ProjectsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) (*ListLinksResponse, error) { +func (c *ProjectsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29022,7 +30861,7 @@ func (c *ProjectsLocationsBucketsLinksListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLinksResponse{ + ret := &ListViewsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29038,7 +30877,7 @@ func (c *ProjectsLocationsBucketsLinksListCall) 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 *ProjectsLocationsBucketsLinksListCall) Pages(ctx context.Context, f func(*ListLinksResponse) error) error { +func (c *ProjectsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -29056,172 +30895,79 @@ func (c *ProjectsLocationsBucketsLinksListCall) Pages(ctx context.Context, f fun } } -type ProjectsLocationsBucketsViewsCreateCall struct { - s *Service - parent string - logview *LogView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a view over log entries in a log bucket. A bucket may -// contain a maximum of 30 views. -// -// - parent: The bucket in which to create the view -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket". -func (r *ProjectsLocationsBucketsViewsService) Create(parent string, logview *LogView) *ProjectsLocationsBucketsViewsCreateCall { - c := &ProjectsLocationsBucketsViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.logview = logview - return c -} - -// ViewId sets the optional parameter "viewId": Required. A client-assigned -// identifier such as "my-view". Identifiers are limited to 100 characters and -// can include only letters, digits, underscores, hyphens, and periods. -func (c *ProjectsLocationsBucketsViewsCreateCall) ViewId(viewId string) *ProjectsLocationsBucketsViewsCreateCall { - c.urlParams_.Set("viewId", viewId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsBucketsViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsViewsCreateCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsBucketsViewsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsBucketsViewsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") - 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 "logging.projects.locations.buckets.views.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *LogView.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 *ProjectsLocationsBucketsViewsCreateCall) Do(opts ...googleapi.CallOption) (*LogView, 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 := &LogView{ - 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 -} - -type ProjectsLocationsBucketsViewsDeleteCall struct { +type ProjectsLocationsBucketsViewsPatchCall struct { s *Service name string + logview *LogView urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes a view on a log bucket. If an UNAVAILABLE error is returned, -// this indicates that system is not in a state where it can delete the view. -// If this occurs, please try again in a few minutes. +// Patch: Updates a view on a log bucket. This method replaces the value of the +// filter field from the existing view with the corresponding value from the +// new view. If an UNAVAILABLE error is returned, this indicates that system is +// not in a state where it can update the view. If this occurs, please try +// again in a few minutes. // -// - name: The full resource name of the view to delete: +// - name: The full resource name of the view to update // "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V // IEW_ID]" For // example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi // ew". -func (r *ProjectsLocationsBucketsViewsService) Delete(name string) *ProjectsLocationsBucketsViewsDeleteCall { - c := &ProjectsLocationsBucketsViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsBucketsViewsService) Patch(name string, logview *LogView) *ProjectsLocationsBucketsViewsPatchCall { + c := &ProjectsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.logview = logview + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask that +// specifies the fields in view that need an update. A field will be +// overwritten if, and only if, it is in the update mask. name and output only +// fields cannot be updated.For a detailed FieldMask definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=filter +func (c *ProjectsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsViewsPatchCall { + 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 // details. -func (c *ProjectsLocationsBucketsViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsDeleteCall { +func (c *ProjectsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsViewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsDeleteCall { +func (c *ProjectsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsViewsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsBucketsViewsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -29232,12 +30978,12 @@ func (c *ProjectsLocationsBucketsViewsDeleteCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.views.delete" call. +// Do executes the "logging.projects.locations.buckets.views.patch" call. // 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 +// *LogView.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 *ProjectsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29256,7 +31002,7 @@ func (c *ProjectsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &LogView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29269,86 +31015,80 @@ func (c *ProjectsLocationsBucketsViewsDeleteCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsBucketsViewsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsViewsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a view on a log bucket. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and +// PERMISSION_DENIED errors. // -// - name: The resource name of the policy: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V -// IEW_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi -// ew". -func (r *ProjectsLocationsBucketsViewsService) Get(name string) *ProjectsLocationsBucketsViewsGetCall { - c := &ProjectsLocationsBucketsViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBucketsViewsSetIamPolicyCall { + c := &ProjectsLocationsBucketsViewsSetIamPolicyCall{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 // details. -func (c *ProjectsLocationsBucketsViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsGetCall { +func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an 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. -func (c *ProjectsLocationsBucketsViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsViewsGetCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsGetCall { +func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsViewsGetCall) Header() http.Header { +func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsViewsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.views.get" call. +// Do executes the "logging.projects.locations.buckets.views.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *LogView.ServerResponse.Header or (if a response was returned at all) in +// *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 *ProjectsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) (*LogView, error) { +func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29367,7 +31107,7 @@ func (c *ProjectsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogView{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29380,61 +31120,65 @@ func (c *ProjectsLocationsBucketsViewsGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsBucketsViewsGetIamPolicyCall struct { - s *Service - resource string - getiampolicyrequest *GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsBucketsViewsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. +// 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 is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ProjectsLocationsBucketsViewsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsBucketsViewsGetIamPolicyCall { - c := &ProjectsLocationsBucketsViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 *ProjectsLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBucketsViewsTestIamPermissionsCall { + c := &ProjectsLocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.getiampolicyrequest = getiampolicyrequest + 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 // details. -func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsGetIamPolicyCall { +func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsGetIamPolicyCall { +func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29447,12 +31191,13 @@ func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.views.getIamPolicy" call. +// Do executes the "logging.projects.locations.buckets.views.testIamPermissions" call. // 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 *ProjectsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *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 *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29471,7 +31216,7 @@ func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29484,7 +31229,7 @@ func (c *ProjectsLocationsBucketsViewsGetIamPolicyCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsBucketsViewsListCall struct { +type ProjectsLocationsBucketsViewsLogsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -29493,21 +31238,23 @@ type ProjectsLocationsBucketsViewsListCall struct { header_ http.Header } -// List: Lists views on a log bucket. +// List: Lists the logs in projects, organizations, folders, or billing +// accounts. Only logs that have entries are listed. // -// - parent: The bucket whose views are to be listed: -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]". -func (r *ProjectsLocationsBucketsViewsService) List(parent string) *ProjectsLocationsBucketsViewsListCall { - c := &ProjectsLocationsBucketsViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name to list logs for: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]. +func (r *ProjectsLocationsBucketsViewsLogsService) List(parent string) *ProjectsLocationsBucketsViewsLogsListCall { + c := &ProjectsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request.Non-positive values are ignored. The +// results to return from this request. Non-positive values are ignored. The // presence of nextPageToken in the response indicates that more results might // be available. -func (c *ProjectsLocationsBucketsViewsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsViewsListCall { +func (c *ProjectsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsViewsLogsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -29516,15 +31263,33 @@ func (c *ProjectsLocationsBucketsViewsListCall) PageSize(pageSize int64) *Projec // the next batch of results from the preceding call to this method. pageToken // must be the value of nextPageToken from the previous response. The values of // other method parameters should be identical to those in the previous call. -func (c *ProjectsLocationsBucketsViewsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsViewsListCall { +func (c *ProjectsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsViewsLogsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ResourceNames sets the optional parameter "resourceNames": List of resource +// names to list logs for: +// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW +// _ID] +// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v +// iews/[VIEW_ID] +// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ +// ID]/views/[VIEW_ID] +// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I +// D]To support legacy queries, it could also be: projects/[PROJECT_ID] +// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] +// folders/[FOLDER_ID]The resource name in the parent field is added to this +// list. +func (c *ProjectsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *ProjectsLocationsBucketsViewsLogsListCall { + c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsListCall { +func (c *ProjectsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsLogsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29532,27 +31297,27 @@ func (c *ProjectsLocationsBucketsViewsListCall) Fields(s ...googleapi.Field) *Pr // IfNoneMatch sets an 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. -func (c *ProjectsLocationsBucketsViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsListCall { +func (c *ProjectsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsLogsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsViewsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsListCall { +func (c *ProjectsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsLogsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsViewsListCall) Header() http.Header { +func (c *ProjectsLocationsBucketsViewsLogsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -29560,7 +31325,7 @@ func (c *ProjectsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/views") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -29573,13 +31338,13 @@ func (c *ProjectsLocationsBucketsViewsListCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.views.list" call. +// Do executes the "logging.projects.locations.buckets.views.logs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListViewsResponse.ServerResponse.Header or (if a response was returned at +// *ListLogsResponse.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 *ProjectsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) (*ListViewsResponse, error) { +func (c *ProjectsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29598,7 +31363,7 @@ func (c *ProjectsLocationsBucketsViewsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListViewsResponse{ + ret := &ListLogsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29614,7 +31379,7 @@ func (c *ProjectsLocationsBucketsViewsListCall) 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 *ProjectsLocationsBucketsViewsListCall) Pages(ctx context.Context, f func(*ListViewsResponse) error) error { +func (c *ProjectsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -29632,95 +31397,87 @@ func (c *ProjectsLocationsBucketsViewsListCall) Pages(ctx context.Context, f fun } } -type ProjectsLocationsBucketsViewsPatchCall struct { +type ProjectsLocationsLogScopesCreateCall struct { s *Service - name string - logview *LogView + parent string + logscope *LogScope urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a view on a log bucket. This method replaces the value of the -// filter field from the existing view with the corresponding value from the -// new view. If an UNAVAILABLE error is returned, this indicates that system is -// not in a state where it can update the view. If this occurs, please try -// again in a few minutes. +// Create: Creates a log scope. // -// - name: The full resource name of the view to update -// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[V -// IEW_ID]" For -// example:"projects/my-project/locations/global/buckets/my-bucket/views/my-vi -// ew". -func (r *ProjectsLocationsBucketsViewsService) Patch(name string, logview *LogView) *ProjectsLocationsBucketsViewsPatchCall { - c := &ProjectsLocationsBucketsViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.logview = logview +// - parent: The parent project in which to create the log scope +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]" For +// example:"projects/my-project/locations/global". +func (r *ProjectsLocationsLogScopesService) Create(parent string, logscope *LogScope) *ProjectsLocationsLogScopesCreateCall { + c := &ProjectsLocationsLogScopesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.logscope = logscope return c } -// UpdateMask sets the optional parameter "updateMask": Field mask that -// specifies the fields in view that need an update. A field will be -// overwritten if, and only if, it is in the update mask. name and output only -// fields cannot be updated.For a detailed FieldMask definition, see -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor -// example: updateMask=filter -func (c *ProjectsLocationsBucketsViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsBucketsViewsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// LogScopeId sets the optional parameter "logScopeId": Required. A +// client-assigned identifier such as "log-scope". Identifiers are limited to +// 100 characters and can include only letters, digits, underscores, hyphens, +// and periods. First character has to be alphanumeric. +func (c *ProjectsLocationsLogScopesCreateCall) LogScopeId(logScopeId string) *ProjectsLocationsLogScopesCreateCall { + c.urlParams_.Set("logScopeId", logScopeId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBucketsViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsPatchCall { +func (c *ProjectsLocationsLogScopesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLogScopesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsViewsPatchCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsPatchCall { +func (c *ProjectsLocationsLogScopesCreateCall) Context(ctx context.Context) *ProjectsLocationsLogScopesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsViewsPatchCall) Header() http.Header { +func (c *ProjectsLocationsLogScopesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsViewsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLogScopesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.logview) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logscope) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logScopes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.views.patch" call. +// Do executes the "logging.projects.locations.logScopes.create" call. // Any non-2xx status code is an error. Response headers are in either -// *LogView.ServerResponse.Header or (if a response was returned at all) in +// *LogScope.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 *ProjectsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption) (*LogView, error) { +func (c *ProjectsLocationsLogScopesCreateCall) Do(opts ...googleapi.CallOption) (*LogScope, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29739,7 +31496,7 @@ func (c *ProjectsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LogView{ + ret := &LogScope{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29752,80 +31509,72 @@ func (c *ProjectsLocationsBucketsViewsPatchCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsBucketsViewsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLogScopesDeleteCall struct { + s *Service + name string + 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. +// Delete: Deletes a log scope. // -// - 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 *ProjectsLocationsBucketsViewsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsBucketsViewsSetIamPolicyCall { - c := &ProjectsLocationsBucketsViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The resource name of the log scope to delete: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]" +// For example:"projects/my-project/locations/global/logScopes/my-log-scope". +func (r *ProjectsLocationsLogScopesService) Delete(name string) *ProjectsLocationsLogScopesDeleteCall { + c := &ProjectsLocationsLogScopesDeleteCall{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 // details. -func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsSetIamPolicyCall { +func (c *ProjectsLocationsLogScopesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLogScopesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsSetIamPolicyCall { +func (c *ProjectsLocationsLogScopesDeleteCall) Context(ctx context.Context) *ProjectsLocationsLogScopesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsLogScopesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsLogScopesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.views.setIamPolicy" call. +// Do executes the "logging.projects.locations.logScopes.delete" call. // 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 +// *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 *ProjectsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsLogScopesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29844,7 +31593,7 @@ func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29857,84 +31606,84 @@ func (c *ProjectsLocationsBucketsViewsSetIamPolicyCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsBucketsViewsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsLogScopesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this will return an empty set of -// permissions, not a NOT_FOUND error.Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. +// Get: Gets a log scope. // -// - 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 *ProjectsLocationsBucketsViewsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsBucketsViewsTestIamPermissionsCall { - c := &ProjectsLocationsBucketsViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - name: The resource name of the log scope: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]/logScopes/[LOG_SCOPE_ID]" +// For example:"projects/my-project/locations/global/logScopes/my-log-scope". +func (r *ProjectsLocationsLogScopesService) Get(name string) *ProjectsLocationsLogScopesGetCall { + c := &ProjectsLocationsLogScopesGetCall{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 // details. -func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsTestIamPermissionsCall { +func (c *ProjectsLocationsLogScopesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLogScopesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsLogScopesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLogScopesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsTestIamPermissionsCall { +func (c *ProjectsLocationsLogScopesGetCall) Context(ctx context.Context) *ProjectsLocationsLogScopesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsLogScopesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsLogScopesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v2/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.views.testIamPermissions" call. +// Do executes the "logging.projects.locations.logScopes.get" call. // 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 *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// *LogScope.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 *ProjectsLocationsLogScopesGetCall) Do(opts ...googleapi.CallOption) (*LogScope, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29953,7 +31702,7 @@ func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &LogScope{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29966,7 +31715,7 @@ func (c *ProjectsLocationsBucketsViewsTestIamPermissionsCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsBucketsViewsLogsListCall struct { +type ProjectsLocationsLogScopesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -29975,23 +31724,21 @@ type ProjectsLocationsBucketsViewsLogsListCall struct { header_ http.Header } -// List: Lists the logs in projects, organizations, folders, or billing -// accounts. Only logs that have entries are listed. +// List: Lists log scopes. // -// - parent: The resource name to list logs for: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]. -func (r *ProjectsLocationsBucketsViewsLogsService) List(parent string) *ProjectsLocationsBucketsViewsLogsListCall { - c := &ProjectsLocationsBucketsViewsLogsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource whose log scopes are to be listed: +// "projects/[PROJECT_ID]/locations/[LOCATION_ID]". +func (r *ProjectsLocationsLogScopesService) List(parent string) *ProjectsLocationsLogScopesListCall { + c := &ProjectsLocationsLogScopesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// results to return from this request. Non-positive values are ignored. The +// results to return from this request.Non-positive values are ignored. The // presence of nextPageToken in the response indicates that more results might // be available. -func (c *ProjectsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *ProjectsLocationsBucketsViewsLogsListCall { +func (c *ProjectsLocationsLogScopesListCall) PageSize(pageSize int64) *ProjectsLocationsLogScopesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -30000,33 +31747,15 @@ func (c *ProjectsLocationsBucketsViewsLogsListCall) PageSize(pageSize int64) *Pr // the next batch of results from the preceding call to this method. pageToken // must be the value of nextPageToken from the previous response. The values of // other method parameters should be identical to those in the previous call. -func (c *ProjectsLocationsBucketsViewsLogsListCall) PageToken(pageToken string) *ProjectsLocationsBucketsViewsLogsListCall { +func (c *ProjectsLocationsLogScopesListCall) PageToken(pageToken string) *ProjectsLocationsLogScopesListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ResourceNames sets the optional parameter "resourceNames": List of resource -// names to list logs for: -// projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW -// _ID] -// organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/v -// iews/[VIEW_ID] -// billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ -// ID]/views/[VIEW_ID] -// folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_I -// D]To support legacy queries, it could also be: projects/[PROJECT_ID] -// organizations/[ORGANIZATION_ID] billingAccounts/[BILLING_ACCOUNT_ID] -// folders/[FOLDER_ID]The resource name in the parent field is added to this -// list. -func (c *ProjectsLocationsBucketsViewsLogsListCall) ResourceNames(resourceNames ...string) *ProjectsLocationsBucketsViewsLogsListCall { - c.urlParams_.SetMulti("resourceNames", append([]string{}, resourceNames...)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBucketsViewsLogsListCall { +func (c *ProjectsLocationsLogScopesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLogScopesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30034,27 +31763,27 @@ func (c *ProjectsLocationsBucketsViewsLogsListCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an 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. -func (c *ProjectsLocationsBucketsViewsLogsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBucketsViewsLogsListCall { +func (c *ProjectsLocationsLogScopesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLogScopesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBucketsViewsLogsListCall) Context(ctx context.Context) *ProjectsLocationsBucketsViewsLogsListCall { +func (c *ProjectsLocationsLogScopesListCall) Context(ctx context.Context) *ProjectsLocationsLogScopesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBucketsViewsLogsListCall) Header() http.Header { +func (c *ProjectsLocationsLogScopesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsLogScopesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30062,7 +31791,7 @@ func (c *ProjectsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/logScopes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30075,13 +31804,13 @@ func (c *ProjectsLocationsBucketsViewsLogsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "logging.projects.locations.buckets.views.logs.list" call. +// Do executes the "logging.projects.locations.logScopes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListLogsResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *ListLogScopesResponse.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 *ProjectsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOption) (*ListLogsResponse, error) { +func (c *ProjectsLocationsLogScopesListCall) Do(opts ...googleapi.CallOption) (*ListLogScopesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30100,7 +31829,7 @@ func (c *ProjectsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListLogsResponse{ + ret := &ListLogScopesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30116,7 +31845,7 @@ func (c *ProjectsLocationsBucketsViewsLogsListCall) Do(opts ...googleapi.CallOpt // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f func(*ListLogsResponse) error) error { +func (c *ProjectsLocationsLogScopesListCall) Pages(ctx context.Context, f func(*ListLogScopesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -30134,6 +31863,119 @@ func (c *ProjectsLocationsBucketsViewsLogsListCall) Pages(ctx context.Context, f } } +type ProjectsLocationsLogScopesPatchCall struct { + s *Service + name string + logscope *LogScope + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a log scope. +// +// - name: Output only. The resource name of the log scope.For +// example:projects/my-project/locations/global/logScopes/my-log-scope. +func (r *ProjectsLocationsLogScopesService) Patch(name string, logscope *LogScope) *ProjectsLocationsLogScopesPatchCall { + c := &ProjectsLocationsLogScopesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.logscope = logscope + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask that +// specifies the fields in log_scope that need an update. A field will be +// overwritten if, and only if, it is in the update mask. name and output only +// fields cannot be updated.For a detailed FieldMask definition, see +// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMaskFor +// example: updateMask=description +func (c *ProjectsLocationsLogScopesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLogScopesPatchCall { + 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 +// details. +func (c *ProjectsLocationsLogScopesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLogScopesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsLogScopesPatchCall) Context(ctx context.Context) *ProjectsLocationsLogScopesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsLogScopesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsLogScopesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.logscope) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "logging.projects.locations.logScopes.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *LogScope.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 *ProjectsLocationsLogScopesPatchCall) Do(opts ...googleapi.CallOption) (*LogScope, 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 := &LogScope{ + 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 +} + type ProjectsLocationsOperationsCancelCall struct { s *Service name string diff --git a/looker/v1/looker-api.json b/looker/v1/looker-api.json index 2ea54d184a6..a01975ae697 100644 --- a/looker/v1/looker-api.json +++ b/looker/v1/looker-api.json @@ -731,7 +731,7 @@ } } }, - "revision": "20240814", + "revision": "20240910", "rootUrl": "https://looker.googleapis.com/", "schemas": { "AdminSettings": { @@ -1092,6 +1092,14 @@ "$ref": "EncryptionConfig", "description": "Encryption configuration (CMEK). Only set if CMEK has been enabled on the instance." }, + "fipsEnabled": { + "description": "Optional. Whether FIPS is enabled on the Looker instance.", + "type": "boolean" + }, + "geminiEnabled": { + "description": "Optional. Whether Gemini feature is enabled on the Looker instance or not.", + "type": "boolean" + }, "ingressPrivateIp": { "description": "Output only. Private Ingress IP (IPv4).", "readOnly": true, diff --git a/looker/v1/looker-gen.go b/looker/v1/looker-gen.go index 93a9c906eff..54b11e895a3 100644 --- a/looker/v1/looker-gen.go +++ b/looker/v1/looker-gen.go @@ -764,6 +764,11 @@ type Instance struct { // EncryptionConfig: Encryption configuration (CMEK). Only set if CMEK has been // enabled on the instance. EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` + // FipsEnabled: Optional. Whether FIPS is enabled on the Looker instance. + FipsEnabled bool `json:"fipsEnabled,omitempty"` + // GeminiEnabled: Optional. Whether Gemini feature is enabled on the Looker + // instance or not. + GeminiEnabled bool `json:"geminiEnabled,omitempty"` // IngressPrivateIp: Output only. Private Ingress IP (IPv4). IngressPrivateIp string `json:"ingressPrivateIp,omitempty"` // IngressPublicIp: Output only. Public Ingress IP (IPv4). diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index e8ffd4055ff..737e2f9ae4d 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -279,6 +279,69 @@ } }, "resources": { + "autofeedSettings": { + "methods": { + "getAutofeedSettings": { + "description": "Retrieves the autofeed settings of an account.", + "flatPath": "accounts/v1beta/accounts/{accountsId}/autofeedSettings", + "httpMethod": "GET", + "id": "merchantapi.accounts.autofeedSettings.getAutofeedSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the autofeed settings. Format: `accounts/{account}/autofeedSettings`", + "location": "path", + "pattern": "^accounts/[^/]+/autofeedSettings$", + "required": true, + "type": "string" + } + }, + "path": "accounts/v1beta/{+name}", + "response": { + "$ref": "AutofeedSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + }, + "updateAutofeedSettings": { + "description": "Updates the autofeed settings of an account.", + "flatPath": "accounts/v1beta/accounts/{accountsId}/autofeedSettings", + "httpMethod": "PATCH", + "id": "merchantapi.accounts.autofeedSettings.updateAutofeedSettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the autofeed settings. Format: `accounts/{account}/autofeedSettings`.", + "location": "path", + "pattern": "^accounts/[^/]+/autofeedSettings$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. List of fields being updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "accounts/v1beta/{+name}", + "request": { + "$ref": "AutofeedSettings" + }, + "response": { + "$ref": "AutofeedSettings" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + }, "businessIdentity": { "methods": { "getBusinessIdentity": { @@ -405,13 +468,13 @@ } } }, - "emailpreferences": { + "emailPreferences": { "methods": { "getEmailPreferences": { "description": "Returns the email preferences for a Merchant Center account user. Use the name=accounts/*/users/me/emailPreferences alias to get preferences for the authenticated user.", "flatPath": "accounts/v1beta/accounts/{accountsId}/users/{usersId}/emailPreferences", "httpMethod": "GET", - "id": "merchantapi.accounts.emailpreferences.getEmailPreferences", + "id": "merchantapi.accounts.emailPreferences.getEmailPreferences", "parameterOrder": [ "name" ], @@ -436,7 +499,7 @@ "description": "Updates the email preferences for a Merchant Center account user. MCA users should specify the MCA account rather than a sub-account of the MCA. Preferences which are not explicitly selected in the update mask will not be updated. It is invalid for updates to specify an UNCONFIRMED opt-in status value. Use the name=accounts/*/users/me/emailPreferences alias to update preferences for the authenticated user.", "flatPath": "accounts/v1beta/accounts/{accountsId}/users/{usersId}/emailPreferences", "httpMethod": "PATCH", - "id": "merchantapi.accounts.emailpreferences.updateEmailPreferences", + "id": "merchantapi.accounts.emailPreferences.updateEmailPreferences", "parameterOrder": [ "name" ], @@ -1354,7 +1417,7 @@ } } }, - "revision": "20240830", + "revision": "20240916", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "AcceptTermsOfService": { @@ -1362,7 +1425,7 @@ "id": "AcceptTermsOfService", "properties": { "name": { - "description": "Required. The resource name of the terms of service version.", + "description": "Required. The resource name of the terms of service version in the format `termsOfService/{version}`. To retrieve the latest version, use the [termsOfService.retrieveLatest](/merchant/api/reference/rest/accounts_v1beta/termsOfService/retrieveLatest) method.", "type": "string" }, "regionCode": { @@ -1517,6 +1580,26 @@ }, "type": "object" }, + "AutofeedSettings": { + "description": "Collection of information related to the [autofeed](https://support.google.com/merchants/answer/7538732) settings.", + "id": "AutofeedSettings", + "properties": { + "eligible": { + "description": "Output only. Determines whether merchant is eligible for being enrolled into an autofeed.", + "readOnly": true, + "type": "boolean" + }, + "enableProducts": { + "description": "Required. Enables or disables product crawling through the autofeed for the given account. Autofeed accounts must meet [certain conditions](https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), which can be checked through the `eligible` field. The account must **not** be a marketplace. When the autofeed is enabled for the first time, the products usually appear instantly. When re-enabling, it might take up to 24 hours for products to appear.", + "type": "boolean" + }, + "name": { + "description": "Identifier. The resource name of the autofeed settings. Format: `accounts/{account}/autofeedSettings`.", + "type": "string" + } + }, + "type": "object" + }, "BusinessDayConfig": { "description": "Business days of the warehouse.", "id": "BusinessDayConfig", @@ -1819,7 +1902,7 @@ "description": "The business days during which orders can be handled. If not provided, Monday to Friday business days will be assumed." }, "maxHandlingDays": { - "description": "Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `min_handling_days`.", + "description": "Maximum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. Must be greater than or equal to `min_handling_days`. 'min_handling_days' and 'max_handling_days' should be either set or not set at the same time.", "format": "int32", "type": "integer" }, @@ -1829,7 +1912,7 @@ "type": "integer" }, "minHandlingDays": { - "description": "Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped.", + "description": "Minimum number of business days spent before an order is shipped. 0 means same day shipped, 1 means next day shipped. 'min_handling_days' and 'max_handling_days' should be either set or not set at the same time.", "format": "int32", "type": "integer" }, diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index b659f79a2aa..c8815f602ff 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -158,9 +158,10 @@ func (s *APIService) userAgent() string { func NewAccountsService(s *APIService) *AccountsService { rs := &AccountsService{s: s} + rs.AutofeedSettings = NewAccountsAutofeedSettingsService(s) rs.BusinessIdentity = NewAccountsBusinessIdentityService(s) rs.BusinessInfo = NewAccountsBusinessInfoService(s) - rs.Emailpreferences = NewAccountsEmailpreferencesService(s) + rs.EmailPreferences = NewAccountsEmailPreferencesService(s) rs.Homepage = NewAccountsHomepageService(s) rs.Issues = NewAccountsIssuesService(s) rs.OnlineReturnPolicies = NewAccountsOnlineReturnPoliciesService(s) @@ -175,11 +176,13 @@ func NewAccountsService(s *APIService) *AccountsService { type AccountsService struct { s *APIService + AutofeedSettings *AccountsAutofeedSettingsService + BusinessIdentity *AccountsBusinessIdentityService BusinessInfo *AccountsBusinessInfoService - Emailpreferences *AccountsEmailpreferencesService + EmailPreferences *AccountsEmailPreferencesService Homepage *AccountsHomepageService @@ -198,6 +201,15 @@ type AccountsService struct { Users *AccountsUsersService } +func NewAccountsAutofeedSettingsService(s *APIService) *AccountsAutofeedSettingsService { + rs := &AccountsAutofeedSettingsService{s: s} + return rs +} + +type AccountsAutofeedSettingsService struct { + s *APIService +} + func NewAccountsBusinessIdentityService(s *APIService) *AccountsBusinessIdentityService { rs := &AccountsBusinessIdentityService{s: s} return rs @@ -216,12 +228,12 @@ type AccountsBusinessInfoService struct { s *APIService } -func NewAccountsEmailpreferencesService(s *APIService) *AccountsEmailpreferencesService { - rs := &AccountsEmailpreferencesService{s: s} +func NewAccountsEmailPreferencesService(s *APIService) *AccountsEmailPreferencesService { + rs := &AccountsEmailPreferencesService{s: s} return rs } -type AccountsEmailpreferencesService struct { +type AccountsEmailPreferencesService struct { s *APIService } @@ -308,7 +320,11 @@ type TermsOfServiceService struct { // AcceptTermsOfService: Reference to a Terms of Service resource. type AcceptTermsOfService struct { - // Name: Required. The resource name of the terms of service version. + // Name: Required. The resource name of the terms of service version in the + // format `termsOfService/{version}`. To retrieve the latest version, use the + // termsOfService.retrieveLatest + // (/merchant/api/reference/rest/accounts_v1beta/termsOfService/retrieveLatest) + // method. Name string `json:"name,omitempty"` // RegionCode: Required. Region code as defined by CLDR // (https://cldr.unicode.org/). This is either a country when the ToS applies @@ -513,6 +529,45 @@ func (s Address) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AutofeedSettings: Collection of information related to the autofeed +// (https://support.google.com/merchants/answer/7538732) settings. +type AutofeedSettings struct { + // Eligible: Output only. Determines whether merchant is eligible for being + // enrolled into an autofeed. + Eligible bool `json:"eligible,omitempty"` + // EnableProducts: Required. Enables or disables product crawling through the + // autofeed for the given account. Autofeed accounts must meet certain + // conditions + // (https://support.google.com/merchants/answer/7538732#Configure_automated_feeds_Standard_Experience), + // which can be checked through the `eligible` field. The account must **not** + // be a marketplace. When the autofeed is enabled for the first time, the + // products usually appear instantly. When re-enabling, it might take up to 24 + // hours for products to appear. + EnableProducts bool `json:"enableProducts,omitempty"` + // Name: Identifier. The resource name of the autofeed settings. Format: + // `accounts/{account}/autofeedSettings`. + 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. "Eligible") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Eligible") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutofeedSettings) MarshalJSON() ([]byte, error) { + type NoMethod AutofeedSettings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BusinessDayConfig: Business days of the warehouse. type BusinessDayConfig struct { // BusinessDays: Required. Regular business days. May not be empty. @@ -896,7 +951,8 @@ type DeliveryTime struct { HandlingBusinessDayConfig *BusinessDayConfig `json:"handlingBusinessDayConfig,omitempty"` // MaxHandlingDays: Maximum number of business days spent before an order is // shipped. 0 means same day shipped, 1 means next day shipped. Must be greater - // than or equal to `min_handling_days`. + // than or equal to `min_handling_days`. 'min_handling_days' and + // 'max_handling_days' should be either set or not set at the same time. MaxHandlingDays int64 `json:"maxHandlingDays,omitempty"` // MaxTransitDays: Maximum number of business days that is spent in transit. 0 // means same day delivery, 1 means next day delivery. Must be greater than or @@ -904,6 +960,8 @@ type DeliveryTime struct { MaxTransitDays int64 `json:"maxTransitDays,omitempty"` // MinHandlingDays: Minimum number of business days spent before an order is // shipped. 0 means same day shipped, 1 means next day shipped. + // 'min_handling_days' and 'max_handling_days' should be either set or not set + // at the same time. MinHandlingDays int64 `json:"minHandlingDays,omitempty"` // MinTransitDays: Minimum number of business days that is spent in transit. 0 // means same day delivery, 1 means next day delivery. Either @@ -3727,6 +3785,225 @@ func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) { return ret, nil } +type AccountsAutofeedSettingsGetAutofeedSettingsCall struct { + s *APIService + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetAutofeedSettings: Retrieves the autofeed settings of an account. +// +// - name: The resource name of the autofeed settings. Format: +// `accounts/{account}/autofeedSettings`. +func (r *AccountsAutofeedSettingsService) GetAutofeedSettings(name string) *AccountsAutofeedSettingsGetAutofeedSettingsCall { + c := &AccountsAutofeedSettingsGetAutofeedSettingsCall{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 +// details. +func (c *AccountsAutofeedSettingsGetAutofeedSettingsCall) Fields(s ...googleapi.Field) *AccountsAutofeedSettingsGetAutofeedSettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *AccountsAutofeedSettingsGetAutofeedSettingsCall) IfNoneMatch(entityTag string) *AccountsAutofeedSettingsGetAutofeedSettingsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AccountsAutofeedSettingsGetAutofeedSettingsCall) Context(ctx context.Context) *AccountsAutofeedSettingsGetAutofeedSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *AccountsAutofeedSettingsGetAutofeedSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAutofeedSettingsGetAutofeedSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "accounts/v1beta/{+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 "merchantapi.accounts.autofeedSettings.getAutofeedSettings" call. +// Any non-2xx status code is an error. Response headers are in either +// *AutofeedSettings.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 *AccountsAutofeedSettingsGetAutofeedSettingsCall) Do(opts ...googleapi.CallOption) (*AutofeedSettings, 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 := &AutofeedSettings{ + 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 +} + +type AccountsAutofeedSettingsUpdateAutofeedSettingsCall struct { + s *APIService + name string + autofeedsettings *AutofeedSettings + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateAutofeedSettings: Updates the autofeed settings of an account. +// +// - name: Identifier. The resource name of the autofeed settings. Format: +// `accounts/{account}/autofeedSettings`. +func (r *AccountsAutofeedSettingsService) UpdateAutofeedSettings(name string, autofeedsettings *AutofeedSettings) *AccountsAutofeedSettingsUpdateAutofeedSettingsCall { + c := &AccountsAutofeedSettingsUpdateAutofeedSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.autofeedsettings = autofeedsettings + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. List of +// fields being updated. +func (c *AccountsAutofeedSettingsUpdateAutofeedSettingsCall) UpdateMask(updateMask string) *AccountsAutofeedSettingsUpdateAutofeedSettingsCall { + 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 +// details. +func (c *AccountsAutofeedSettingsUpdateAutofeedSettingsCall) Fields(s ...googleapi.Field) *AccountsAutofeedSettingsUpdateAutofeedSettingsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AccountsAutofeedSettingsUpdateAutofeedSettingsCall) Context(ctx context.Context) *AccountsAutofeedSettingsUpdateAutofeedSettingsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *AccountsAutofeedSettingsUpdateAutofeedSettingsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsAutofeedSettingsUpdateAutofeedSettingsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autofeedsettings) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/v1beta/{+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 "merchantapi.accounts.autofeedSettings.updateAutofeedSettings" call. +// Any non-2xx status code is an error. Response headers are in either +// *AutofeedSettings.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 *AccountsAutofeedSettingsUpdateAutofeedSettingsCall) Do(opts ...googleapi.CallOption) (*AutofeedSettings, 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 := &AutofeedSettings{ + 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 +} + type AccountsBusinessIdentityGetBusinessIdentityCall struct { s *APIService name string @@ -4165,7 +4442,7 @@ func (c *AccountsBusinessInfoUpdateBusinessInfoCall) Do(opts ...googleapi.CallOp return ret, nil } -type AccountsEmailpreferencesGetEmailPreferencesCall struct { +type AccountsEmailPreferencesGetEmailPreferencesCall struct { s *APIService name string urlParams_ gensupport.URLParams @@ -4180,8 +4457,8 @@ type AccountsEmailpreferencesGetEmailPreferencesCall struct { // // - name: The name of the `EmailPreferences` resource. Format: // `accounts/{account}/users/{email}/emailPreferences`. -func (r *AccountsEmailpreferencesService) GetEmailPreferences(name string) *AccountsEmailpreferencesGetEmailPreferencesCall { - c := &AccountsEmailpreferencesGetEmailPreferencesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsEmailPreferencesService) GetEmailPreferences(name string) *AccountsEmailPreferencesGetEmailPreferencesCall { + c := &AccountsEmailPreferencesGetEmailPreferencesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4189,7 +4466,7 @@ func (r *AccountsEmailpreferencesService) GetEmailPreferences(name string) *Acco // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsEmailpreferencesGetEmailPreferencesCall) Fields(s ...googleapi.Field) *AccountsEmailpreferencesGetEmailPreferencesCall { +func (c *AccountsEmailPreferencesGetEmailPreferencesCall) Fields(s ...googleapi.Field) *AccountsEmailPreferencesGetEmailPreferencesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4197,27 +4474,27 @@ func (c *AccountsEmailpreferencesGetEmailPreferencesCall) Fields(s ...googleapi. // IfNoneMatch sets an 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. -func (c *AccountsEmailpreferencesGetEmailPreferencesCall) IfNoneMatch(entityTag string) *AccountsEmailpreferencesGetEmailPreferencesCall { +func (c *AccountsEmailPreferencesGetEmailPreferencesCall) IfNoneMatch(entityTag string) *AccountsEmailPreferencesGetEmailPreferencesCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsEmailpreferencesGetEmailPreferencesCall) Context(ctx context.Context) *AccountsEmailpreferencesGetEmailPreferencesCall { +func (c *AccountsEmailPreferencesGetEmailPreferencesCall) Context(ctx context.Context) *AccountsEmailPreferencesGetEmailPreferencesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsEmailpreferencesGetEmailPreferencesCall) Header() http.Header { +func (c *AccountsEmailPreferencesGetEmailPreferencesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsEmailpreferencesGetEmailPreferencesCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsEmailPreferencesGetEmailPreferencesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -4238,13 +4515,13 @@ func (c *AccountsEmailpreferencesGetEmailPreferencesCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "merchantapi.accounts.emailpreferences.getEmailPreferences" call. +// Do executes the "merchantapi.accounts.emailPreferences.getEmailPreferences" call. // Any non-2xx status code is an error. Response headers are in either // *EmailPreferences.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 *AccountsEmailpreferencesGetEmailPreferencesCall) Do(opts ...googleapi.CallOption) (*EmailPreferences, error) { +func (c *AccountsEmailPreferencesGetEmailPreferencesCall) Do(opts ...googleapi.CallOption) (*EmailPreferences, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4276,7 +4553,7 @@ func (c *AccountsEmailpreferencesGetEmailPreferencesCall) Do(opts ...googleapi.C return ret, nil } -type AccountsEmailpreferencesUpdateEmailPreferencesCall struct { +type AccountsEmailPreferencesUpdateEmailPreferencesCall struct { s *APIService name string emailpreferences *EmailPreferences @@ -4295,8 +4572,8 @@ type AccountsEmailpreferencesUpdateEmailPreferencesCall struct { // // - name: Identifier. The name of the EmailPreferences. The endpoint is only // supported for the authenticated user. -func (r *AccountsEmailpreferencesService) UpdateEmailPreferences(name string, emailpreferences *EmailPreferences) *AccountsEmailpreferencesUpdateEmailPreferencesCall { - c := &AccountsEmailpreferencesUpdateEmailPreferencesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *AccountsEmailPreferencesService) UpdateEmailPreferences(name string, emailpreferences *EmailPreferences) *AccountsEmailPreferencesUpdateEmailPreferencesCall { + c := &AccountsEmailPreferencesUpdateEmailPreferencesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name c.emailpreferences = emailpreferences return c @@ -4304,7 +4581,7 @@ func (r *AccountsEmailpreferencesService) UpdateEmailPreferences(name string, em // UpdateMask sets the optional parameter "updateMask": Required. List of // fields being updated. -func (c *AccountsEmailpreferencesUpdateEmailPreferencesCall) UpdateMask(updateMask string) *AccountsEmailpreferencesUpdateEmailPreferencesCall { +func (c *AccountsEmailPreferencesUpdateEmailPreferencesCall) UpdateMask(updateMask string) *AccountsEmailPreferencesUpdateEmailPreferencesCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -4312,27 +4589,27 @@ func (c *AccountsEmailpreferencesUpdateEmailPreferencesCall) UpdateMask(updateMa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *AccountsEmailpreferencesUpdateEmailPreferencesCall) Fields(s ...googleapi.Field) *AccountsEmailpreferencesUpdateEmailPreferencesCall { +func (c *AccountsEmailPreferencesUpdateEmailPreferencesCall) Fields(s ...googleapi.Field) *AccountsEmailPreferencesUpdateEmailPreferencesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *AccountsEmailpreferencesUpdateEmailPreferencesCall) Context(ctx context.Context) *AccountsEmailpreferencesUpdateEmailPreferencesCall { +func (c *AccountsEmailPreferencesUpdateEmailPreferencesCall) Context(ctx context.Context) *AccountsEmailPreferencesUpdateEmailPreferencesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *AccountsEmailpreferencesUpdateEmailPreferencesCall) Header() http.Header { +func (c *AccountsEmailPreferencesUpdateEmailPreferencesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *AccountsEmailpreferencesUpdateEmailPreferencesCall) doRequest(alt string) (*http.Response, error) { +func (c *AccountsEmailPreferencesUpdateEmailPreferencesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.emailpreferences) @@ -4354,13 +4631,13 @@ func (c *AccountsEmailpreferencesUpdateEmailPreferencesCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "merchantapi.accounts.emailpreferences.updateEmailPreferences" call. +// Do executes the "merchantapi.accounts.emailPreferences.updateEmailPreferences" call. // Any non-2xx status code is an error. Response headers are in either // *EmailPreferences.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 *AccountsEmailpreferencesUpdateEmailPreferencesCall) Do(opts ...googleapi.CallOption) (*EmailPreferences, error) { +func (c *AccountsEmailPreferencesUpdateEmailPreferencesCall) Do(opts ...googleapi.CallOption) (*EmailPreferences, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { diff --git a/merchantapi/datasources_v1beta/merchantapi-api.json b/merchantapi/datasources_v1beta/merchantapi-api.json index a7b93cc1c36..679083b6ec9 100644 --- a/merchantapi/datasources_v1beta/merchantapi-api.json +++ b/merchantapi/datasources_v1beta/merchantapi-api.json @@ -285,12 +285,43 @@ "https://www.googleapis.com/auth/content" ] } + }, + "resources": { + "fileUploads": { + "methods": { + "get": { + "description": "Gets the latest data source file upload. Only the `latest` alias is accepted for a file upload.", + "flatPath": "datasources/v1beta/accounts/{accountsId}/dataSources/{dataSourcesId}/fileUploads/{fileUploadsId}", + "httpMethod": "GET", + "id": "merchantapi.accounts.dataSources.fileUploads.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the data source file upload to retrieve. Format: `accounts/{account}/dataSources/{datasource}/fileUploads/latest`", + "location": "path", + "pattern": "^accounts/[^/]+/dataSources/[^/]+/fileUploads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "datasources/v1beta/{+name}", + "response": { + "$ref": "FileUpload" + }, + "scopes": [ + "https://www.googleapis.com/auth/content" + ] + } + } + } } } } } }, - "revision": "20240827", + "revision": "20240909", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "DataSource": { @@ -357,6 +388,39 @@ }, "type": "object" }, + "DataSourceReference": { + "description": "Data source reference can be used to manage related data sources within the data source service.", + "id": "DataSourceReference", + "properties": { + "primaryDataSourceName": { + "description": "Optional. The name of the primary data source. Format: `accounts/{account}/dataSources/{datasource}`", + "type": "string" + }, + "self": { + "description": "Self should be used to reference the primary data source itself.", + "type": "boolean" + }, + "supplementalDataSourceName": { + "description": "Optional. The name of the supplemental data source. Format: `accounts/{account}/dataSources/{datasource}`", + "type": "string" + } + }, + "type": "object" + }, + "DefaultRule": { + "description": "Default rule management of the data source.", + "id": "DefaultRule", + "properties": { + "takeFromDataSources": { + "description": "Required. The list of data sources linked in the [default rule](https://support.google.com/merchants/answer/7450276). This list is ordered by the default rule priority of joining the data. It might include none or multiple references to `self` and supplemental data sources. The list must not be empty. To link the data source to the default rule, you need to add a new reference to this list (in sequential order). To unlink the data source from the default rule, you need to remove the given reference from this list. Changing the order of this list will result in changing the priority of data sources in the default rule. For example, providing the following list: [`1001`, `self`] will take attribute values from supplemental data source `1001`, and fallback to `self` if the attribute is not set in `1001`.", + "items": { + "$ref": "DataSourceReference" + }, + "type": "array" + } + }, + "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", @@ -477,6 +541,120 @@ }, "type": "object" }, + "FileUpload": { + "description": "The file upload of a specific data source, that is, the result of the retrieval of the data source at a certain timestamp computed asynchronously when the data source processing is finished. Only applicable to file data sources.", + "id": "FileUpload", + "properties": { + "dataSourceId": { + "description": "Output only. The data source id.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "issues": { + "description": "Output only. The list of issues occurring in the data source.", + "items": { + "$ref": "Issue" + }, + "readOnly": true, + "type": "array" + }, + "itemsCreated": { + "description": "Output only. The number of items in the data source that were created.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "itemsTotal": { + "description": "Output only. The number of items in the data source that were processed.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "itemsUpdated": { + "description": "Output only. The number of items in the data source that were updated.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. The name of the data source file upload. Format: `{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fileupload}}`", + "type": "string" + }, + "processingState": { + "description": "Output only. The processing state of the data source.", + "enum": [ + "PROCESSING_STATE_UNSPECIFIED", + "FAILED", + "IN_PROGRESS", + "SUCCEEDED" + ], + "enumDescriptions": [ + "Processing state unspecified.", + "The data source could not be processed or all the items had errors.", + "The data source is being processed.", + "The data source was processed successfully, though some items might have had errors." + ], + "readOnly": true, + "type": "string" + }, + "uploadTime": { + "description": "Output only. The date at which the file of the data source was uploaded.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Issue": { + "description": "An error occurring in the data source, like \"invalid price\".", + "id": "Issue", + "properties": { + "code": { + "description": "Output only. The code of the error, for example, \"validation/invalid_value\". Returns \"?\" if the code is unknown.", + "readOnly": true, + "type": "string" + }, + "count": { + "description": "Output only. The number of occurrences of the error in the file upload.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Output only. The error description, for example, \"Your data source contains items which have too many attributes, or are too big. These items will be dropped\".", + "readOnly": true, + "type": "string" + }, + "documentationUri": { + "description": "Output only. Link to the documentation explaining the issue in more details, if available.", + "readOnly": true, + "type": "string" + }, + "severity": { + "description": "Output only. The severity of the issue.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "WARNING", + "ERROR" + ], + "enumDescriptions": [ + "Severity unspecified.", + "The issue is the warning.", + "The issue is an error." + ], + "readOnly": true, + "type": "string" + }, + "title": { + "description": "Output only. The title of the issue, for example, \"Item too big\".", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListDataSourcesResponse": { "description": "Response message for the ListDataSources method.", "id": "ListDataSourcesResponse", @@ -541,6 +719,10 @@ }, "type": "array" }, + "defaultRule": { + "$ref": "DefaultRule", + "description": "Optional. Default rule management of the data source. If set, the linked data sources will be replaced." + }, "feedLabel": { "description": "Optional. Immutable. The feed label that is specified on the data source level. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). See also [migration to feed labels](https://developers.google.com/shopping-content/guides/products/feed-labels). `feedLabel` and `contentLanguage` must be either both set or unset for data sources with product content type. They must be set for data sources with a file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept products without that restriction.", "type": "string" @@ -723,6 +905,14 @@ "feedLabel": { "description": "Optional. Immutable. The feed label that is specified on the data source level. Must be less than or equal to 20 uppercase letters (A-Z), numbers (0-9), and dashes (-). See also [migration to feed labels](https://developers.google.com/shopping-content/guides/products/feed-labels). `feedLabel` and `contentLanguage` must be either both set or unset for data sources with product content type. They must be set for data sources with a file input. If set, the data source will only accept products matching this combination. If unset, the data source will accept produts without that restriction.", "type": "string" + }, + "referencingPrimaryDataSources": { + "description": "Output only. The (unordered and deduplicated) list of all primary data sources linked to this data source in either default or custom rules. Supplemental data source cannot be deleted before all links are removed.", + "items": { + "$ref": "DataSourceReference" + }, + "readOnly": true, + "type": "array" } }, "type": "object" diff --git a/merchantapi/datasources_v1beta/merchantapi-gen.go b/merchantapi/datasources_v1beta/merchantapi-gen.go index f8af0a5fd58..97ea4ec4996 100644 --- a/merchantapi/datasources_v1beta/merchantapi-gen.go +++ b/merchantapi/datasources_v1beta/merchantapi-gen.go @@ -167,11 +167,23 @@ type AccountsService struct { func NewAccountsDataSourcesService(s *Service) *AccountsDataSourcesService { rs := &AccountsDataSourcesService{s: s} + rs.FileUploads = NewAccountsDataSourcesFileUploadsService(s) return rs } type AccountsDataSourcesService struct { s *Service + + FileUploads *AccountsDataSourcesFileUploadsService +} + +func NewAccountsDataSourcesFileUploadsService(s *Service) *AccountsDataSourcesFileUploadsService { + rs := &AccountsDataSourcesFileUploadsService{s: s} + return rs +} + +type AccountsDataSourcesFileUploadsService struct { + s *Service } // DataSource: The data source @@ -245,6 +257,68 @@ func (s DataSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DataSourceReference: Data source reference can be used to manage related +// data sources within the data source service. +type DataSourceReference struct { + // PrimaryDataSourceName: Optional. The name of the primary data source. + // Format: `accounts/{account}/dataSources/{datasource}` + PrimaryDataSourceName string `json:"primaryDataSourceName,omitempty"` + // Self: Self should be used to reference the primary data source itself. + Self bool `json:"self,omitempty"` + // SupplementalDataSourceName: Optional. The name of the supplemental data + // source. Format: `accounts/{account}/dataSources/{datasource}` + SupplementalDataSourceName string `json:"supplementalDataSourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrimaryDataSourceName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PrimaryDataSourceName") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DataSourceReference) MarshalJSON() ([]byte, error) { + type NoMethod DataSourceReference + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DefaultRule: Default rule management of the data source. +type DefaultRule struct { + // TakeFromDataSources: Required. The list of data sources linked in the + // default rule (https://support.google.com/merchants/answer/7450276). This + // list is ordered by the default rule priority of joining the data. It might + // include none or multiple references to `self` and supplemental data sources. + // The list must not be empty. To link the data source to the default rule, you + // need to add a new reference to this list (in sequential order). To unlink + // the data source from the default rule, you need to remove the given + // reference from this list. Changing the order of this list will result in + // changing the priority of data sources in the default rule. For example, + // providing the following list: [`1001`, `self`] will take attribute values + // from supplemental data source `1001`, and fallback to `self` if the + // attribute is not set in `1001`. + TakeFromDataSources []*DataSourceReference `json:"takeFromDataSources,omitempty"` + // ForceSendFields is a list of field names (e.g. "TakeFromDataSources") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TakeFromDataSources") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DefaultRule) MarshalJSON() ([]byte, error) { + type NoMethod DefaultRule + return gensupport.MarshalJSON(NoMethod(s), 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 @@ -361,6 +435,104 @@ func (s FileInput) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// FileUpload: The file upload of a specific data source, that is, the result +// of the retrieval of the data source at a certain timestamp computed +// asynchronously when the data source processing is finished. Only applicable +// to file data sources. +type FileUpload struct { + // DataSourceId: Output only. The data source id. + DataSourceId int64 `json:"dataSourceId,omitempty,string"` + // Issues: Output only. The list of issues occurring in the data source. + Issues []*Issue `json:"issues,omitempty"` + // ItemsCreated: Output only. The number of items in the data source that were + // created. + ItemsCreated int64 `json:"itemsCreated,omitempty,string"` + // ItemsTotal: Output only. The number of items in the data source that were + // processed. + ItemsTotal int64 `json:"itemsTotal,omitempty,string"` + // ItemsUpdated: Output only. The number of items in the data source that were + // updated. + ItemsUpdated int64 `json:"itemsUpdated,omitempty,string"` + // Name: Identifier. The name of the data source file upload. Format: + // `{datasource.name=accounts/{account}/dataSources/{datasource}/fileUploads/{fi + // leupload}}` + Name string `json:"name,omitempty"` + // ProcessingState: Output only. The processing state of the data source. + // + // Possible values: + // "PROCESSING_STATE_UNSPECIFIED" - Processing state unspecified. + // "FAILED" - The data source could not be processed or all the items had + // errors. + // "IN_PROGRESS" - The data source is being processed. + // "SUCCEEDED" - The data source was processed successfully, though some + // items might have had errors. + ProcessingState string `json:"processingState,omitempty"` + // UploadTime: Output only. The date at which the file of the data source was + // uploaded. + UploadTime string `json:"uploadTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DataSourceId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataSourceId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s FileUpload) MarshalJSON() ([]byte, error) { + type NoMethod FileUpload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Issue: An error occurring in the data source, like "invalid price". +type Issue struct { + // Code: Output only. The code of the error, for example, + // "validation/invalid_value". Returns "?" if the code is unknown. + Code string `json:"code,omitempty"` + // Count: Output only. The number of occurrences of the error in the file + // upload. + Count int64 `json:"count,omitempty,string"` + // Description: Output only. The error description, for example, "Your data + // source contains items which have too many attributes, or are too big. These + // items will be dropped". + Description string `json:"description,omitempty"` + // DocumentationUri: Output only. Link to the documentation explaining the + // issue in more details, if available. + DocumentationUri string `json:"documentationUri,omitempty"` + // Severity: Output only. The severity of the issue. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Severity unspecified. + // "WARNING" - The issue is the warning. + // "ERROR" - The issue is an error. + Severity string `json:"severity,omitempty"` + // Title: Output only. The title of the issue, for example, "Item too big". + Title string `json:"title,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Issue) MarshalJSON() ([]byte, error) { + type NoMethod Issue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListDataSourcesResponse: Response message for the ListDataSources method. type ListDataSourcesResponse struct { // DataSources: The data sources from the specified account. @@ -441,6 +613,9 @@ type PrimaryProductDataSource struct { // Represented as a CLDR territory code // (https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml). Countries []string `json:"countries,omitempty"` + // DefaultRule: Optional. Default rule management of the data source. If set, + // the linked data sources will be replaced. + DefaultRule *DefaultRule `json:"defaultRule,omitempty"` // FeedLabel: Optional. Immutable. The feed label that is specified on the data // source level. Must be less than or equal to 20 uppercase letters (A-Z), // numbers (0-9), and dashes (-). See also migration to feed labels @@ -660,6 +835,11 @@ type SupplementalProductDataSource struct { // combination. If unset, the data source will accept produts without that // restriction. FeedLabel string `json:"feedLabel,omitempty"` + // ReferencingPrimaryDataSources: Output only. The (unordered and deduplicated) + // list of all primary data sources linked to this data source in either + // default or custom rules. Supplemental data source cannot be deleted before + // all links are removed. + ReferencingPrimaryDataSources []*DataSourceReference `json:"referencingPrimaryDataSources,omitempty"` // ForceSendFields is a list of field names (e.g. "ContentLanguage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1382,3 +1562,112 @@ func (c *AccountsDataSourcesPatchCall) Do(opts ...googleapi.CallOption) (*DataSo } return ret, nil } + +type AccountsDataSourcesFileUploadsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest data source file upload. Only the `latest` alias is +// accepted for a file upload. +// +// - name: The name of the data source file upload to retrieve. Format: +// `accounts/{account}/dataSources/{datasource}/fileUploads/latest`. +func (r *AccountsDataSourcesFileUploadsService) Get(name string) *AccountsDataSourcesFileUploadsGetCall { + c := &AccountsDataSourcesFileUploadsGetCall{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 +// details. +func (c *AccountsDataSourcesFileUploadsGetCall) Fields(s ...googleapi.Field) *AccountsDataSourcesFileUploadsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *AccountsDataSourcesFileUploadsGetCall) IfNoneMatch(entityTag string) *AccountsDataSourcesFileUploadsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *AccountsDataSourcesFileUploadsGetCall) Context(ctx context.Context) *AccountsDataSourcesFileUploadsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *AccountsDataSourcesFileUploadsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AccountsDataSourcesFileUploadsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "datasources/v1beta/{+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 "merchantapi.accounts.dataSources.fileUploads.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *FileUpload.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 *AccountsDataSourcesFileUploadsGetCall) Do(opts ...googleapi.CallOption) (*FileUpload, 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 := &FileUpload{ + 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 +} diff --git a/merchantapi/products_v1beta/merchantapi-api.json b/merchantapi/products_v1beta/merchantapi-api.json index 5a68f170bcc..ddde2611e17 100644 --- a/merchantapi/products_v1beta/merchantapi-api.json +++ b/merchantapi/products_v1beta/merchantapi-api.json @@ -242,7 +242,7 @@ } } }, - "revision": "20240827", + "revision": "20240916", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Attributes": { @@ -415,8 +415,11 @@ "type": "string" }, "gtin": { - "description": "Global Trade Item Number ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the item.", - "type": "string" + "description": "Global Trade Item Numbers ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the item. You can provide up to 10 GTINs.", + "items": { + "type": "string" + }, + "type": "array" }, "identifierExists": { "description": "Set this value to false when the item does not have unique product identifiers appropriate to its category, such as GTIN, MPN, and brand. Defaults to true, if not provided.", diff --git a/merchantapi/products_v1beta/merchantapi-gen.go b/merchantapi/products_v1beta/merchantapi-gen.go index 854e2ccc58c..5bae822e858 100644 --- a/merchantapi/products_v1beta/merchantapi-gen.go +++ b/merchantapi/products_v1beta/merchantapi-gen.go @@ -293,9 +293,10 @@ type Attributes struct { // currently no way to get back the auto assigned google product categories // through the API. GoogleProductCategory string `json:"googleProductCategory,omitempty"` - // Gtin: Global Trade Item Number (GTIN - // (https://support.google.com/merchants/answer/188494#gtin)) of the item. - Gtin string `json:"gtin,omitempty"` + // Gtin: Global Trade Item Numbers (GTIN + // (https://support.google.com/merchants/answer/188494#gtin)) of the item. You + // can provide up to 10 GTINs. + Gtin []string `json:"gtin,omitempty"` // IdentifierExists: Set this value to false when the item does not have unique // product identifiers appropriate to its category, such as GTIN, MPN, and // brand. Defaults to true, if not provided. diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 79c3ba49dcc..62af16c551a 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -2812,7 +2812,7 @@ } } }, - "revision": "20240807", + "revision": "20240911", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AcceptHubSpokeRequest": { @@ -2942,9 +2942,17 @@ "type": "string" }, "producerInstanceId": { - "description": "Immutable. An immutable identifier for the producer instance.", + "deprecated": true, + "description": "Immutable. Deprecated. Use producer_instance_metadata instead. An immutable identifier for the producer instance.", "type": "string" }, + "producerInstanceMetadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Immutable. An immutable map for the producer instance metadata.", + "type": "object" + }, "project": { "description": "The consumer project where PSC connections are allowed to be created in.", "type": "string" @@ -2994,6 +3002,7 @@ "readOnly": true }, "errorType": { + "deprecated": true, "description": "The error type indicates whether the error is consumer facing, producer facing or system internal.", "enum": [ "CONNECTION_ERROR_TYPE_UNSPECIFIED", @@ -3026,9 +3035,17 @@ "type": "string" }, "producerInstanceId": { - "description": "Immutable. An immutable identifier for the producer instance.", + "deprecated": true, + "description": "Immutable. Deprecated. Use producer_instance_metadata instead. An immutable identifier for the producer instance.", "type": "string" }, + "producerInstanceMetadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Immutable. An immutable map for the producer instance metadata.", + "type": "object" + }, "project": { "description": "The consumer project whose PSC forwarding rule is connected to the service attachments in this service connection map.", "type": "string" @@ -3057,7 +3074,7 @@ ], "enumDescriptions": [ "An invalid state as the default case.", - "The connection is fully established and ready to use.", + "The connection has been created successfully. However, for the up-to-date connection status, please use the service attachment's \"ConnectedEndpoint.status\" as the source of truth.", "The connection is not functional since some resources on the connection fail to be created.", "The connection is being created.", "The connection is being deleted." @@ -3451,7 +3468,7 @@ "type": "string" }, "ipCidrRange": { - "description": "The IP range that this internal range defines.", + "description": "The IP range that this internal range defines. NOTE: IPv6 ranges are limited to usage=EXTERNAL_TO_VPC and peering=FOR_SELF. NOTE: For IPv6 Ranges this field is compulsory, i.e. the address range must be specified explicitly.", "type": "string" }, "labels": { @@ -3461,6 +3478,10 @@ "description": "User-defined labels.", "type": "object" }, + "migration": { + "$ref": "Migration", + "description": "Optional. Should be present if usage is set to FOR_MIGRATION." + }, "name": { "description": "Immutable. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", "type": "string" @@ -3503,7 +3524,7 @@ "type": "string" }, "prefixLength": { - "description": "An alternate to ip_cidr_range. Can be set when trying to create a reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size.", + "description": "An alternate to ip_cidr_range. Can be set when trying to create an IPv4 reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size. NOTE: For IPv6 this field only works if ip_cidr_range is set as well, and both fields must match. In other words, with IPv6 this field only works as a redundant parameter.", "format": "int32", "type": "integer" }, @@ -3524,12 +3545,14 @@ "enum": [ "USAGE_UNSPECIFIED", "FOR_VPC", - "EXTERNAL_TO_VPC" + "EXTERNAL_TO_VPC", + "FOR_MIGRATION" ], "enumDescriptions": [ "Unspecified usage is allowed in calls which identify the resource by other fields and do not need Usage set to complete. These are, i.e.: GetInternalRange and DeleteInternalRange. Usage needs to be specified explicitly in CreateInternalRange or UpdateInternalRange calls.", "A VPC resource can use the reserved CIDR block by associating it with the internal range resource if usage is set to FOR_VPC.", - "Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC resources and are meant to block out address ranges for various use cases, like for example, usage on-prem, with dynamic route announcements via interconnect." + "Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC resources and are meant to block out address ranges for various use cases, like for example, usage on-prem, with dynamic route announcements via interconnect.", + "Ranges created FOR_MIGRATION can be used to lock a CIDR range between a source and target subnet. If usage is set to FOR_MIGRATION the peering value has to be set to FOR_SELF or default to FOR_SELF when unset." ], "type": "string" }, @@ -4068,6 +4091,21 @@ }, "type": "object" }, + "Migration": { + "description": "Specification for migration with source and target resource names.", + "id": "Migration", + "properties": { + "source": { + "description": "Immutable. Resource path as an URI of the source resource, for example a subnet. The project for the source resource should match the project for the InternalRange. An example: /projects/{project}/regions/{region}/subnetworks/{subnet}", + "type": "string" + }, + "target": { + "description": "Immutable. Resource path of the target resource. The target project can be different, as in the cases when migrating to peer networks. The resource For example: /projects/{project}/regions/{region}/subnetworks/{subnet}", + "type": "string" + } + }, + "type": "object" + }, "NextHopInterconnectAttachment": { "description": "A route next hop that leads to an interconnect attachment resource.", "id": "NextHopInterconnectAttachment", @@ -4367,7 +4405,7 @@ "error": { "$ref": "GoogleRpcStatus", "deprecated": true, - "description": "The most recent error during operating this connection." + "description": "The most recent error during operating this connection. Deprecated, please use error_info instead." }, "errorInfo": { "$ref": "GoogleRpcErrorInfo", @@ -4375,6 +4413,7 @@ "readOnly": true }, "errorType": { + "deprecated": true, "description": "The error type indicates whether the error is consumer facing, producer facing or system internal.", "enum": [ "CONNECTION_ERROR_TYPE_UNSPECIFIED", @@ -4395,9 +4434,17 @@ "type": "string" }, "producerInstanceId": { - "description": "Immutable. An immutable identifier for the producer instance.", + "deprecated": true, + "description": "Immutable. Deprecated. Use producer_instance_metadata instead. An immutable identifier for the producer instance.", "type": "string" }, + "producerInstanceMetadata": { + "additionalProperties": { + "type": "string" + }, + "description": "Immutable. An immutable map for the producer instance metadata.", + "type": "object" + }, "pscConnectionId": { "description": "The PSC connection id of the PSC forwarding rule.", "type": "string" @@ -4407,6 +4454,11 @@ "readOnly": true, "type": "string" }, + "serviceClass": { + "description": "Output only. [Output only] The service class associated with this PSC Connection. The value is derived from the SCPolicy and matches the service class name provided by the customer.", + "readOnly": true, + "type": "string" + }, "state": { "description": "State of the PSC Connection", "enum": [ @@ -4418,7 +4470,7 @@ ], "enumDescriptions": [ "An invalid state as the default case.", - "The connection is fully established and ready to use.", + "The connection has been created successfully. However, for the up-to-date connection status, please use the created forwarding rule's \"PscConnectionStatus\" as the source of truth.", "The connection is not functional since some resources on the connection fail to be created.", "The connection is being created.", "The connection is being deleted." @@ -4882,7 +4934,7 @@ "id": "ServiceConnectionPolicy", "properties": { "createTime": { - "description": "Output only. Time when the ServiceConnectionMap was created.", + "description": "Output only. Time when the ServiceConnectionPolicy was created.", "format": "google-datetime", "readOnly": true, "type": "string" @@ -4940,7 +4992,7 @@ "type": "string" }, "updateTime": { - "description": "Output only. Time when the ServiceConnectionMap was updated.", + "description": "Output only. Time when the ServiceConnectionPolicy was updated.", "format": "google-datetime", "readOnly": true, "type": "string" diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 444fb9ff1c8..9ae9ae3c544 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -620,9 +620,12 @@ type ConsumerPscConfig struct { // ConsumerPscConfig.project in the case of SharedVPC. Example: // projects/{projectNumOrId}/global/networks/{networkId}. Network string `json:"network,omitempty"` - // ProducerInstanceId: Immutable. An immutable identifier for the producer - // instance. + // ProducerInstanceId: Immutable. Deprecated. Use producer_instance_metadata + // instead. An immutable identifier for the producer instance. ProducerInstanceId string `json:"producerInstanceId,omitempty"` + // ProducerInstanceMetadata: Immutable. An immutable map for the producer + // instance metadata. + ProducerInstanceMetadata map[string]string `json:"producerInstanceMetadata,omitempty"` // Project: The consumer project where PSC connections are allowed to be // created in. Project string `json:"project,omitempty"` @@ -695,9 +698,12 @@ type ConsumerPscConnection struct { // service attachments in this service connection map. Note that the network // could be on a different project (shared VPC). Network string `json:"network,omitempty"` - // ProducerInstanceId: Immutable. An immutable identifier for the producer - // instance. + // ProducerInstanceId: Immutable. Deprecated. Use producer_instance_metadata + // instead. An immutable identifier for the producer instance. ProducerInstanceId string `json:"producerInstanceId,omitempty"` + // ProducerInstanceMetadata: Immutable. An immutable map for the producer + // instance metadata. + ProducerInstanceMetadata map[string]string `json:"producerInstanceMetadata,omitempty"` // Project: The consumer project whose PSC forwarding rule is connected to the // service attachments in this service connection map. Project string `json:"project,omitempty"` @@ -714,7 +720,9 @@ type ConsumerPscConnection struct { // // Possible values: // "STATE_UNSPECIFIED" - An invalid state as the default case. - // "ACTIVE" - The connection is fully established and ready to use. + // "ACTIVE" - The connection has been created successfully. However, for the + // up-to-date connection status, please use the service attachment's + // "ConnectedEndpoint.status" as the source of truth. // "FAILED" - The connection is not functional since some resources on the // connection fail to be created. // "CREATING" - The connection is being created. @@ -1195,10 +1203,15 @@ type InternalRange struct { CreateTime string `json:"createTime,omitempty"` // Description: A description of this resource. Description string `json:"description,omitempty"` - // IpCidrRange: The IP range that this internal range defines. + // IpCidrRange: The IP range that this internal range defines. NOTE: IPv6 + // ranges are limited to usage=EXTERNAL_TO_VPC and peering=FOR_SELF. NOTE: For + // IPv6 Ranges this field is compulsory, i.e. the address range must be + // specified explicitly. IpCidrRange string `json:"ipCidrRange,omitempty"` // Labels: User-defined labels. Labels map[string]string `json:"labels,omitempty"` + // Migration: Optional. Should be present if usage is set to FOR_MIGRATION. + Migration *Migration `json:"migration,omitempty"` // Name: Immutable. The name of an internal range. Format: // projects/{project}/locations/{location}/internalRanges/{internal_range} See: // https://google.aip.dev/122#fields-representing-resource-names @@ -1243,10 +1256,12 @@ type InternalRange struct { // re-use this range as long as it is NOT_SHARED from the peer VPC, too. Peering string `json:"peering,omitempty"` // PrefixLength: An alternate to ip_cidr_range. Can be set when trying to - // create a reservation that automatically finds a free range of the given - // size. If both ip_cidr_range and prefix_length are set, there is an error if - // the range sizes do not match. Can also be used during updates to change the - // range size. + // create an IPv4 reservation that automatically finds a free range of the + // given size. If both ip_cidr_range and prefix_length are set, there is an + // error if the range sizes do not match. Can also be used during updates to + // change the range size. NOTE: For IPv6 this field only works if ip_cidr_range + // is set as well, and both fields must match. In other words, with IPv6 this + // field only works as a redundant parameter. PrefixLength int64 `json:"prefixLength,omitempty"` // TargetCidrRange: Optional. Can be set to narrow down or pick a different // address space while searching for a free range. If not set, defaults to the @@ -1269,6 +1284,10 @@ type InternalRange struct { // associated with VPC resources and are meant to block out address ranges for // various use cases, like for example, usage on-prem, with dynamic route // announcements via interconnect. + // "FOR_MIGRATION" - Ranges created FOR_MIGRATION can be used to lock a CIDR + // range between a source and target subnet. If usage is set to FOR_MIGRATION + // the peering value has to be set to FOR_SELF or default to FOR_SELF when + // unset. Usage string `json:"usage,omitempty"` // Users: Output only. The list of resources that refer to this internal range. // Resources that use the internal range for their range allocation are @@ -1943,6 +1962,37 @@ func (s LocationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Migration: Specification for migration with source and target resource +// names. +type Migration struct { + // Source: Immutable. Resource path as an URI of the source resource, for + // example a subnet. The project for the source resource should match the + // project for the InternalRange. An example: + // /projects/{project}/regions/{region}/subnetworks/{subnet} + Source string `json:"source,omitempty"` + // Target: Immutable. Resource path of the target resource. The target project + // can be different, as in the cases when migrating to peer networks. The + // resource For example: + // /projects/{project}/regions/{region}/subnetworks/{subnet} + Target string `json:"target,omitempty"` + // ForceSendFields is a list of field names (e.g. "Source") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Source") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Migration) MarshalJSON() ([]byte, error) { + type NoMethod Migration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // NextHopInterconnectAttachment: A route next hop that leads to an // interconnect attachment resource. type NextHopInterconnectAttachment struct { @@ -2351,7 +2401,8 @@ type PscConnection struct { ConsumerForwardingRule string `json:"consumerForwardingRule,omitempty"` // ConsumerTargetProject: The project where the PSC connection is created. ConsumerTargetProject string `json:"consumerTargetProject,omitempty"` - // Error: The most recent error during operating this connection. + // Error: The most recent error during operating this connection. Deprecated, + // please use error_info instead. Error *GoogleRpcStatus `json:"error,omitempty"` // ErrorInfo: Output only. The error info for the latest error during operating // this connection. @@ -2368,19 +2419,28 @@ type PscConnection struct { ErrorType string `json:"errorType,omitempty"` // GceOperation: The last Compute Engine operation to setup PSC connection. GceOperation string `json:"gceOperation,omitempty"` - // ProducerInstanceId: Immutable. An immutable identifier for the producer - // instance. + // ProducerInstanceId: Immutable. Deprecated. Use producer_instance_metadata + // instead. An immutable identifier for the producer instance. ProducerInstanceId string `json:"producerInstanceId,omitempty"` + // ProducerInstanceMetadata: Immutable. An immutable map for the producer + // instance metadata. + ProducerInstanceMetadata map[string]string `json:"producerInstanceMetadata,omitempty"` // PscConnectionId: The PSC connection id of the PSC forwarding rule. PscConnectionId string `json:"pscConnectionId,omitempty"` // SelectedSubnetwork: Output only. The URI of the subnetwork selected to // allocate IP address for this connection. SelectedSubnetwork string `json:"selectedSubnetwork,omitempty"` + // ServiceClass: Output only. [Output only] The service class associated with + // this PSC Connection. The value is derived from the SCPolicy and matches the + // service class name provided by the customer. + ServiceClass string `json:"serviceClass,omitempty"` // State: State of the PSC Connection // // Possible values: // "STATE_UNSPECIFIED" - An invalid state as the default case. - // "ACTIVE" - The connection is fully established and ready to use. + // "ACTIVE" - The connection has been created successfully. However, for the + // up-to-date connection status, please use the created forwarding rule's + // "PscConnectionStatus" as the source of truth. // "FAILED" - The connection is not functional since some resources on the // connection fail to be created. // "CREATING" - The connection is being created. @@ -2852,7 +2912,7 @@ func (s ServiceConnectionMap) MarshalJSON() ([]byte, error) { // ServiceConnectionPolicy: The ServiceConnectionPolicy resource. Next id: 12 type ServiceConnectionPolicy struct { - // CreateTime: Output only. Time when the ServiceConnectionMap was created. + // CreateTime: Output only. Time when the ServiceConnectionPolicy was created. CreateTime string `json:"createTime,omitempty"` // Description: A description of this resource. Description string `json:"description,omitempty"` @@ -2891,7 +2951,7 @@ type ServiceConnectionPolicy struct { // gcp-memorystore-redis or google-cloud-sql. 3rd party services do not. For // example, test-service-a3dfcx. ServiceClass string `json:"serviceClass,omitempty"` - // UpdateTime: Output only. Time when the ServiceConnectionMap was updated. + // UpdateTime: Output only. Time when the ServiceConnectionPolicy was updated. UpdateTime string `json:"updateTime,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. diff --git a/networkconnectivity/v1alpha1/networkconnectivity-api.json b/networkconnectivity/v1alpha1/networkconnectivity-api.json index 3f963fa79d2..1bdd9a742fa 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-api.json +++ b/networkconnectivity/v1alpha1/networkconnectivity-api.json @@ -1116,7 +1116,7 @@ } } }, - "revision": "20240807", + "revision": "20240911", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1383,7 +1383,7 @@ "type": "string" }, "ipCidrRange": { - "description": "IP range that this internal range defines.", + "description": "IP range that this internal range defines. NOTE: IPv6 ranges are limited to usage=EXTERNAL_TO_VPC and peering=FOR_SELF. NOTE: For IPv6 Ranges this field is compulsory, i.e. the address range must be specified explicitly.", "type": "string" }, "labels": { @@ -1439,7 +1439,7 @@ "type": "string" }, "prefixLength": { - "description": "An alternative to ip_cidr_range. Can be set when trying to create a reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size.", + "description": "An alternative to ip_cidr_range. Can be set when trying to create an IPv4 reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size. NOTE: For IPv6 this field only works if ip_cidr_range is set as well, and both fields must match. In other words, with IPv6 this field only works as a redundant parameter.", "format": "int32", "type": "integer" }, diff --git a/networkconnectivity/v1alpha1/networkconnectivity-gen.go b/networkconnectivity/v1alpha1/networkconnectivity-gen.go index b6aef193027..db9bc6967c1 100644 --- a/networkconnectivity/v1alpha1/networkconnectivity-gen.go +++ b/networkconnectivity/v1alpha1/networkconnectivity-gen.go @@ -644,7 +644,10 @@ type InternalRange struct { CreateTime string `json:"createTime,omitempty"` // Description: A description of this resource. Description string `json:"description,omitempty"` - // IpCidrRange: IP range that this internal range defines. + // IpCidrRange: IP range that this internal range defines. NOTE: IPv6 ranges + // are limited to usage=EXTERNAL_TO_VPC and peering=FOR_SELF. NOTE: For IPv6 + // Ranges this field is compulsory, i.e. the address range must be specified + // explicitly. IpCidrRange string `json:"ipCidrRange,omitempty"` // Labels: User-defined labels. Labels map[string]string `json:"labels,omitempty"` @@ -694,10 +697,12 @@ type InternalRange struct { // re-use this range as long as it is NOT_SHARED from the peer VPC, too. Peering string `json:"peering,omitempty"` // PrefixLength: An alternative to ip_cidr_range. Can be set when trying to - // create a reservation that automatically finds a free range of the given - // size. If both ip_cidr_range and prefix_length are set, there is an error if - // the range sizes do not match. Can also be used during updates to change the - // range size. + // create an IPv4 reservation that automatically finds a free range of the + // given size. If both ip_cidr_range and prefix_length are set, there is an + // error if the range sizes do not match. Can also be used during updates to + // change the range size. NOTE: For IPv6 this field only works if ip_cidr_range + // is set as well, and both fields must match. In other words, with IPv6 this + // field only works as a redundant parameter. PrefixLength int64 `json:"prefixLength,omitempty"` // TargetCidrRange: Optional. Can be set to narrow down or pick a different // address space while searching for a free range. If not set, defaults to the diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index c7ec7e3468a..eb2adde9796 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240821", + "revision": "20240905", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -630,6 +630,8 @@ "ROUTE_CONFIG_NOT_FOUND", "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT", "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED", + "SOURCE_REDIS_CLUSTER_UNSUPPORTED", + "SOURCE_REDIS_INSTANCE_UNSUPPORTED", "SOURCE_FORWARDING_RULE_UNSUPPORTED", "NON_ROUTABLE_IP_ADDRESS", "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT", @@ -668,6 +670,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -700,6 +704,8 @@ "Aborted because expected route configuration was missing.", "Aborted because a PSC endpoint selection for the Google-managed service is ambiguous (several PSC endpoints satisfy test input).", "Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported.", + "Aborted because tests with a Redis Cluster as a source are not supported.", + "Aborted because tests with a Redis Instance as a source are not supported.", "Aborted because tests with a forwarding rule as a source are not supported.", "Aborted because one of the endpoints is a non-routable IP address (loopback, link-local, etc).", "Aborted due to an unknown issue in the Google-managed project.", @@ -1045,7 +1051,9 @@ "CLOUD_FUNCTION", "APP_ENGINE_VERSION", "CLOUD_RUN_REVISION", - "GOOGLE_MANAGED_SERVICE" + "GOOGLE_MANAGED_SERVICE", + "REDIS_INSTANCE", + "REDIS_CLUSTER" ], "enumDescriptions": [ "Target not specified.", @@ -1063,7 +1071,9 @@ "Target is a Cloud Function. Used only for return traces.", "Target is a App Engine service version. Used only for return traces.", "Target is a Cloud Run revision. Used only for return traces.", - "Target is a Google-managed service. Used only for return traces." + "Target is a Google-managed service. Used only for return traces.", + "Target is a Redis Instance.", + "Target is a Redis Cluster." ], "type": "string" } @@ -1106,6 +1116,7 @@ "GKE_CLUSTER_NOT_RUNNING", "CLOUD_SQL_INSTANCE_NOT_RUNNING", "REDIS_INSTANCE_NOT_RUNNING", + "REDIS_CLUSTER_NOT_RUNNING", "TRAFFIC_TYPE_BLOCKED", "GKE_MASTER_UNAUTHORIZED_ACCESS", "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS", @@ -1145,7 +1156,15 @@ "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE", "LOAD_BALANCER_BACKEND_INVALID_NETWORK", "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED", - "DESTINATION_IS_PRIVATE_NAT_IP_RANGE" + "DESTINATION_IS_PRIVATE_NAT_IP_RANGE", + "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE", + "REDIS_INSTANCE_UNSUPPORTED_PORT", + "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS", + "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK", + "REDIS_INSTANCE_NO_EXTERNAL_IP", + "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE", + "REDIS_CLUSTER_UNSUPPORTED_PORT", + "REDIS_CLUSTER_NO_EXTERNAL_IP" ], "enumDescriptions": [ "Cause is unspecified.", @@ -1177,6 +1196,7 @@ "Packet sent from or to a GKE cluster that is not in running state.", "Packet sent from or to a Cloud SQL instance that is not in running state.", "Packet sent from or to a Redis Instance that is not in running state.", + "Packet sent from or to a Redis Cluster that is not in running state.", "The type of traffic is blocked and the user cannot configure a firewall rule to enable it. See [Always blocked traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for more details.", "Access to Google Kubernetes Engine cluster master's endpoint is not authorized. See [Access to the cluster endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) for more details.", "Access to the Cloud SQL instance endpoint is not authorized. See [Authorizing with authorized networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for more details.", @@ -1216,7 +1236,15 @@ "Packet is dropped due to an unspecified reason inside a Google-managed service. Used only for return traces.", "Packet is dropped due to a load balancer backend instance not having a network interface in the network expected by the load balancer.", "Packet is dropped due to a backend service named port not being defined on the instance group level.", - "Packet is dropped due to a destination IP range being part of a Private NAT IP range." + "Packet is dropped due to a destination IP range being part of a Private NAT IP range.", + "Generic drop cause for a packet being dropped inside a Redis Instance service project.", + "Packet is dropped due to an unsupported port being used to connect to a Redis Instance. Port 6379 should be used to connect to a Redis Instance.", + "Packet is dropped due to connecting from PUPI address to a PSA based Redis Instance.", + "Packet is dropped due to no route to the destination network.", + "Redis Instance does not have an external IP address.", + "Generic drop cause for a packet being dropped inside a Redis Cluster service project.", + "Packet is dropped due to an unsupported port being used to connect to a Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to a Redis Cluster.", + "Redis Cluster does not have an external IP address." ], "type": "string" }, @@ -2385,6 +2413,37 @@ }, "type": "object" }, + "RedisClusterInfo": { + "description": "For display only. Metadata associated with a Redis Cluster.", + "id": "RedisClusterInfo", + "properties": { + "discoveryEndpointIpAddress": { + "description": "Discovery endpoint IP address of a Redis Cluster.", + "type": "string" + }, + "displayName": { + "description": "Name of a Redis Cluster.", + "type": "string" + }, + "location": { + "description": "Name of the region in which the Redis Cluster is defined. For example, \"us-central1\".", + "type": "string" + }, + "networkUri": { + "description": "URI of a Redis Cluster network in format \"projects/{project_id}/global/networks/{network_id}\".", + "type": "string" + }, + "secondaryEndpointIpAddress": { + "description": "Secondary endpoint IP address of a Redis Cluster.", + "type": "string" + }, + "uri": { + "description": "URI of a Redis Cluster in format \"projects/{project_id}/locations/{location}/clusters/{cluster_id}\"", + "type": "string" + } + }, + "type": "object" + }, "RedisInstanceInfo": { "description": "For display only. Metadata associated with a Cloud Redis Instance.", "id": "RedisInstanceInfo", @@ -2713,6 +2772,10 @@ "$ref": "ProxyConnectionInfo", "description": "Display information of a ProxyConnection." }, + "redisCluster": { + "$ref": "RedisClusterInfo", + "description": "Display information of a Redis Cluster." + }, "redisInstance": { "$ref": "RedisInstanceInfo", "description": "Display information of a Redis Instance." @@ -2736,6 +2799,7 @@ "START_FROM_GKE_MASTER", "START_FROM_CLOUD_SQL_INSTANCE", "START_FROM_REDIS_INSTANCE", + "START_FROM_REDIS_CLUSTER", "START_FROM_CLOUD_FUNCTION", "START_FROM_APP_ENGINE_VERSION", "START_FROM_CLOUD_RUN_REVISION", @@ -2784,6 +2848,7 @@ false, false, false, + false, true, true, false, @@ -2806,6 +2871,7 @@ "Initial state: packet originating from a Google Kubernetes Engine cluster master. A GKEMasterInfo is populated with starting instance information.", "Initial state: packet originating from a Cloud SQL instance. A CloudSQLInstanceInfo is populated with starting instance information.", "Initial state: packet originating from a Redis instance. A RedisInstanceInfo is populated with starting instance information.", + "Initial state: packet originating from a Redis Cluster. A RedisClusterInfo is populated with starting Cluster information.", "Initial state: packet originating from a Cloud Function. A CloudFunctionInfo is populated with starting function information.", "Initial state: packet originating from an App Engine service version. An AppEngineVersionInfo is populated with starting version information.", "Initial state: packet originating from a Cloud Run revision. A CloudRunRevisionInfo is populated with starting revision information.", diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 8aadf955c71..16161e8aa71 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -280,6 +280,10 @@ type AbortInfo struct { // endpoints satisfy test input). // "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED" - Aborted because tests with a // PSC-based Cloud SQL instance as a source are not supported. + // "SOURCE_REDIS_CLUSTER_UNSUPPORTED" - Aborted because tests with a Redis + // Cluster as a source are not supported. + // "SOURCE_REDIS_INSTANCE_UNSUPPORTED" - Aborted because tests with a Redis + // Instance as a source are not supported. // "SOURCE_FORWARDING_RULE_UNSUPPORTED" - Aborted because tests with a // forwarding rule as a source are not supported. // "NON_ROUTABLE_IP_ADDRESS" - Aborted because one of the endpoints is a @@ -812,6 +816,8 @@ type DeliverInfo struct { // return traces. // "GOOGLE_MANAGED_SERVICE" - Target is a Google-managed service. Used only // for return traces. + // "REDIS_INSTANCE" - Target is a Redis Instance. + // "REDIS_CLUSTER" - Target is a Redis Cluster. Target string `json:"target,omitempty"` // ForceSendFields is a list of field names (e.g. "IpAddress") to // unconditionally include in API requests. By default, fields with empty or @@ -906,6 +912,8 @@ type DropInfo struct { // instance that is not in running state. // "REDIS_INSTANCE_NOT_RUNNING" - Packet sent from or to a Redis Instance // that is not in running state. + // "REDIS_CLUSTER_NOT_RUNNING" - Packet sent from or to a Redis Cluster that + // is not in running state. // "TRAFFIC_TYPE_BLOCKED" - The type of traffic is blocked and the user // cannot configure a firewall rule to enable it. See [Always blocked // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for @@ -1008,6 +1016,24 @@ type DropInfo struct { // backend service named port not being defined on the instance group level. // "DESTINATION_IS_PRIVATE_NAT_IP_RANGE" - Packet is dropped due to a // destination IP range being part of a Private NAT IP range. + // "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE" - Generic drop cause for a packet + // being dropped inside a Redis Instance service project. + // "REDIS_INSTANCE_UNSUPPORTED_PORT" - Packet is dropped due to an + // unsupported port being used to connect to a Redis Instance. Port 6379 should + // be used to connect to a Redis Instance. + // "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS" - Packet is dropped due to + // connecting from PUPI address to a PSA based Redis Instance. + // "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK" - Packet is dropped due + // to no route to the destination network. + // "REDIS_INSTANCE_NO_EXTERNAL_IP" - Redis Instance does not have an external + // IP address. + // "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE" - Generic drop cause for a packet + // being dropped inside a Redis Cluster service project. + // "REDIS_CLUSTER_UNSUPPORTED_PORT" - Packet is dropped due to an unsupported + // port being used to connect to a Redis Cluster. Ports 6379 and 11000 to 13047 + // should be used to connect to a Redis Cluster. + // "REDIS_CLUSTER_NO_EXTERNAL_IP" - Redis Cluster does not have an external + // IP address. Cause string `json:"cause,omitempty"` // DestinationIp: Destination IP address of the dropped packet (if relevant). DestinationIp string `json:"destinationIp,omitempty"` @@ -2309,6 +2335,44 @@ func (s ReachabilityDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RedisClusterInfo: For display only. Metadata associated with a Redis +// Cluster. +type RedisClusterInfo struct { + // DiscoveryEndpointIpAddress: Discovery endpoint IP address of a Redis + // Cluster. + DiscoveryEndpointIpAddress string `json:"discoveryEndpointIpAddress,omitempty"` + // DisplayName: Name of a Redis Cluster. + DisplayName string `json:"displayName,omitempty"` + // Location: Name of the region in which the Redis Cluster is defined. For + // example, "us-central1". + Location string `json:"location,omitempty"` + // NetworkUri: URI of a Redis Cluster network in format + // "projects/{project_id}/global/networks/{network_id}". + NetworkUri string `json:"networkUri,omitempty"` + // SecondaryEndpointIpAddress: Secondary endpoint IP address of a Redis + // Cluster. + SecondaryEndpointIpAddress string `json:"secondaryEndpointIpAddress,omitempty"` + // Uri: URI of a Redis Cluster in format + // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "DiscoveryEndpointIpAddress") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DiscoveryEndpointIpAddress") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RedisClusterInfo) MarshalJSON() ([]byte, error) { + type NoMethod RedisClusterInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RedisInstanceInfo: For display only. Metadata associated with a Cloud Redis // Instance. type RedisInstanceInfo struct { @@ -2583,6 +2647,8 @@ type Step struct { ProjectId string `json:"projectId,omitempty"` // ProxyConnection: Display information of a ProxyConnection. ProxyConnection *ProxyConnectionInfo `json:"proxyConnection,omitempty"` + // RedisCluster: Display information of a Redis Cluster. + RedisCluster *RedisClusterInfo `json:"redisCluster,omitempty"` // RedisInstance: Display information of a Redis Instance. RedisInstance *RedisInstanceInfo `json:"redisInstance,omitempty"` // Route: Display information of a Compute Engine route. @@ -2614,6 +2680,9 @@ type Step struct { // "START_FROM_REDIS_INSTANCE" - Initial state: packet originating from a // Redis instance. A RedisInstanceInfo is populated with starting instance // information. + // "START_FROM_REDIS_CLUSTER" - Initial state: packet originating from a + // Redis Cluster. A RedisClusterInfo is populated with starting Cluster + // information. // "START_FROM_CLOUD_FUNCTION" - Initial state: packet originating from a // Cloud Function. A CloudFunctionInfo is populated with starting function // information. diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index f6a22da0660..234f6a90dbd 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -758,7 +758,7 @@ } } }, - "revision": "20240821", + "revision": "20240905", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -797,6 +797,8 @@ "ROUTE_CONFIG_NOT_FOUND", "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT", "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED", + "SOURCE_REDIS_CLUSTER_UNSUPPORTED", + "SOURCE_REDIS_INSTANCE_UNSUPPORTED", "SOURCE_FORWARDING_RULE_UNSUPPORTED", "NON_ROUTABLE_IP_ADDRESS", "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT", @@ -835,6 +837,8 @@ false, false, false, + false, + false, false ], "enumDescriptions": [ @@ -867,6 +871,8 @@ "Aborted because expected route configuration was missing.", "Aborted because a PSC endpoint selection for the Google-managed service is ambiguous (several PSC endpoints satisfy test input).", "Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported.", + "Aborted because tests with a Redis Cluster as a source are not supported.", + "Aborted because tests with a Redis Instance as a source are not supported.", "Aborted because tests with a forwarding rule as a source are not supported.", "Aborted because one of the endpoints is a non-routable IP address (loopback, link-local, etc).", "Aborted due to an unknown issue in the Google-managed project.", @@ -1217,7 +1223,9 @@ "CLOUD_FUNCTION", "APP_ENGINE_VERSION", "CLOUD_RUN_REVISION", - "GOOGLE_MANAGED_SERVICE" + "GOOGLE_MANAGED_SERVICE", + "REDIS_INSTANCE", + "REDIS_CLUSTER" ], "enumDescriptions": [ "Target not specified.", @@ -1235,7 +1243,9 @@ "Target is a Cloud Function. Used only for return traces.", "Target is a App Engine service version. Used only for return traces.", "Target is a Cloud Run revision. Used only for return traces.", - "Target is a Google-managed service. Used only for return traces." + "Target is a Google-managed service. Used only for return traces.", + "Target is a Redis Instance.", + "Target is a Redis Cluster." ], "type": "string" } @@ -1278,6 +1288,7 @@ "GKE_CLUSTER_NOT_RUNNING", "CLOUD_SQL_INSTANCE_NOT_RUNNING", "REDIS_INSTANCE_NOT_RUNNING", + "REDIS_CLUSTER_NOT_RUNNING", "TRAFFIC_TYPE_BLOCKED", "GKE_MASTER_UNAUTHORIZED_ACCESS", "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS", @@ -1317,7 +1328,15 @@ "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE", "LOAD_BALANCER_BACKEND_INVALID_NETWORK", "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED", - "DESTINATION_IS_PRIVATE_NAT_IP_RANGE" + "DESTINATION_IS_PRIVATE_NAT_IP_RANGE", + "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE", + "REDIS_INSTANCE_UNSUPPORTED_PORT", + "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS", + "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK", + "REDIS_INSTANCE_NO_EXTERNAL_IP", + "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE", + "REDIS_CLUSTER_UNSUPPORTED_PORT", + "REDIS_CLUSTER_NO_EXTERNAL_IP" ], "enumDescriptions": [ "Cause is unspecified.", @@ -1349,6 +1368,7 @@ "Packet sent from or to a GKE cluster that is not in running state.", "Packet sent from or to a Cloud SQL instance that is not in running state.", "Packet sent from or to a Redis Instance that is not in running state.", + "Packet sent from or to a Redis Cluster that is not in running state.", "The type of traffic is blocked and the user cannot configure a firewall rule to enable it. See [Always blocked traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for more details.", "Access to Google Kubernetes Engine cluster master's endpoint is not authorized. See [Access to the cluster endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) for more details.", "Access to the Cloud SQL instance endpoint is not authorized. See [Authorizing with authorized networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for more details.", @@ -1388,7 +1408,15 @@ "Packet is dropped due to an unspecified reason inside a Google-managed service. Used only for return traces.", "Packet is dropped due to a load balancer backend instance not having a network interface in the network expected by the load balancer.", "Packet is dropped due to a backend service named port not being defined on the instance group level.", - "Packet is dropped due to a destination IP range being part of a Private NAT IP range." + "Packet is dropped due to a destination IP range being part of a Private NAT IP range.", + "Generic drop cause for a packet being dropped inside a Redis Instance service project.", + "Packet is dropped due to an unsupported port being used to connect to a Redis Instance. Port 6379 should be used to connect to a Redis Instance.", + "Packet is dropped due to connecting from PUPI address to a PSA based Redis Instance.", + "Packet is dropped due to no route to the destination network.", + "Redis Instance does not have an external IP address.", + "Generic drop cause for a packet being dropped inside a Redis Cluster service project.", + "Packet is dropped due to an unsupported port being used to connect to a Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to a Redis Cluster.", + "Redis Cluster does not have an external IP address." ], "type": "string" }, @@ -2590,6 +2618,37 @@ }, "type": "object" }, + "RedisClusterInfo": { + "description": "For display only. Metadata associated with a Redis Cluster.", + "id": "RedisClusterInfo", + "properties": { + "discoveryEndpointIpAddress": { + "description": "Discovery endpoint IP address of a Redis Cluster.", + "type": "string" + }, + "displayName": { + "description": "Name of a Redis Cluster.", + "type": "string" + }, + "location": { + "description": "Name of the region in which the Redis Cluster is defined. For example, \"us-central1\".", + "type": "string" + }, + "networkUri": { + "description": "URI of a Redis Cluster network in format \"projects/{project_id}/global/networks/{network_id}\".", + "type": "string" + }, + "secondaryEndpointIpAddress": { + "description": "Secondary endpoint IP address of a Redis Cluster.", + "type": "string" + }, + "uri": { + "description": "URI of a Redis Cluster in format \"projects/{project_id}/locations/{location}/clusters/{cluster_id}\"", + "type": "string" + } + }, + "type": "object" + }, "RedisInstanceInfo": { "description": "For display only. Metadata associated with a Cloud Redis Instance.", "id": "RedisInstanceInfo", @@ -2918,6 +2977,10 @@ "$ref": "ProxyConnectionInfo", "description": "Display information of a ProxyConnection." }, + "redisCluster": { + "$ref": "RedisClusterInfo", + "description": "Display information of a Redis Cluster." + }, "redisInstance": { "$ref": "RedisInstanceInfo", "description": "Display information of a Redis Instance." @@ -2941,6 +3004,7 @@ "START_FROM_GKE_MASTER", "START_FROM_CLOUD_SQL_INSTANCE", "START_FROM_REDIS_INSTANCE", + "START_FROM_REDIS_CLUSTER", "START_FROM_CLOUD_FUNCTION", "START_FROM_APP_ENGINE_VERSION", "START_FROM_CLOUD_RUN_REVISION", @@ -2989,6 +3053,7 @@ false, false, false, + false, true, true, false, @@ -3011,6 +3076,7 @@ "Initial state: packet originating from a Google Kubernetes Engine cluster master. A GKEMasterInfo is populated with starting instance information.", "Initial state: packet originating from a Cloud SQL instance. A CloudSQLInstanceInfo is populated with starting instance information.", "Initial state: packet originating from a Redis instance. A RedisInstanceInfo is populated with starting instance information.", + "Initial state: packet originating from a Redis Cluster. A RedisClusterInfo is populated with starting Cluster information.", "Initial state: packet originating from a Cloud Function. A CloudFunctionInfo is populated with starting function information.", "Initial state: packet originating from an App Engine service version. An AppEngineVersionInfo is populated with starting version information.", "Initial state: packet originating from a Cloud Run revision. A CloudRunRevisionInfo is populated with starting revision information.", diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 834512ee9e3..4e8872a22bc 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -292,6 +292,10 @@ type AbortInfo struct { // endpoints satisfy test input). // "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED" - Aborted because tests with a // PSC-based Cloud SQL instance as a source are not supported. + // "SOURCE_REDIS_CLUSTER_UNSUPPORTED" - Aborted because tests with a Redis + // Cluster as a source are not supported. + // "SOURCE_REDIS_INSTANCE_UNSUPPORTED" - Aborted because tests with a Redis + // Instance as a source are not supported. // "SOURCE_FORWARDING_RULE_UNSUPPORTED" - Aborted because tests with a // forwarding rule as a source are not supported. // "NON_ROUTABLE_IP_ADDRESS" - Aborted because one of the endpoints is a @@ -828,6 +832,8 @@ type DeliverInfo struct { // return traces. // "GOOGLE_MANAGED_SERVICE" - Target is a Google-managed service. Used only // for return traces. + // "REDIS_INSTANCE" - Target is a Redis Instance. + // "REDIS_CLUSTER" - Target is a Redis Cluster. Target string `json:"target,omitempty"` // ForceSendFields is a list of field names (e.g. "IpAddress") to // unconditionally include in API requests. By default, fields with empty or @@ -922,6 +928,8 @@ type DropInfo struct { // instance that is not in running state. // "REDIS_INSTANCE_NOT_RUNNING" - Packet sent from or to a Redis Instance // that is not in running state. + // "REDIS_CLUSTER_NOT_RUNNING" - Packet sent from or to a Redis Cluster that + // is not in running state. // "TRAFFIC_TYPE_BLOCKED" - The type of traffic is blocked and the user // cannot configure a firewall rule to enable it. See [Always blocked // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for @@ -1024,6 +1032,24 @@ type DropInfo struct { // backend service named port not being defined on the instance group level. // "DESTINATION_IS_PRIVATE_NAT_IP_RANGE" - Packet is dropped due to a // destination IP range being part of a Private NAT IP range. + // "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE" - Generic drop cause for a packet + // being dropped inside a Redis Instance service project. + // "REDIS_INSTANCE_UNSUPPORTED_PORT" - Packet is dropped due to an + // unsupported port being used to connect to a Redis Instance. Port 6379 should + // be used to connect to a Redis Instance. + // "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS" - Packet is dropped due to + // connecting from PUPI address to a PSA based Redis Instance. + // "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK" - Packet is dropped due + // to no route to the destination network. + // "REDIS_INSTANCE_NO_EXTERNAL_IP" - Redis Instance does not have an external + // IP address. + // "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE" - Generic drop cause for a packet + // being dropped inside a Redis Cluster service project. + // "REDIS_CLUSTER_UNSUPPORTED_PORT" - Packet is dropped due to an unsupported + // port being used to connect to a Redis Cluster. Ports 6379 and 11000 to 13047 + // should be used to connect to a Redis Cluster. + // "REDIS_CLUSTER_NO_EXTERNAL_IP" - Redis Cluster does not have an external + // IP address. Cause string `json:"cause,omitempty"` // DestinationIp: Destination IP address of the dropped packet (if relevant). DestinationIp string `json:"destinationIp,omitempty"` @@ -2362,6 +2388,44 @@ func (s ReachabilityDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RedisClusterInfo: For display only. Metadata associated with a Redis +// Cluster. +type RedisClusterInfo struct { + // DiscoveryEndpointIpAddress: Discovery endpoint IP address of a Redis + // Cluster. + DiscoveryEndpointIpAddress string `json:"discoveryEndpointIpAddress,omitempty"` + // DisplayName: Name of a Redis Cluster. + DisplayName string `json:"displayName,omitempty"` + // Location: Name of the region in which the Redis Cluster is defined. For + // example, "us-central1". + Location string `json:"location,omitempty"` + // NetworkUri: URI of a Redis Cluster network in format + // "projects/{project_id}/global/networks/{network_id}". + NetworkUri string `json:"networkUri,omitempty"` + // SecondaryEndpointIpAddress: Secondary endpoint IP address of a Redis + // Cluster. + SecondaryEndpointIpAddress string `json:"secondaryEndpointIpAddress,omitempty"` + // Uri: URI of a Redis Cluster in format + // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "DiscoveryEndpointIpAddress") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DiscoveryEndpointIpAddress") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RedisClusterInfo) MarshalJSON() ([]byte, error) { + type NoMethod RedisClusterInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RedisInstanceInfo: For display only. Metadata associated with a Cloud Redis // Instance. type RedisInstanceInfo struct { @@ -2636,6 +2700,8 @@ type Step struct { ProjectId string `json:"projectId,omitempty"` // ProxyConnection: Display information of a ProxyConnection. ProxyConnection *ProxyConnectionInfo `json:"proxyConnection,omitempty"` + // RedisCluster: Display information of a Redis Cluster. + RedisCluster *RedisClusterInfo `json:"redisCluster,omitempty"` // RedisInstance: Display information of a Redis Instance. RedisInstance *RedisInstanceInfo `json:"redisInstance,omitempty"` // Route: Display information of a Compute Engine route. @@ -2667,6 +2733,9 @@ type Step struct { // "START_FROM_REDIS_INSTANCE" - Initial state: packet originating from a // Redis instance. A RedisInstanceInfo is populated with starting instance // information. + // "START_FROM_REDIS_CLUSTER" - Initial state: packet originating from a + // Redis Cluster. A RedisClusterInfo is populated with starting Cluster + // information. // "START_FROM_CLOUD_FUNCTION" - Initial state: packet originating from a // Cloud Function. A CloudFunctionInfo is populated with starting function // information. diff --git a/oracledatabase/v1/oracledatabase-api.json b/oracledatabase/v1/oracledatabase-api.json new file mode 100644 index 00000000000..bfc8b5e7c57 --- /dev/null +++ b/oracledatabase/v1/oracledatabase-api.json @@ -0,0 +1,3764 @@ +{ + "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://oracledatabase.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Oracle Database", + "description": "The Oracle Database@Google Cloud API provides set of APIs to manage Oracle databases such as Exadata and Autonomous Databases.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/oracle/database/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": "oracledatabase:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://oracledatabase.mtls.googleapis.com/", + "name": "oracledatabase", + "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": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "oracledatabase.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": "oracledatabase.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": { + "autonomousDatabaseBackups": { + "methods": { + "list": { + "description": "Lists the long term and automatic backups of an Autonomous Database.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autonomousDatabaseBackups", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.autonomousDatabaseBackups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. Only the **autonomous_database_id** field is supported in the following format: `autonomous_database_id=\"{autonomous_database_id}\"`. The accepted values must be a valid Autonomous Database ID, limited to the naming restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). The ID must start with a letter, end with a letter or a number, and be a maximum of 63 characters.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, at most 50 Autonomous DB Backups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for ListAutonomousDatabaseBackups in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/autonomousDatabaseBackups", + "response": { + "$ref": "ListAutonomousDatabaseBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "autonomousDatabaseCharacterSets": { + "methods": { + "list": { + "description": "Lists Autonomous Database Character Sets in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autonomousDatabaseCharacterSets", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.autonomousDatabaseCharacterSets.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. Only the **character_set_type** field is supported in the following format: `character_set_type=\"{characterSetType}\"`. Accepted values include `DATABASE` and `NATIONAL`.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, at most 50 Autonomous DB Character Sets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for the Autonomous Database in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/autonomousDatabaseCharacterSets", + "response": { + "$ref": "ListAutonomousDatabaseCharacterSetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "autonomousDatabases": { + "methods": { + "create": { + "description": "Creates a new Autonomous Database in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autonomousDatabases", + "httpMethod": "POST", + "id": "oracledatabase.projects.locations.autonomousDatabases.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "autonomousDatabaseId": { + "description": "Required. The ID of the Autonomous Database to create. This value is restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 characters in length. The value must start with a letter and end with a letter or a number.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional ID to identify the request. This value is used to identify duplicate requests. If you make a request with the same request ID and the original request is still in progress or completed, the server ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/autonomousDatabases", + "request": { + "$ref": "AutonomousDatabase" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Autonomous Database.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autonomousDatabases/{autonomousDatabasesId}", + "httpMethod": "DELETE", + "id": "oracledatabase.projects.locations.autonomousDatabases.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the resource in the following format: projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/autonomousDatabases/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional ID to identify the request. This value is used to identify duplicate requests. If you make a request with the same request ID and the original request is still in progress or completed, the server ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateWallet": { + "description": "Generates a wallet for a single Autonomous Database.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autonomousDatabases/{autonomousDatabasesId}:generateWallet", + "httpMethod": "POST", + "id": "oracledatabase.projects.locations.autonomousDatabases.generateWallet", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Autonomous Database in the following format: projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/autonomousDatabases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:generateWallet", + "request": { + "$ref": "GenerateAutonomousDatabaseWalletRequest" + }, + "response": { + "$ref": "GenerateAutonomousDatabaseWalletResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a single Autonomous Database.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autonomousDatabases/{autonomousDatabasesId}", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.autonomousDatabases.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Autonomous Database in the following format: projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/autonomousDatabases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "AutonomousDatabase" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists the Autonomous Databases in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autonomousDatabases", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.autonomousDatabases.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. An expression for ordering the results of the request.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, at most 50 Autonomous Database will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for the Autonomous Database in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/autonomousDatabases", + "response": { + "$ref": "ListAutonomousDatabasesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a single Autonomous Database.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autonomousDatabases/{autonomousDatabasesId}:restore", + "httpMethod": "POST", + "id": "oracledatabase.projects.locations.autonomousDatabases.restore", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Autonomous Database in the following format: projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/autonomousDatabases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:restore", + "request": { + "$ref": "RestoreAutonomousDatabaseRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "autonomousDbVersions": { + "methods": { + "list": { + "description": "Lists all the available Autonomous Database versions for a project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autonomousDbVersions", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.autonomousDbVersions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, at most 50 Autonomous DB Versions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for the Autonomous Database in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/autonomousDbVersions", + "response": { + "$ref": "ListAutonomousDbVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "cloudExadataInfrastructures": { + "methods": { + "create": { + "description": "Creates a new Exadata Infrastructure in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudExadataInfrastructures", + "httpMethod": "POST", + "id": "oracledatabase.projects.locations.cloudExadataInfrastructures.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "cloudExadataInfrastructureId": { + "description": "Required. The ID of the Exadata Infrastructure to create. This value is restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 characters in length. The value must start with a letter and end with a letter or a number.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for CloudExadataInfrastructure in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional ID to identify the request. This value is used to identify duplicate requests. If you make a request with the same request ID and the original request is still in progress or completed, the server ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/cloudExadataInfrastructures", + "request": { + "$ref": "CloudExadataInfrastructure" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single Exadata Infrastructure.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudExadataInfrastructures/{cloudExadataInfrastructuresId}", + "httpMethod": "DELETE", + "id": "oracledatabase.projects.locations.cloudExadataInfrastructures.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "Optional. If set to true, all VM clusters for this Exadata Infrastructure will be deleted. An Exadata Infrastructure can only be deleted once all its VM clusters have been deleted.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the Cloud Exadata Infrastructure in the following format: projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cloudExadataInfrastructures/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional ID to identify the request. This value is used to identify duplicate requests. If you make a request with the same request ID and the original request is still in progress or completed, the server ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Exadata Infrastructure.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudExadataInfrastructures/{cloudExadataInfrastructuresId}", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.cloudExadataInfrastructures.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Cloud Exadata Infrastructure in the following format: projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cloudExadataInfrastructures/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "CloudExadataInfrastructure" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Exadata Infrastructures in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudExadataInfrastructures", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.cloudExadataInfrastructures.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, at most 50 Exadata infrastructures will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for CloudExadataInfrastructure in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/cloudExadataInfrastructures", + "response": { + "$ref": "ListCloudExadataInfrastructuresResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "dbServers": { + "methods": { + "list": { + "description": "Lists the database servers of an Exadata Infrastructure instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudExadataInfrastructures/{cloudExadataInfrastructuresId}/dbServers", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.cloudExadataInfrastructures.dbServers.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, a maximum of 50 db servers will be returned. The maximum value is 1000; values above 1000 will be reset to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for database server in the following format: projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cloudExadataInfrastructures/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/dbServers", + "response": { + "$ref": "ListDbServersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "cloudVmClusters": { + "methods": { + "create": { + "description": "Creates a new VM Cluster in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudVmClusters", + "httpMethod": "POST", + "id": "oracledatabase.projects.locations.cloudVmClusters.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "cloudVmClusterId": { + "description": "Required. The ID of the VM Cluster to create. This value is restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 characters in length. The value must start with a letter and end with a letter or a number.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional ID to identify the request. This value is used to identify duplicate requests. If you make a request with the same request ID and the original request is still in progress or completed, the server ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/cloudVmClusters", + "request": { + "$ref": "CloudVmCluster" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single VM Cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudVmClusters/{cloudVmClustersId}", + "httpMethod": "DELETE", + "id": "oracledatabase.projects.locations.cloudVmClusters.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "Optional. If set to true, all child resources for the VM Cluster will be deleted. A VM Cluster can only be deleted once all its child resources have been deleted.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the Cloud VM Cluster in the following format: projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cloudVmClusters/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional ID to identify the request. This value is used to identify duplicate requests. If you make a request with the same request ID and the original request is still in progress or completed, the server ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single VM Cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudVmClusters/{cloudVmClustersId}", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.cloudVmClusters.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the Cloud VM Cluster in the following format: projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cloudVmClusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "CloudVmCluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists the VM Clusters in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudVmClusters", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.cloudVmClusters.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The number of VM clusters to return. If unspecified, at most 50 VM clusters will be returned. The maximum value is 1,000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying the page of results the server returns.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the parent in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/cloudVmClusters", + "response": { + "$ref": "ListCloudVmClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "dbNodes": { + "methods": { + "list": { + "description": "Lists the database nodes of a VM Cluster.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/cloudVmClusters/{cloudVmClustersId}/dbNodes", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.cloudVmClusters.dbNodes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, at most 50 db nodes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the node should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for database node in the following format: projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/cloudVmClusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/dbNodes", + "response": { + "$ref": "ListDbNodesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "dbSystemShapes": { + "methods": { + "list": { + "description": "Lists the database system shapes available for the project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dbSystemShapes", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.dbSystemShapes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, at most 50 database system shapes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for Database System Shapes in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/dbSystemShapes", + "response": { + "$ref": "ListDbSystemShapesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "entitlements": { + "methods": { + "list": { + "description": "Lists the entitlements in a given project.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/entitlements", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.entitlements.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, a maximum of 50 entitlements will be returned. The maximum value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for Entitlement in the following format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/entitlements", + "response": { + "$ref": "ListEntitlementsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "giVersions": { + "methods": { + "list": { + "description": "Lists all the valid Oracle Grid Infrastructure (GI) versions for the given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/giVersions", + "httpMethod": "GET", + "id": "oracledatabase.projects.locations.giVersions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions will be returned. The maximum value is 1000; values above 1000 will be reset to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent value for Grid Infrastructure Version in the following format: Format: projects/{project}/locations/{location}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/giVersions", + "response": { + "$ref": "ListGiVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "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/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "oracledatabase.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "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": "oracledatabase.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": "oracledatabase.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`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "oracledatabase.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" + ] + } + } + } + } + } + } + } + }, + "revision": "20240913", + "rootUrl": "https://oracledatabase.googleapis.com/", + "schemas": { + "AllConnectionStrings": { + "description": "A list of all connection strings that can be used to connect to the Autonomous Database.", + "id": "AllConnectionStrings", + "properties": { + "high": { + "description": "Output only. The database service provides the highest level of resources to each SQL statement.", + "readOnly": true, + "type": "string" + }, + "low": { + "description": "Output only. The database service provides the least level of resources to each SQL statement.", + "readOnly": true, + "type": "string" + }, + "medium": { + "description": "Output only. The database service provides a lower level of resources to each SQL statement.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AutonomousDatabase": { + "description": "Details of the Autonomous Database resource. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabase/", + "id": "AutonomousDatabase", + "properties": { + "adminPassword": { + "description": "Optional. The password for the default ADMIN user.", + "type": "string" + }, + "cidr": { + "description": "Required. The subnet CIDR range for the Autonmous Database.", + "type": "string" + }, + "createTime": { + "description": "Output only. The date and time that the Autonomous Database was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "database": { + "description": "Optional. The name of the Autonomous Database. The database name must be unique in the project. The name must begin with a letter and can contain a maximum of 30 alphanumeric characters.", + "type": "string" + }, + "displayName": { + "description": "Optional. The display name for the Autonomous Database. The name does not have to be unique within your project.", + "type": "string" + }, + "entitlementId": { + "description": "Output only. The ID of the subscription entitlement associated with the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels or tags associated with the Autonomous Database.", + "type": "object" + }, + "name": { + "description": "Identifier. The name of the Autonomous Database resource in the following format: projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}", + "type": "string" + }, + "network": { + "description": "Required. The name of the VPC network used by the Autonomous Database. Format: projects/{project}/global/networks/{network}", + "type": "string" + }, + "properties": { + "$ref": "AutonomousDatabaseProperties", + "description": "Optional. The properties of the Autonomous Database." + } + }, + "type": "object" + }, + "AutonomousDatabaseApex": { + "description": "Oracle APEX Application Development. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseApex", + "id": "AutonomousDatabaseApex", + "properties": { + "apexVersion": { + "description": "Output only. The Oracle APEX Application Development version.", + "readOnly": true, + "type": "string" + }, + "ordsVersion": { + "description": "Output only. The Oracle REST Data Services (ORDS) version.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AutonomousDatabaseBackup": { + "description": "Details of the Autonomous Database Backup resource. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseBackup/", + "id": "AutonomousDatabaseBackup", + "properties": { + "autonomousDatabase": { + "description": "Required. The name of the Autonomous Database resource for which the backup is being created. Format: projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database}", + "type": "string" + }, + "displayName": { + "description": "Optional. User friendly name for the Backup. The name does not have to be unique.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. labels or tags associated with the resource.", + "type": "object" + }, + "name": { + "description": "Identifier. The name of the Autonomous Database Backup resource with the format: projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup}", + "type": "string" + }, + "properties": { + "$ref": "AutonomousDatabaseBackupProperties", + "description": "Optional. Various properties of the backup." + } + }, + "type": "object" + }, + "AutonomousDatabaseBackupProperties": { + "description": "Properties of the Autonomous Database Backup resource.", + "id": "AutonomousDatabaseBackupProperties", + "properties": { + "availableTillTime": { + "description": "Output only. Timestamp until when the backup will be available.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "compartmentId": { + "description": "Output only. The OCID of the compartment.", + "readOnly": true, + "type": "string" + }, + "databaseSizeTb": { + "description": "Output only. The quantity of data in the database, in terabytes.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "dbVersion": { + "description": "Output only. A valid Oracle Database version for Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The date and time the backup completed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "isAutomaticBackup": { + "description": "Output only. Indicates if the backup is automatic or user initiated.", + "readOnly": true, + "type": "boolean" + }, + "isLongTermBackup": { + "description": "Output only. Indicates if the backup is long term backup.", + "readOnly": true, + "type": "boolean" + }, + "isRestorable": { + "description": "Output only. Indicates if the backup can be used to restore the Autonomous Database.", + "readOnly": true, + "type": "boolean" + }, + "keyStoreId": { + "description": "Optional. The OCID of the key store of Oracle Vault.", + "type": "string" + }, + "keyStoreWallet": { + "description": "Optional. The wallet name for Oracle Key Vault.", + "type": "string" + }, + "kmsKeyId": { + "description": "Optional. The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.", + "type": "string" + }, + "kmsKeyVersionId": { + "description": "Optional. The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.", + "type": "string" + }, + "lifecycleDetails": { + "description": "Output only. Additional information about the current lifecycle state.", + "readOnly": true, + "type": "string" + }, + "lifecycleState": { + "description": "Output only. The lifecycle state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + "UPDATING" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Indicates that the resource is in Creating state.", + "Indicates that the resource is in Active state.", + "Indicates that the resource is in Deleting state.", + "Indicates that the resource is in Deleted state.", + "Indicates that the resource is in Failed state.", + "Indicates that the resource is in Updating state." + ], + "readOnly": true, + "type": "string" + }, + "ocid": { + "description": "Output only. OCID of the Autonomous Database backup. https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle", + "readOnly": true, + "type": "string" + }, + "retentionPeriodDays": { + "description": "Optional. Retention period in days for the backup.", + "format": "int32", + "type": "integer" + }, + "sizeTb": { + "description": "Output only. The backup size in terabytes.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "startTime": { + "description": "Output only. The date and time the backup started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Output only. The type of the backup.", + "enum": [ + "TYPE_UNSPECIFIED", + "INCREMENTAL", + "FULL", + "LONG_TERM" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Incremental backups.", + "Full backups.", + "Long term backups." + ], + "readOnly": true, + "type": "string" + }, + "vaultId": { + "description": "Optional. The OCID of the vault.", + "type": "string" + } + }, + "type": "object" + }, + "AutonomousDatabaseCharacterSet": { + "description": "Details of the Autonomous Database character set resource. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseCharacterSets/", + "id": "AutonomousDatabaseCharacterSet", + "properties": { + "characterSet": { + "description": "Output only. The character set name for the Autonomous Database which is the ID in the resource name.", + "readOnly": true, + "type": "string" + }, + "characterSetType": { + "description": "Output only. The character set type for the Autonomous Database.", + "enum": [ + "CHARACTER_SET_TYPE_UNSPECIFIED", + "DATABASE", + "NATIONAL" + ], + "enumDescriptions": [ + "Character set type is not specified.", + "Character set type is set to database.", + "Character set type is set to national." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. The name of the Autonomous Database Character Set resource in the following format: projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set}", + "type": "string" + } + }, + "type": "object" + }, + "AutonomousDatabaseConnectionStrings": { + "description": "The connection string used to connect to the Autonomous Database. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseConnectionStrings", + "id": "AutonomousDatabaseConnectionStrings", + "properties": { + "allConnectionStrings": { + "$ref": "AllConnectionStrings", + "description": "Output only. Returns all connection strings that can be used to connect to the Autonomous Database.", + "readOnly": true + }, + "dedicated": { + "description": "Output only. The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + "readOnly": true, + "type": "string" + }, + "high": { + "description": "Output only. The database service provides the highest level of resources to each SQL statement.", + "readOnly": true, + "type": "string" + }, + "low": { + "description": "Output only. The database service provides the least level of resources to each SQL statement.", + "readOnly": true, + "type": "string" + }, + "medium": { + "description": "Output only. The database service provides a lower level of resources to each SQL statement.", + "readOnly": true, + "type": "string" + }, + "profiles": { + "description": "Output only. A list of connection string profiles to allow clients to group, filter, and select values based on the structured metadata.", + "items": { + "$ref": "DatabaseConnectionStringProfile" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "AutonomousDatabaseConnectionUrls": { + "description": "The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseConnectionUrls", + "id": "AutonomousDatabaseConnectionUrls", + "properties": { + "apexUri": { + "description": "Output only. Oracle Application Express (APEX) URL.", + "readOnly": true, + "type": "string" + }, + "databaseTransformsUri": { + "description": "Output only. The URL of the Database Transforms for the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "graphStudioUri": { + "description": "Output only. The URL of the Graph Studio for the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "machineLearningNotebookUri": { + "description": "Output only. The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "machineLearningUserManagementUri": { + "description": "Output only. The URL of Machine Learning user management the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "mongoDbUri": { + "description": "Output only. The URL of the MongoDB API for the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "ordsUri": { + "description": "Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "sqlDevWebUri": { + "description": "Output only. The URL of the Oracle SQL Developer Web for the Autonomous Database.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AutonomousDatabaseProperties": { + "description": "The properties of an Autonomous Database.", + "id": "AutonomousDatabaseProperties", + "properties": { + "actualUsedDataStorageSizeTb": { + "description": "Output only. The amount of storage currently being used for user and system data, in terabytes.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "allocatedStorageSizeTb": { + "description": "Output only. The amount of storage currently allocated for the database tables and billed for, rounded up in terabytes.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "apexDetails": { + "$ref": "AutonomousDatabaseApex", + "description": "Output only. The details for the Oracle APEX Application Development.", + "readOnly": true + }, + "arePrimaryAllowlistedIpsUsed": { + "description": "Output only. This field indicates the status of Data Guard and Access control for the Autonomous Database. The field's value is null if Data Guard is disabled or Access Control is disabled. The field's value is TRUE if both Data Guard and Access Control are enabled, and the Autonomous Database is using primary IP access control list (ACL) for standby. The field's value is FALSE if both Data Guard and Access Control are enabled, and the Autonomous Database is using a different IP access control list (ACL) for standby compared to primary.", + "readOnly": true, + "type": "boolean" + }, + "autonomousContainerDatabaseId": { + "description": "Output only. The Autonomous Container Database OCID.", + "readOnly": true, + "type": "string" + }, + "availableUpgradeVersions": { + "description": "Output only. The list of available Oracle Database upgrade versions for an Autonomous Database.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "backupRetentionPeriodDays": { + "description": "Optional. The retention period for the Autonomous Database. This field is specified in days, can range from 1 day to 60 days, and has a default value of 60 days.", + "format": "int32", + "type": "integer" + }, + "characterSet": { + "description": "Optional. The character set for the Autonomous Database. The default is AL32UTF8.", + "type": "string" + }, + "computeCount": { + "description": "Optional. The number of compute servers for the Autonomous Database.", + "format": "float", + "type": "number" + }, + "connectionStrings": { + "$ref": "AutonomousDatabaseConnectionStrings", + "description": "Output only. The connection strings used to connect to an Autonomous Database.", + "readOnly": true + }, + "connectionUrls": { + "$ref": "AutonomousDatabaseConnectionUrls", + "description": "Output only. The Oracle Connection URLs for an Autonomous Database.", + "readOnly": true + }, + "cpuCoreCount": { + "description": "Optional. The number of CPU cores to be made available to the database.", + "format": "int32", + "type": "integer" + }, + "customerContacts": { + "description": "Optional. The list of customer contacts.", + "items": { + "$ref": "CustomerContact" + }, + "type": "array" + }, + "dataSafeState": { + "description": "Output only. The current state of the Data Safe registration for the Autonomous Database.", + "enum": [ + "DATA_SAFE_STATE_UNSPECIFIED", + "REGISTERING", + "REGISTERED", + "DEREGISTERING", + "NOT_REGISTERED", + "FAILED" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Registering data safe state.", + "Registered data safe state.", + "Deregistering data safe state.", + "Not registered data safe state.", + "Failed data safe state." + ], + "readOnly": true, + "type": "string" + }, + "dataStorageSizeGb": { + "description": "Optional. The size of the data stored in the database, in gigabytes.", + "format": "int32", + "type": "integer" + }, + "dataStorageSizeTb": { + "description": "Optional. The size of the data stored in the database, in terabytes.", + "format": "int32", + "type": "integer" + }, + "databaseManagementState": { + "description": "Output only. The current state of database management for the Autonomous Database.", + "enum": [ + "DATABASE_MANAGEMENT_STATE_UNSPECIFIED", + "ENABLING", + "ENABLED", + "DISABLING", + "NOT_ENABLED", + "FAILED_ENABLING", + "FAILED_DISABLING" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Enabling Database Management state", + "Enabled Database Management state", + "Disabling Database Management state", + "Not Enabled Database Management state", + "Failed enabling Database Management state", + "Failed disabling Database Management state" + ], + "readOnly": true, + "type": "string" + }, + "dbEdition": { + "description": "Optional. The edition of the Autonomous Databases.", + "enum": [ + "DATABASE_EDITION_UNSPECIFIED", + "STANDARD_EDITION", + "ENTERPRISE_EDITION" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Standard Database Edition", + "Enterprise Database Edition" + ], + "type": "string" + }, + "dbVersion": { + "description": "Optional. The Oracle Database version for the Autonomous Database.", + "type": "string" + }, + "dbWorkload": { + "description": "Required. The workload type of the Autonomous Database.", + "enum": [ + "DB_WORKLOAD_UNSPECIFIED", + "OLTP", + "DW", + "AJD", + "APEX" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Autonomous Transaction Processing database.", + "Autonomous Data Warehouse database.", + "Autonomous JSON Database.", + "Autonomous Database with the Oracle APEX Application Development workload type." + ], + "type": "string" + }, + "failedDataRecoveryDuration": { + "description": "Output only. This field indicates the number of seconds of data loss during a Data Guard failover.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "isAutoScalingEnabled": { + "description": "Optional. This field indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + "type": "boolean" + }, + "isLocalDataGuardEnabled": { + "description": "Output only. This field indicates whether the Autonomous Database has local (in-region) Data Guard enabled.", + "readOnly": true, + "type": "boolean" + }, + "isStorageAutoScalingEnabled": { + "description": "Optional. This field indicates if auto scaling is enabled for the Autonomous Database storage.", + "type": "boolean" + }, + "licenseType": { + "description": "Required. The license type used for the Autonomous Database.", + "enum": [ + "LICENSE_TYPE_UNSPECIFIED", + "LICENSE_INCLUDED", + "BRING_YOUR_OWN_LICENSE" + ], + "enumDescriptions": [ + "Unspecified", + "License included part of offer", + "Bring your own license" + ], + "type": "string" + }, + "lifecycleDetails": { + "description": "Output only. The details of the current lifestyle state of the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "localAdgAutoFailoverMaxDataLossLimit": { + "description": "Output only. This field indicates the maximum data loss limit for an Autonomous Database, in seconds.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "localDisasterRecoveryType": { + "description": "Output only. This field indicates the local disaster recovery (DR) type of an Autonomous Database.", + "enum": [ + "LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED", + "ADG", + "BACKUP_BASED" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Autonomous Data Guard recovery.", + "Backup based recovery." + ], + "readOnly": true, + "type": "string" + }, + "localStandbyDb": { + "$ref": "AutonomousDatabaseStandbySummary", + "description": "Output only. The details of the Autonomous Data Guard standby database.", + "readOnly": true + }, + "maintenanceBeginTime": { + "description": "Output only. The date and time when maintenance will begin.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "maintenanceEndTime": { + "description": "Output only. The date and time when maintenance will end.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "maintenanceScheduleType": { + "description": "Optional. The maintenance schedule of the Autonomous Database.", + "enum": [ + "MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED", + "EARLY", + "REGULAR" + ], + "enumDescriptions": [ + "Default unspecified value.", + "An EARLY maintenance schedule patches the database before the the regular scheduled maintenance.", + "A REGULAR maintenance schedule follows the normal maintenance cycle." + ], + "type": "string" + }, + "memoryPerOracleComputeUnitGbs": { + "description": "Output only. The amount of memory enabled per ECPU, in gigabytes.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "memoryTableGbs": { + "description": "Output only. The memory assigned to in-memory tables in an Autonomous Database.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "mtlsConnectionRequired": { + "description": "Optional. This field specifies if the Autonomous Database requires mTLS connections.", + "type": "boolean" + }, + "nCharacterSet": { + "description": "Optional. The national character set for the Autonomous Database. The default is AL16UTF16.", + "type": "string" + }, + "nextLongTermBackupTime": { + "description": "Output only. The long term backup schedule of the Autonomous Database.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "ociUrl": { + "description": "Output only. The Oracle Cloud Infrastructure link for the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "ocid": { + "description": "Output only. OCID of the Autonomous Database. https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle", + "readOnly": true, + "type": "string" + }, + "openMode": { + "description": "Output only. This field indicates the current mode of the Autonomous Database.", + "enum": [ + "OPEN_MODE_UNSPECIFIED", + "READ_ONLY", + "READ_WRITE" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Read Only Mode", + "Read Write Mode" + ], + "readOnly": true, + "type": "string" + }, + "operationsInsightsState": { + "description": "Output only. This field indicates the state of Operations Insights for the Autonomous Database.", + "enum": [ + "OPERATIONS_INSIGHTS_STATE_UNSPECIFIED", + "ENABLING", + "ENABLED", + "DISABLING", + "NOT_ENABLED", + "FAILED_ENABLING", + "FAILED_DISABLING" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Enabling status for operation insights.", + "Enabled status for operation insights.", + "Disabling status for operation insights.", + "Not Enabled status for operation insights.", + "Failed enabling status for operation insights.", + "Failed disabling status for operation insights." + ], + "readOnly": true, + "type": "string" + }, + "peerDbIds": { + "description": "Output only. The list of OCIDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "permissionLevel": { + "description": "Output only. The permission level of the Autonomous Database.", + "enum": [ + "PERMISSION_LEVEL_UNSPECIFIED", + "RESTRICTED", + "UNRESTRICTED" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Restricted mode allows access only by admin users.", + "Normal access." + ], + "readOnly": true, + "type": "string" + }, + "privateEndpoint": { + "description": "Output only. The private endpoint for the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "privateEndpointIp": { + "description": "Optional. The private endpoint IP address for the Autonomous Database.", + "type": "string" + }, + "privateEndpointLabel": { + "description": "Optional. The private endpoint label for the Autonomous Database.", + "type": "string" + }, + "refreshableMode": { + "description": "Output only. The refresh mode of the cloned Autonomous Database.", + "enum": [ + "REFRESHABLE_MODE_UNSPECIFIED", + "AUTOMATIC", + "MANUAL" + ], + "enumDescriptions": [ + "The default unspecified value.", + "AUTOMATIC indicates that the cloned database is automatically refreshed with data from the source Autonomous Database.", + "MANUAL indicates that the cloned database is manually refreshed with data from the source Autonomous Database." + ], + "readOnly": true, + "type": "string" + }, + "refreshableState": { + "description": "Output only. The refresh State of the clone.", + "enum": [ + "REFRESHABLE_STATE_UNSPECIFIED", + "REFRESHING", + "NOT_REFRESHING" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Refreshing", + "Not refreshed" + ], + "readOnly": true, + "type": "string" + }, + "role": { + "description": "Output only. The Data Guard role of the Autonomous Database.", + "enum": [ + "ROLE_UNSPECIFIED", + "PRIMARY", + "STANDBY", + "DISABLED_STANDBY", + "BACKUP_COPY", + "SNAPSHOT_STANDBY" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Primary role", + "Standby role", + "Disabled standby role", + "Backup copy role", + "Snapshot standby role" + ], + "readOnly": true, + "type": "string" + }, + "scheduledOperationDetails": { + "description": "Output only. The list and details of the scheduled operations of the Autonomous Database.", + "items": { + "$ref": "ScheduledOperationDetails" + }, + "readOnly": true, + "type": "array" + }, + "secretId": { + "description": "Optional. The ID of the Oracle Cloud Infrastructure vault secret.", + "type": "string" + }, + "sqlWebDeveloperUrl": { + "description": "Output only. The SQL Web Developer URL for the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current lifecycle state of the Autonomous Database.", + "enum": [ + "STATE_UNSPECIFIED", + "PROVISIONING", + "AVAILABLE", + "STOPPING", + "STOPPED", + "STARTING", + "TERMINATING", + "TERMINATED", + "UNAVAILABLE", + "RESTORE_IN_PROGRESS", + "RESTORE_FAILED", + "BACKUP_IN_PROGRESS", + "SCALE_IN_PROGRESS", + "AVAILABLE_NEEDS_ATTENTION", + "UPDATING", + "MAINTENANCE_IN_PROGRESS", + "RESTARTING", + "RECREATING", + "ROLE_CHANGE_IN_PROGRESS", + "UPGRADING", + "INACCESSIBLE", + "STANDBY" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Indicates that the Autonomous Database is in Provisioning state.", + "Indicates that the Autonomous Database is in Available state.", + "Indicates that the Autonomous Database is in Stopping state.", + "Indicates that the Autonomous Database is in Stopped state.", + "Indicates that the Autonomous Database is in Starting state.", + "Indicates that the Autonomous Database is in Terminating state.", + "Indicates that the Autonomous Database is in Terminated state.", + "Indicates that the Autonomous Database is in Unavailable state.", + "Indicates that the Autonomous Database Restore is in progress.", + "Indicates that the Autonomous Database failed to restore.", + "Indicates that the Autonomous Database backup is in progress.", + "Indicates that the Autonomous Database scale is in progress.", + "Indicates that the Autonomous Database is in Available Needs Attention state.", + "Indicates that the Autonomous Database is in Updating state.", + "Indicates that the Autonomous Database is in Maintenance In Progress state.", + "Indicates that the Autonomous Database is in Restarting state.", + "Indicates that the Autonomous Database is in Recreating state.", + "Indicates that the Autonomous Database is in Role Change In Progress state.", + "Indicates that the Autonomous Database is in Upgrading state.", + "Indicates that the Autonomous Database is in Inaccessible state.", + "Indicates that the Autonomous Database is in Standby state." + ], + "readOnly": true, + "type": "string" + }, + "supportedCloneRegions": { + "description": "Output only. The list of available regions that can be used to create a clone for the Autonomous Database.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "totalAutoBackupStorageSizeGbs": { + "description": "Output only. The storage space used by automatic backups of Autonomous Database, in gigabytes.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "usedDataStorageSizeTbs": { + "description": "Output only. The storage space used by Autonomous Database, in gigabytes.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "vaultId": { + "description": "Optional. The ID of the Oracle Cloud Infrastructure vault.", + "type": "string" + } + }, + "type": "object" + }, + "AutonomousDatabaseStandbySummary": { + "description": "Autonomous Data Guard standby database details. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseStandbySummary", + "id": "AutonomousDatabaseStandbySummary", + "properties": { + "dataGuardRoleChangedTime": { + "description": "Output only. The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "disasterRecoveryRoleChangedTime": { + "description": "Output only. The date and time the Disaster Recovery role was switched for the standby Autonomous Database.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "lagTimeDuration": { + "description": "Output only. The amount of time, in seconds, that the data of the standby database lags in comparison to the data of the primary database.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "lifecycleDetails": { + "description": "Output only. The additional details about the current lifecycle state of the Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current lifecycle state of the Autonomous Database.", + "enum": [ + "STATE_UNSPECIFIED", + "PROVISIONING", + "AVAILABLE", + "STOPPING", + "STOPPED", + "STARTING", + "TERMINATING", + "TERMINATED", + "UNAVAILABLE", + "RESTORE_IN_PROGRESS", + "RESTORE_FAILED", + "BACKUP_IN_PROGRESS", + "SCALE_IN_PROGRESS", + "AVAILABLE_NEEDS_ATTENTION", + "UPDATING", + "MAINTENANCE_IN_PROGRESS", + "RESTARTING", + "RECREATING", + "ROLE_CHANGE_IN_PROGRESS", + "UPGRADING", + "INACCESSIBLE", + "STANDBY" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Indicates that the Autonomous Database is in Provisioning state.", + "Indicates that the Autonomous Database is in Available state.", + "Indicates that the Autonomous Database is in Stopping state.", + "Indicates that the Autonomous Database is in Stopped state.", + "Indicates that the Autonomous Database is in Starting state.", + "Indicates that the Autonomous Database is in Terminating state.", + "Indicates that the Autonomous Database is in Terminated state.", + "Indicates that the Autonomous Database is in Unavailable state.", + "Indicates that the Autonomous Database Restore is in progress.", + "Indicates that the Autonomous Database failed to restore.", + "Indicates that the Autonomous Database backup is in progress.", + "Indicates that the Autonomous Database scale is in progress.", + "Indicates that the Autonomous Database is in Available Needs Attention state.", + "Indicates that the Autonomous Database is in Updating state.", + "Indicates that the Autonomous Database is in Maintenance In Progress state.", + "Indicates that the Autonomous Database is in Restarting state.", + "Indicates that the Autonomous Database is in Recreating state.", + "Indicates that the Autonomous Database is in Role Change In Progress state.", + "Indicates that the Autonomous Database is in Upgrading state.", + "Indicates that the Autonomous Database is in Inaccessible state.", + "Indicates that the Autonomous Database is in Standby state." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AutonomousDbVersion": { + "description": "Details of the Autonomous Database version. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDbVersionSummary/", + "id": "AutonomousDbVersion", + "properties": { + "dbWorkload": { + "description": "Output only. The Autonomous Database workload type.", + "enum": [ + "DB_WORKLOAD_UNSPECIFIED", + "OLTP", + "DW", + "AJD", + "APEX" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Autonomous Transaction Processing database.", + "Autonomous Data Warehouse database.", + "Autonomous JSON Database.", + "Autonomous Database with the Oracle APEX Application Development workload type." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. The name of the Autonomous Database Version resource with the format: projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version}", + "type": "string" + }, + "version": { + "description": "Output only. An Oracle Database version for Autonomous Database.", + "readOnly": true, + "type": "string" + }, + "workloadUri": { + "description": "Output only. A URL that points to a detailed description of the Autonomous Database version.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "CloudAccountDetails": { + "description": "Details of the OCI Cloud Account.", + "id": "CloudAccountDetails", + "properties": { + "accountCreationUri": { + "description": "Output only. URL to create a new account and link.", + "readOnly": true, + "type": "string" + }, + "cloudAccount": { + "description": "Output only. OCI account name.", + "readOnly": true, + "type": "string" + }, + "cloudAccountHomeRegion": { + "description": "Output only. OCI account home region.", + "readOnly": true, + "type": "string" + }, + "linkExistingAccountUri": { + "description": "Output only. URL to link an existing account.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CloudExadataInfrastructure": { + "description": "Represents CloudExadataInfrastructure resource. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/", + "id": "CloudExadataInfrastructure", + "properties": { + "createTime": { + "description": "Output only. The date and time that the Exadata Infrastructure was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. User friendly name for this resource.", + "type": "string" + }, + "entitlementId": { + "description": "Output only. Entitlement ID of the private offer against which this infrastructure resource is provisioned.", + "readOnly": true, + "type": "string" + }, + "gcpOracleZone": { + "description": "Optional. GCP location where Oracle Exadata is hosted.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels or tags associated with the resource.", + "type": "object" + }, + "name": { + "description": "Identifier. The name of the Exadata Infrastructure resource with the format: projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}", + "type": "string" + }, + "properties": { + "$ref": "CloudExadataInfrastructureProperties", + "description": "Optional. Various properties of the infra." + } + }, + "type": "object" + }, + "CloudExadataInfrastructureProperties": { + "description": "Various properties of Exadata Infrastructure.", + "id": "CloudExadataInfrastructureProperties", + "properties": { + "activatedStorageCount": { + "description": "Output only. The requested number of additional storage servers activated for the Exadata Infrastructure.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "additionalStorageCount": { + "description": "Output only. The requested number of additional storage servers for the Exadata Infrastructure.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "availableStorageSizeGb": { + "description": "Output only. The available storage can be allocated to the Exadata Infrastructure resource, in gigabytes (GB).", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "computeCount": { + "description": "Optional. The number of compute servers for the Exadata Infrastructure.", + "format": "int32", + "type": "integer" + }, + "cpuCount": { + "description": "Optional. The number of enabled CPU cores.", + "format": "int32", + "type": "integer" + }, + "customerContacts": { + "description": "Optional. The list of customer contacts.", + "items": { + "$ref": "CustomerContact" + }, + "type": "array" + }, + "dataStorageSizeTb": { + "description": "Output only. Size, in terabytes, of the DATA disk group.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "dbNodeStorageSizeGb": { + "description": "Optional. The local node storage allocated in GBs.", + "format": "int32", + "type": "integer" + }, + "dbServerVersion": { + "description": "Output only. The software version of the database servers (dom0) in the Exadata Infrastructure.", + "readOnly": true, + "type": "string" + }, + "maintenanceWindow": { + "$ref": "MaintenanceWindow", + "description": "Optional. Maintenance window for repair." + }, + "maxCpuCount": { + "description": "Output only. The total number of CPU cores available.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "maxDataStorageTb": { + "description": "Output only. The total available DATA disk group size.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "maxDbNodeStorageSizeGb": { + "description": "Output only. The total local node storage available in GBs.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "maxMemoryGb": { + "description": "Output only. The total memory available in GBs.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "memorySizeGb": { + "description": "Optional. The memory allocated in GBs.", + "format": "int32", + "type": "integer" + }, + "monthlyDbServerVersion": { + "description": "Output only. The monthly software version of the database servers (dom0) in the Exadata Infrastructure. Example: 20.1.15", + "readOnly": true, + "type": "string" + }, + "monthlyStorageServerVersion": { + "description": "Output only. The monthly software version of the storage servers (cells) in the Exadata Infrastructure. Example: 20.1.15", + "readOnly": true, + "type": "string" + }, + "nextMaintenanceRunId": { + "description": "Output only. The OCID of the next maintenance run.", + "readOnly": true, + "type": "string" + }, + "nextMaintenanceRunTime": { + "description": "Output only. The time when the next maintenance run will occur.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "nextSecurityMaintenanceRunTime": { + "description": "Output only. The time when the next security maintenance run will occur.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "ociUrl": { + "description": "Output only. Deep link to the OCI console to view this resource.", + "readOnly": true, + "type": "string" + }, + "ocid": { + "description": "Output only. OCID of created infra. https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle", + "readOnly": true, + "type": "string" + }, + "shape": { + "description": "Required. The shape of the Exadata Infrastructure. The shape determines the amount of CPU, storage, and memory resources allocated to the instance.", + "type": "string" + }, + "state": { + "description": "Output only. The current lifecycle state of the Exadata Infrastructure.", + "enum": [ + "STATE_UNSPECIFIED", + "PROVISIONING", + "AVAILABLE", + "UPDATING", + "TERMINATING", + "TERMINATED", + "FAILED", + "MAINTENANCE_IN_PROGRESS" + ], + "enumDescriptions": [ + "Default unspecified value.", + "The Exadata Infrastructure is being provisioned.", + "The Exadata Infrastructure is available for use.", + "The Exadata Infrastructure is being updated.", + "The Exadata Infrastructure is being terminated.", + "The Exadata Infrastructure is terminated.", + "The Exadata Infrastructure is in failed state.", + "The Exadata Infrastructure is in maintenance." + ], + "readOnly": true, + "type": "string" + }, + "storageCount": { + "description": "Optional. The number of Cloud Exadata storage servers for the Exadata Infrastructure.", + "format": "int32", + "type": "integer" + }, + "storageServerVersion": { + "description": "Output only. The software version of the storage servers (cells) in the Exadata Infrastructure.", + "readOnly": true, + "type": "string" + }, + "totalStorageSizeGb": { + "description": "Optional. The total storage allocated to the Exadata Infrastructure resource, in gigabytes (GB).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "CloudVmCluster": { + "description": "Details of the Cloud VM Cluster resource. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/CloudVmCluster/", + "id": "CloudVmCluster", + "properties": { + "backupSubnetCidr": { + "description": "Required. CIDR range of the backup subnet.", + "type": "string" + }, + "cidr": { + "description": "Required. Network settings. CIDR to use for cluster IP allocation.", + "type": "string" + }, + "createTime": { + "description": "Output only. The date and time that the VM cluster was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Optional. User friendly name for this resource.", + "type": "string" + }, + "exadataInfrastructure": { + "description": "Required. The name of the Exadata Infrastructure resource on which VM cluster resource is created, in the following format: projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure}", + "type": "string" + }, + "gcpOracleZone": { + "description": "Output only. GCP location where Oracle Exadata is hosted. It is same as GCP Oracle zone of Exadata infrastructure.", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels or tags associated with the VM Cluster.", + "type": "object" + }, + "name": { + "description": "Identifier. The name of the VM Cluster resource with the format: projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster}", + "type": "string" + }, + "network": { + "description": "Required. The name of the VPC network. Format: projects/{project}/global/networks/{network}", + "type": "string" + }, + "properties": { + "$ref": "CloudVmClusterProperties", + "description": "Optional. Various properties of the VM Cluster." + } + }, + "type": "object" + }, + "CloudVmClusterProperties": { + "description": "Various properties and settings associated with Exadata VM cluster.", + "id": "CloudVmClusterProperties", + "properties": { + "clusterName": { + "description": "Optional. OCI Cluster name.", + "type": "string" + }, + "compartmentId": { + "description": "Output only. Compartment ID of cluster.", + "readOnly": true, + "type": "string" + }, + "cpuCoreCount": { + "description": "Required. Number of enabled CPU cores.", + "format": "int32", + "type": "integer" + }, + "dataStorageSizeTb": { + "description": "Optional. The data disk group size to be allocated in TBs.", + "format": "double", + "type": "number" + }, + "dbNodeStorageSizeGb": { + "description": "Optional. Local storage per VM.", + "format": "int32", + "type": "integer" + }, + "dbServerOcids": { + "description": "Optional. OCID of database servers.", + "items": { + "type": "string" + }, + "type": "array" + }, + "diagnosticsDataCollectionOptions": { + "$ref": "DataCollectionOptions", + "description": "Optional. Data collection options for diagnostics." + }, + "diskRedundancy": { + "description": "Optional. The type of redundancy.", + "enum": [ + "DISK_REDUNDANCY_UNSPECIFIED", + "HIGH", + "NORMAL" + ], + "enumDescriptions": [ + "Unspecified.", + "High - 3 way mirror.", + "Normal - 2 way mirror." + ], + "type": "string" + }, + "dnsListenerIp": { + "description": "Output only. DNS listener IP.", + "readOnly": true, + "type": "string" + }, + "domain": { + "description": "Output only. Parent DNS domain where SCAN DNS and hosts names are qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com", + "readOnly": true, + "type": "string" + }, + "giVersion": { + "description": "Optional. Grid Infrastructure Version.", + "type": "string" + }, + "hostname": { + "description": "Output only. host name without domain. format: \"-\" with some suffix. ex: sp2-yi0xq where \"sp2\" is the hostname_prefix.", + "readOnly": true, + "type": "string" + }, + "hostnamePrefix": { + "description": "Optional. Prefix for VM cluster host names.", + "type": "string" + }, + "licenseType": { + "description": "Required. License type of VM Cluster.", + "enum": [ + "LICENSE_TYPE_UNSPECIFIED", + "LICENSE_INCLUDED", + "BRING_YOUR_OWN_LICENSE" + ], + "enumDescriptions": [ + "Unspecified", + "License included part of offer", + "Bring your own license" + ], + "type": "string" + }, + "localBackupEnabled": { + "description": "Optional. Use local backup.", + "type": "boolean" + }, + "memorySizeGb": { + "description": "Optional. Memory allocated in GBs.", + "format": "int32", + "type": "integer" + }, + "nodeCount": { + "description": "Optional. Number of database servers.", + "format": "int32", + "type": "integer" + }, + "ociUrl": { + "description": "Output only. Deep link to the OCI console to view this resource.", + "readOnly": true, + "type": "string" + }, + "ocid": { + "description": "Output only. Oracle Cloud Infrastructure ID of VM Cluster.", + "readOnly": true, + "type": "string" + }, + "ocpuCount": { + "description": "Optional. OCPU count per VM. Minimum is 0.1.", + "format": "float", + "type": "number" + }, + "scanDns": { + "description": "Output only. SCAN DNS name. ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com", + "readOnly": true, + "type": "string" + }, + "scanDnsRecordId": { + "description": "Output only. OCID of scan DNS record.", + "readOnly": true, + "type": "string" + }, + "scanIpIds": { + "description": "Output only. OCIDs of scan IPs.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "scanListenerPortTcp": { + "description": "Output only. SCAN listener port - TCP", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "scanListenerPortTcpSsl": { + "description": "Output only. SCAN listener port - TLS", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "shape": { + "description": "Output only. Shape of VM Cluster.", + "readOnly": true, + "type": "string" + }, + "sparseDiskgroupEnabled": { + "description": "Optional. Use exadata sparse snapshots.", + "type": "boolean" + }, + "sshPublicKeys": { + "description": "Optional. SSH public keys to be stored with cluster.", + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "description": "Output only. State of the cluster.", + "enum": [ + "STATE_UNSPECIFIED", + "PROVISIONING", + "AVAILABLE", + "UPDATING", + "TERMINATING", + "TERMINATED", + "FAILED", + "MAINTENANCE_IN_PROGRESS" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Indicates that the resource is in Provisioning state.", + "Indicates that the resource is in Available state.", + "Indicates that the resource is in Updating state.", + "Indicates that the resource is in Terminating state.", + "Indicates that the resource is in Terminated state.", + "Indicates that the resource is in Failed state.", + "Indicates that the resource is in Maintenance In Progress state." + ], + "readOnly": true, + "type": "string" + }, + "storageSizeGb": { + "description": "Output only. The storage allocation for the disk group, in gigabytes (GB).", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "systemVersion": { + "description": "Output only. Operating system version of the image.", + "readOnly": true, + "type": "string" + }, + "timeZone": { + "$ref": "TimeZone", + "description": "Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified." + } + }, + "type": "object" + }, + "CustomerContact": { + "description": "The CustomerContact reference as defined by Oracle. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/CustomerContact", + "id": "CustomerContact", + "properties": { + "email": { + "description": "Required. The email address used by Oracle to send notifications regarding databases and infrastructure.", + "type": "string" + } + }, + "type": "object" + }, + "DataCollectionOptions": { + "description": "Data collection options for diagnostics.", + "id": "DataCollectionOptions", + "properties": { + "diagnosticsEventsEnabled": { + "description": "Optional. Indicates whether diagnostic collection is enabled for the VM cluster", + "type": "boolean" + }, + "healthMonitoringEnabled": { + "description": "Optional. Indicates whether health monitoring is enabled for the VM cluster", + "type": "boolean" + }, + "incidentLogsEnabled": { + "description": "Optional. Indicates whether incident logs and trace collection are enabled for the VM cluster", + "type": "boolean" + } + }, + "type": "object" + }, + "DatabaseConnectionStringProfile": { + "description": "The connection string profile to allow clients to group. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/DatabaseConnectionStringProfile", + "id": "DatabaseConnectionStringProfile", + "properties": { + "consumerGroup": { + "description": "Output only. The current consumer group being used by the connection.", + "enum": [ + "CONSUMER_GROUP_UNSPECIFIED", + "HIGH", + "MEDIUM", + "LOW", + "TP", + "TPURGENT" + ], + "enumDescriptions": [ + "Default unspecified value.", + "High consumer group.", + "Medium consumer group.", + "Low consumer group.", + "TP consumer group.", + "TPURGENT consumer group." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Output only. The display name for the database connection.", + "readOnly": true, + "type": "string" + }, + "hostFormat": { + "description": "Output only. The host name format being currently used in connection string.", + "enum": [ + "HOST_FORMAT_UNSPECIFIED", + "FQDN", + "IP" + ], + "enumDescriptions": [ + "Default unspecified value.", + "FQDN", + "IP" + ], + "readOnly": true, + "type": "string" + }, + "isRegional": { + "description": "Output only. This field indicates if the connection string is regional and is only applicable for cross-region Data Guard.", + "readOnly": true, + "type": "boolean" + }, + "protocol": { + "description": "Output only. The protocol being used by the connection.", + "enum": [ + "PROTOCOL_UNSPECIFIED", + "TCP", + "TCPS" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Tcp", + "Tcps" + ], + "readOnly": true, + "type": "string" + }, + "sessionMode": { + "description": "Output only. The current session mode of the connection.", + "enum": [ + "SESSION_MODE_UNSPECIFIED", + "DIRECT", + "INDIRECT" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Direct", + "Indirect" + ], + "readOnly": true, + "type": "string" + }, + "syntaxFormat": { + "description": "Output only. The syntax of the connection string.", + "enum": [ + "SYNTAX_FORMAT_UNSPECIFIED", + "LONG", + "EZCONNECT", + "EZCONNECTPLUS" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Long", + "Ezconnect", + "Ezconnectplus" + ], + "readOnly": true, + "type": "string" + }, + "tlsAuthentication": { + "description": "Output only. This field indicates the TLS authentication type of the connection.", + "enum": [ + "TLS_AUTHENTICATION_UNSPECIFIED", + "SERVER", + "MUTUAL" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Server", + "Mutual" + ], + "readOnly": true, + "type": "string" + }, + "value": { + "description": "Output only. The value of the connection string.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "DbNode": { + "description": "Details of the database node resource. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbNode/", + "id": "DbNode", + "properties": { + "name": { + "description": "Identifier. The name of the database node resource in the following format: projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node}", + "type": "string" + }, + "properties": { + "$ref": "DbNodeProperties", + "description": "Optional. Various properties of the database node." + } + }, + "type": "object" + }, + "DbNodeProperties": { + "description": "Various properties and settings associated with Db node.", + "id": "DbNodeProperties", + "properties": { + "dbNodeStorageSizeGb": { + "description": "Optional. Local storage per database node.", + "format": "int32", + "type": "integer" + }, + "dbServerOcid": { + "description": "Optional. Database server OCID.", + "type": "string" + }, + "hostname": { + "description": "Optional. DNS", + "type": "string" + }, + "memorySizeGb": { + "description": "Memory allocated in GBs.", + "format": "int32", + "type": "integer" + }, + "ocid": { + "description": "Output only. OCID of database node.", + "readOnly": true, + "type": "string" + }, + "ocpuCount": { + "description": "Optional. OCPU count per database node.", + "format": "int32", + "type": "integer" + }, + "state": { + "description": "Output only. State of the database node.", + "enum": [ + "STATE_UNSPECIFIED", + "PROVISIONING", + "AVAILABLE", + "UPDATING", + "STOPPING", + "STOPPED", + "STARTING", + "TERMINATING", + "TERMINATED", + "FAILED" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Indicates that the resource is in Provisioning state.", + "Indicates that the resource is in Available state.", + "Indicates that the resource is in Updating state.", + "Indicates that the resource is in Stopping state.", + "Indicates that the resource is in Stopped state.", + "Indicates that the resource is in Starting state.", + "Indicates that the resource is in Terminating state.", + "Indicates that the resource is in Terminated state.", + "Indicates that the resource is in Failed state." + ], + "readOnly": true, + "type": "string" + }, + "totalCpuCoreCount": { + "description": "Total CPU core count of the database node.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DbServer": { + "description": "Details of the database server resource. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbServer/", + "id": "DbServer", + "properties": { + "displayName": { + "description": "Optional. User friendly name for this resource.", + "type": "string" + }, + "name": { + "description": "Identifier. The name of the database server resource with the format: projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server}", + "type": "string" + }, + "properties": { + "$ref": "DbServerProperties", + "description": "Optional. Various properties of the database server." + } + }, + "type": "object" + }, + "DbServerProperties": { + "description": "Various properties and settings associated with Exadata database server.", + "id": "DbServerProperties", + "properties": { + "dbNodeIds": { + "description": "Output only. OCID of database nodes associated with the database server.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "dbNodeStorageSizeGb": { + "description": "Optional. Local storage per VM.", + "format": "int32", + "type": "integer" + }, + "maxDbNodeStorageSizeGb": { + "description": "Optional. Maximum local storage per VM.", + "format": "int32", + "type": "integer" + }, + "maxMemorySizeGb": { + "description": "Optional. Maximum memory allocated in GBs.", + "format": "int32", + "type": "integer" + }, + "maxOcpuCount": { + "description": "Optional. Maximum OCPU count per database.", + "format": "int32", + "type": "integer" + }, + "memorySizeGb": { + "description": "Optional. Memory allocated in GBs.", + "format": "int32", + "type": "integer" + }, + "ocid": { + "description": "Output only. OCID of database server.", + "readOnly": true, + "type": "string" + }, + "ocpuCount": { + "description": "Optional. OCPU count per database.", + "format": "int32", + "type": "integer" + }, + "state": { + "description": "Output only. State of the database server.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "AVAILABLE", + "UNAVAILABLE", + "DELETING", + "DELETED" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Indicates that the resource is in Creating state.", + "Indicates that the resource is in Available state.", + "Indicates that the resource is in Unavailable state.", + "Indicates that the resource is in Deleting state.", + "Indicates that the resource is in Deleted state." + ], + "readOnly": true, + "type": "string" + }, + "vmCount": { + "description": "Optional. Vm count per database.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "DbSystemShape": { + "description": "Details of the Database System Shapes resource. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbSystemShapeSummary/", + "id": "DbSystemShape", + "properties": { + "availableCoreCountPerNode": { + "description": "Optional. Number of cores per node.", + "format": "int32", + "type": "integer" + }, + "availableDataStorageTb": { + "description": "Optional. Storage per storage server in terabytes.", + "format": "int32", + "type": "integer" + }, + "availableMemoryPerNodeGb": { + "description": "Optional. Memory per database server node in gigabytes.", + "format": "int32", + "type": "integer" + }, + "maxNodeCount": { + "description": "Optional. Maximum number of database servers.", + "format": "int32", + "type": "integer" + }, + "maxStorageCount": { + "description": "Optional. Maximum number of storage servers.", + "format": "int32", + "type": "integer" + }, + "minCoreCountPerNode": { + "description": "Optional. Minimum core count per node.", + "format": "int32", + "type": "integer" + }, + "minDbNodeStoragePerNodeGb": { + "description": "Optional. Minimum node storage per database server in gigabytes.", + "format": "int32", + "type": "integer" + }, + "minMemoryPerNodeGb": { + "description": "Optional. Minimum memory per node in gigabytes.", + "format": "int32", + "type": "integer" + }, + "minNodeCount": { + "description": "Optional. Minimum number of database servers.", + "format": "int32", + "type": "integer" + }, + "minStorageCount": { + "description": "Optional. Minimum number of storage servers.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "Identifier. The name of the Database System Shape resource with the format: projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape}", + "type": "string" + }, + "shape": { + "description": "Optional. shape", + "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" + }, + "Entitlement": { + "description": "Details of the Entitlement resource.", + "id": "Entitlement", + "properties": { + "cloudAccountDetails": { + "$ref": "CloudAccountDetails", + "description": "Details of the OCI Cloud Account." + }, + "entitlementId": { + "description": "Output only. Google Cloud Marketplace order ID (aka entitlement ID)", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. The name of the Entitlement resource with the format: projects/{project}/locations/{region}/entitlements/{entitlement}", + "type": "string" + }, + "state": { + "description": "Output only. Entitlement State.", + "enum": [ + "STATE_UNSPECIFIED", + "ACCOUNT_NOT_LINKED", + "ACCOUNT_NOT_ACTIVE", + "ACTIVE" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Account not linked.", + "Account is linked but not active.", + "Entitlement and Account are active." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GenerateAutonomousDatabaseWalletRequest": { + "description": "The request for `AutonomousDatabase.GenerateWallet`.", + "id": "GenerateAutonomousDatabaseWalletRequest", + "properties": { + "isRegional": { + "description": "Optional. True when requesting regional connection strings in PDB connect info, applicable to cross-region Data Guard only.", + "type": "boolean" + }, + "password": { + "description": "Required. The password used to encrypt the keys inside the wallet. The password must be a minimum of 8 characters.", + "type": "string" + }, + "type": { + "description": "Optional. The type of wallet generation for the Autonomous Database. The default value is SINGLE.", + "enum": [ + "GENERATE_TYPE_UNSPECIFIED", + "ALL", + "SINGLE" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Used to generate wallet for all databases in the region.", + "Used to generate wallet for a single database." + ], + "type": "string" + } + }, + "type": "object" + }, + "GenerateAutonomousDatabaseWalletResponse": { + "description": "The response for `AutonomousDatabase.GenerateWallet`.", + "id": "GenerateAutonomousDatabaseWalletResponse", + "properties": { + "archiveContent": { + "description": "Output only. The base64 encoded wallet files.", + "format": "byte", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GiVersion": { + "description": "Details of the Oracle Grid Infrastructure (GI) version resource. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/GiVersionSummary/", + "id": "GiVersion", + "properties": { + "name": { + "description": "Identifier. The name of the Oracle Grid Infrastructure (GI) version resource with the format: projects/{project}/locations/{region}/giVersions/{gi_versions}", + "type": "string" + }, + "version": { + "description": "Optional. version", + "type": "string" + } + }, + "type": "object" + }, + "ListAutonomousDatabaseBackupsResponse": { + "description": "The response for `AutonomousDatabaseBackup.List`.", + "id": "ListAutonomousDatabaseBackupsResponse", + "properties": { + "autonomousDatabaseBackups": { + "description": "The list of Autonomous Database Backups.", + "items": { + "$ref": "AutonomousDatabaseBackup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListAutonomousDatabaseCharacterSetsResponse": { + "description": "The response for `AutonomousDatabaseCharacterSet.List`.", + "id": "ListAutonomousDatabaseCharacterSetsResponse", + "properties": { + "autonomousDatabaseCharacterSets": { + "description": "The list of Autonomous Database Character Sets.", + "items": { + "$ref": "AutonomousDatabaseCharacterSet" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListAutonomousDatabasesResponse": { + "description": "The response for `AutonomousDatabase.List`.", + "id": "ListAutonomousDatabasesResponse", + "properties": { + "autonomousDatabases": { + "description": "The list of Autonomous Databases.", + "items": { + "$ref": "AutonomousDatabase" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListAutonomousDbVersionsResponse": { + "description": "The response for `AutonomousDbVersion.List`.", + "id": "ListAutonomousDbVersionsResponse", + "properties": { + "autonomousDbVersions": { + "description": "The list of Autonomous Database versions.", + "items": { + "$ref": "AutonomousDbVersion" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListCloudExadataInfrastructuresResponse": { + "description": "The response for `CloudExadataInfrastructures.list`.", + "id": "ListCloudExadataInfrastructuresResponse", + "properties": { + "cloudExadataInfrastructures": { + "description": "The list of Exadata Infrastructures.", + "items": { + "$ref": "CloudExadataInfrastructure" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token for fetching next page of response.", + "type": "string" + } + }, + "type": "object" + }, + "ListCloudVmClustersResponse": { + "description": "The response for `CloudVmCluster.List`.", + "id": "ListCloudVmClustersResponse", + "properties": { + "cloudVmClusters": { + "description": "The list of VM Clusters.", + "items": { + "$ref": "CloudVmCluster" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to fetch the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListDbNodesResponse": { + "description": "The response for `DbNode.List`.", + "id": "ListDbNodesResponse", + "properties": { + "dbNodes": { + "description": "The list of DB Nodes", + "items": { + "$ref": "DbNode" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the node should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListDbServersResponse": { + "description": "The response for `DbServer.List`.", + "id": "ListDbServersResponse", + "properties": { + "dbServers": { + "description": "The list of database servers.", + "items": { + "$ref": "DbServer" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListDbSystemShapesResponse": { + "description": "The response for `DbSystemShape.List`.", + "id": "ListDbSystemShapesResponse", + "properties": { + "dbSystemShapes": { + "description": "The list of Database System shapes.", + "items": { + "$ref": "DbSystemShape" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListEntitlementsResponse": { + "description": "The response for `Entitlement.List`.", + "id": "ListEntitlementsResponse", + "properties": { + "entitlements": { + "description": "The list of Entitlements", + "items": { + "$ref": "Entitlement" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListGiVersionsResponse": { + "description": "The response for `GiVersion.List`.", + "id": "ListGiVersionsResponse", + "properties": { + "giVersions": { + "description": "The list of Oracle Grid Infrastructure (GI) versions.", + "items": { + "$ref": "GiVersion" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "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" + }, + "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" + }, + "Location": { + "description": "A resource that represents a Google Cloud 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 for a given Location.", + "id": "LocationMetadata", + "properties": { + "gcpOracleZones": { + "description": "Output only. GCP Oracle zones in a location.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "MaintenanceWindow": { + "description": "Maintenance window as defined by Oracle. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/MaintenanceWindow", + "id": "MaintenanceWindow", + "properties": { + "customActionTimeoutMins": { + "description": "Optional. Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).", + "format": "int32", + "type": "integer" + }, + "daysOfWeek": { + "description": "Optional. Days during the week when maintenance should be performed.", + "items": { + "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" + }, + "type": "array" + }, + "hoursOfDay": { + "description": "Optional. The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are: 0 - represents time slot 0:00 - 3:59 UTC 4 - represents time slot 4:00 - 7:59 UTC 8 - represents time slot 8:00 - 11:59 UTC 12 - represents time slot 12:00 - 15:59 UTC 16 - represents time slot 16:00 - 19:59 UTC 20 - represents time slot 20:00 - 23:59 UTC", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "isCustomActionTimeoutEnabled": { + "description": "Optional. If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + "type": "boolean" + }, + "leadTimeWeek": { + "description": "Optional. Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4.", + "format": "int32", + "type": "integer" + }, + "months": { + "description": "Optional. Months during the year when maintenance should be performed.", + "items": { + "enum": [ + "MONTH_UNSPECIFIED", + "JANUARY", + "FEBRUARY", + "MARCH", + "APRIL", + "MAY", + "JUNE", + "JULY", + "AUGUST", + "SEPTEMBER", + "OCTOBER", + "NOVEMBER", + "DECEMBER" + ], + "enumDescriptions": [ + "The unspecified month.", + "The month of January.", + "The month of February.", + "The month of March.", + "The month of April.", + "The month of May.", + "The month of June.", + "The month of July.", + "The month of August.", + "The month of September.", + "The month of October.", + "The month of November.", + "The month of December." + ], + "type": "string" + }, + "type": "array" + }, + "patchingMode": { + "description": "Optional. Cloud CloudExadataInfrastructure node patching method, either \"ROLLING\" or \"NONROLLING\". Default value is ROLLING.", + "enum": [ + "PATCHING_MODE_UNSPECIFIED", + "ROLLING", + "NON_ROLLING" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Updates the Cloud Exadata database server hosts in a rolling fashion.", + "The non-rolling maintenance method first updates your storage servers at the same time, then your database servers at the same time." + ], + "type": "string" + }, + "preference": { + "description": "Optional. The maintenance window scheduling preference.", + "enum": [ + "MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED", + "CUSTOM_PREFERENCE", + "NO_PREFERENCE" + ], + "enumDescriptions": [ + "Default unspecified value.", + "Custom preference.", + "No preference." + ], + "type": "string" + }, + "weeksOfMonth": { + "description": "Optional. Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week.", + "items": { + "format": "int32", + "type": "integer" + }, + "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, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "percentComplete": { + "description": "Output only. An estimated percentage of the operation that has been completed at a given moment of time, between 0 and 100.", + "format": "double", + "readOnly": true, + "type": "number" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. The status of the operation.", + "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" + }, + "RestoreAutonomousDatabaseRequest": { + "description": "The request for `AutonomousDatabase.Restore`.", + "id": "RestoreAutonomousDatabaseRequest", + "properties": { + "restoreTime": { + "description": "Required. The time and date to restore the database to.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "ScheduledOperationDetails": { + "description": "Details of scheduled operation. https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/ScheduledOperationDetails", + "id": "ScheduledOperationDetails", + "properties": { + "dayOfWeek": { + "description": "Output only. Day of week.", + "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" + ], + "readOnly": true, + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Output only. Auto start time.", + "readOnly": true + }, + "stopTime": { + "$ref": "TimeOfDay", + "description": "Output only. Auto stop time.", + "readOnly": true + } + }, + "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" + }, + "TimeOfDay": { + "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", + "id": "TimeOfDay", + "properties": { + "hours": { + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TimeZone": { + "description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", + "id": "TimeZone", + "properties": { + "id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "type": "string" + }, + "version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Oracle Database@Google Cloud API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/oracledatabase/v1/oracledatabase-gen.go b/oracledatabase/v1/oracledatabase-gen.go new file mode 100644 index 00000000000..a8af3191b3e --- /dev/null +++ b/oracledatabase/v1/oracledatabase-gen.go @@ -0,0 +1,6394 @@ +// Copyright 2024 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 oracledatabase provides access to the Oracle Database@Google Cloud API. +// +// For product documentation, see: https://cloud.google.com/oracle/database/docs +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/oracledatabase/v1" +// ... +// ctx := context.Background() +// oracledatabaseService, err := oracledatabase.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 [google.golang.org/api/option.WithAPIKey]: +// +// oracledatabaseService, err := oracledatabase.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// oracledatabaseService, err := oracledatabase.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package oracledatabase // import "google.golang.org/api/oracledatabase/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 +var _ = internal.Version + +const apiId = "oracledatabase:v1" +const apiName = "oracledatabase" +const apiVersion = "v1" +const basePath = "https://oracledatabase.googleapis.com/" +const basePathTemplate = "https://oracledatabase.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://oracledatabase.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 Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, 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.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +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.AutonomousDatabaseBackups = NewProjectsLocationsAutonomousDatabaseBackupsService(s) + rs.AutonomousDatabaseCharacterSets = NewProjectsLocationsAutonomousDatabaseCharacterSetsService(s) + rs.AutonomousDatabases = NewProjectsLocationsAutonomousDatabasesService(s) + rs.AutonomousDbVersions = NewProjectsLocationsAutonomousDbVersionsService(s) + rs.CloudExadataInfrastructures = NewProjectsLocationsCloudExadataInfrastructuresService(s) + rs.CloudVmClusters = NewProjectsLocationsCloudVmClustersService(s) + rs.DbSystemShapes = NewProjectsLocationsDbSystemShapesService(s) + rs.Entitlements = NewProjectsLocationsEntitlementsService(s) + rs.GiVersions = NewProjectsLocationsGiVersionsService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + AutonomousDatabaseBackups *ProjectsLocationsAutonomousDatabaseBackupsService + + AutonomousDatabaseCharacterSets *ProjectsLocationsAutonomousDatabaseCharacterSetsService + + AutonomousDatabases *ProjectsLocationsAutonomousDatabasesService + + AutonomousDbVersions *ProjectsLocationsAutonomousDbVersionsService + + CloudExadataInfrastructures *ProjectsLocationsCloudExadataInfrastructuresService + + CloudVmClusters *ProjectsLocationsCloudVmClustersService + + DbSystemShapes *ProjectsLocationsDbSystemShapesService + + Entitlements *ProjectsLocationsEntitlementsService + + GiVersions *ProjectsLocationsGiVersionsService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsAutonomousDatabaseBackupsService(s *Service) *ProjectsLocationsAutonomousDatabaseBackupsService { + rs := &ProjectsLocationsAutonomousDatabaseBackupsService{s: s} + return rs +} + +type ProjectsLocationsAutonomousDatabaseBackupsService struct { + s *Service +} + +func NewProjectsLocationsAutonomousDatabaseCharacterSetsService(s *Service) *ProjectsLocationsAutonomousDatabaseCharacterSetsService { + rs := &ProjectsLocationsAutonomousDatabaseCharacterSetsService{s: s} + return rs +} + +type ProjectsLocationsAutonomousDatabaseCharacterSetsService struct { + s *Service +} + +func NewProjectsLocationsAutonomousDatabasesService(s *Service) *ProjectsLocationsAutonomousDatabasesService { + rs := &ProjectsLocationsAutonomousDatabasesService{s: s} + return rs +} + +type ProjectsLocationsAutonomousDatabasesService struct { + s *Service +} + +func NewProjectsLocationsAutonomousDbVersionsService(s *Service) *ProjectsLocationsAutonomousDbVersionsService { + rs := &ProjectsLocationsAutonomousDbVersionsService{s: s} + return rs +} + +type ProjectsLocationsAutonomousDbVersionsService struct { + s *Service +} + +func NewProjectsLocationsCloudExadataInfrastructuresService(s *Service) *ProjectsLocationsCloudExadataInfrastructuresService { + rs := &ProjectsLocationsCloudExadataInfrastructuresService{s: s} + rs.DbServers = NewProjectsLocationsCloudExadataInfrastructuresDbServersService(s) + return rs +} + +type ProjectsLocationsCloudExadataInfrastructuresService struct { + s *Service + + DbServers *ProjectsLocationsCloudExadataInfrastructuresDbServersService +} + +func NewProjectsLocationsCloudExadataInfrastructuresDbServersService(s *Service) *ProjectsLocationsCloudExadataInfrastructuresDbServersService { + rs := &ProjectsLocationsCloudExadataInfrastructuresDbServersService{s: s} + return rs +} + +type ProjectsLocationsCloudExadataInfrastructuresDbServersService struct { + s *Service +} + +func NewProjectsLocationsCloudVmClustersService(s *Service) *ProjectsLocationsCloudVmClustersService { + rs := &ProjectsLocationsCloudVmClustersService{s: s} + rs.DbNodes = NewProjectsLocationsCloudVmClustersDbNodesService(s) + return rs +} + +type ProjectsLocationsCloudVmClustersService struct { + s *Service + + DbNodes *ProjectsLocationsCloudVmClustersDbNodesService +} + +func NewProjectsLocationsCloudVmClustersDbNodesService(s *Service) *ProjectsLocationsCloudVmClustersDbNodesService { + rs := &ProjectsLocationsCloudVmClustersDbNodesService{s: s} + return rs +} + +type ProjectsLocationsCloudVmClustersDbNodesService struct { + s *Service +} + +func NewProjectsLocationsDbSystemShapesService(s *Service) *ProjectsLocationsDbSystemShapesService { + rs := &ProjectsLocationsDbSystemShapesService{s: s} + return rs +} + +type ProjectsLocationsDbSystemShapesService struct { + s *Service +} + +func NewProjectsLocationsEntitlementsService(s *Service) *ProjectsLocationsEntitlementsService { + rs := &ProjectsLocationsEntitlementsService{s: s} + return rs +} + +type ProjectsLocationsEntitlementsService struct { + s *Service +} + +func NewProjectsLocationsGiVersionsService(s *Service) *ProjectsLocationsGiVersionsService { + rs := &ProjectsLocationsGiVersionsService{s: s} + return rs +} + +type ProjectsLocationsGiVersionsService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// AllConnectionStrings: A list of all connection strings that can be used to +// connect to the Autonomous Database. +type AllConnectionStrings struct { + // High: Output only. The database service provides the highest level of + // resources to each SQL statement. + High string `json:"high,omitempty"` + // Low: Output only. The database service provides the least level of resources + // to each SQL statement. + Low string `json:"low,omitempty"` + // Medium: Output only. The database service provides a lower level of + // resources to each SQL statement. + Medium string `json:"medium,omitempty"` + // ForceSendFields is a list of field names (e.g. "High") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "High") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AllConnectionStrings) MarshalJSON() ([]byte, error) { + type NoMethod AllConnectionStrings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AutonomousDatabase: Details of the Autonomous Database resource. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabase/ +type AutonomousDatabase struct { + // AdminPassword: Optional. The password for the default ADMIN user. + AdminPassword string `json:"adminPassword,omitempty"` + // Cidr: Required. The subnet CIDR range for the Autonmous Database. + Cidr string `json:"cidr,omitempty"` + // CreateTime: Output only. The date and time that the Autonomous Database was + // created. + CreateTime string `json:"createTime,omitempty"` + // Database: Optional. The name of the Autonomous Database. The database name + // must be unique in the project. The name must begin with a letter and can + // contain a maximum of 30 alphanumeric characters. + Database string `json:"database,omitempty"` + // DisplayName: Optional. The display name for the Autonomous Database. The + // name does not have to be unique within your project. + DisplayName string `json:"displayName,omitempty"` + // EntitlementId: Output only. The ID of the subscription entitlement + // associated with the Autonomous Database. + EntitlementId string `json:"entitlementId,omitempty"` + // Labels: Optional. The labels or tags associated with the Autonomous + // Database. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The name of the Autonomous Database resource in the + // following format: + // projects/{project}/locations/{region}/autonomousDatabases/{autonomous_databas + // e} + Name string `json:"name,omitempty"` + // Network: Required. The name of the VPC network used by the Autonomous + // Database. Format: projects/{project}/global/networks/{network} + Network string `json:"network,omitempty"` + // Properties: Optional. The properties of the Autonomous Database. + Properties *AutonomousDatabaseProperties `json:"properties,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AdminPassword") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdminPassword") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDatabase) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDatabase + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AutonomousDatabaseApex: Oracle APEX Application Development. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseApex +type AutonomousDatabaseApex struct { + // ApexVersion: Output only. The Oracle APEX Application Development version. + ApexVersion string `json:"apexVersion,omitempty"` + // OrdsVersion: Output only. The Oracle REST Data Services (ORDS) version. + OrdsVersion string `json:"ordsVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApexVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApexVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDatabaseApex) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDatabaseApex + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AutonomousDatabaseBackup: Details of the Autonomous Database Backup +// resource. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseBackup/ +type AutonomousDatabaseBackup struct { + // AutonomousDatabase: Required. The name of the Autonomous Database resource + // for which the backup is being created. Format: + // projects/{project}/locations/{region}/autonomousDatabases/{autonomous_databas + // e} + AutonomousDatabase string `json:"autonomousDatabase,omitempty"` + // DisplayName: Optional. User friendly name for the Backup. The name does not + // have to be unique. + DisplayName string `json:"displayName,omitempty"` + // Labels: Optional. labels or tags associated with the resource. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The name of the Autonomous Database Backup resource with + // the format: + // projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_d + // atabase_backup} + Name string `json:"name,omitempty"` + // Properties: Optional. Various properties of the backup. + Properties *AutonomousDatabaseBackupProperties `json:"properties,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutonomousDatabase") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutonomousDatabase") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDatabaseBackup) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDatabaseBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AutonomousDatabaseBackupProperties: Properties of the Autonomous Database +// Backup resource. +type AutonomousDatabaseBackupProperties struct { + // AvailableTillTime: Output only. Timestamp until when the backup will be + // available. + AvailableTillTime string `json:"availableTillTime,omitempty"` + // CompartmentId: Output only. The OCID of the compartment. + CompartmentId string `json:"compartmentId,omitempty"` + // DatabaseSizeTb: Output only. The quantity of data in the database, in + // terabytes. + DatabaseSizeTb float64 `json:"databaseSizeTb,omitempty"` + // DbVersion: Output only. A valid Oracle Database version for Autonomous + // Database. + DbVersion string `json:"dbVersion,omitempty"` + // EndTime: Output only. The date and time the backup completed. + EndTime string `json:"endTime,omitempty"` + // IsAutomaticBackup: Output only. Indicates if the backup is automatic or user + // initiated. + IsAutomaticBackup bool `json:"isAutomaticBackup,omitempty"` + // IsLongTermBackup: Output only. Indicates if the backup is long term backup. + IsLongTermBackup bool `json:"isLongTermBackup,omitempty"` + // IsRestorable: Output only. Indicates if the backup can be used to restore + // the Autonomous Database. + IsRestorable bool `json:"isRestorable,omitempty"` + // KeyStoreId: Optional. The OCID of the key store of Oracle Vault. + KeyStoreId string `json:"keyStoreId,omitempty"` + // KeyStoreWallet: Optional. The wallet name for Oracle Key Vault. + KeyStoreWallet string `json:"keyStoreWallet,omitempty"` + // KmsKeyId: Optional. The OCID of the key container that is used as the master + // encryption key in database transparent data encryption (TDE) operations. + KmsKeyId string `json:"kmsKeyId,omitempty"` + // KmsKeyVersionId: Optional. The OCID of the key container version that is + // used in database transparent data encryption (TDE) operations KMS Key can + // have multiple key versions. If none is specified, the current key version + // (latest) of the Key Id is used for the operation. Autonomous Database + // Serverless does not use key versions, hence is not applicable for Autonomous + // Database Serverless instances. + KmsKeyVersionId string `json:"kmsKeyVersionId,omitempty"` + // LifecycleDetails: Output only. Additional information about the current + // lifecycle state. + LifecycleDetails string `json:"lifecycleDetails,omitempty"` + // LifecycleState: Output only. The lifecycle state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default unspecified value. + // "CREATING" - Indicates that the resource is in Creating state. + // "ACTIVE" - Indicates that the resource is in Active state. + // "DELETING" - Indicates that the resource is in Deleting state. + // "DELETED" - Indicates that the resource is in Deleted state. + // "FAILED" - Indicates that the resource is in Failed state. + // "UPDATING" - Indicates that the resource is in Updating state. + LifecycleState string `json:"lifecycleState,omitempty"` + // Ocid: Output only. OCID of the Autonomous Database backup. + // https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + Ocid string `json:"ocid,omitempty"` + // RetentionPeriodDays: Optional. Retention period in days for the backup. + RetentionPeriodDays int64 `json:"retentionPeriodDays,omitempty"` + // SizeTb: Output only. The backup size in terabytes. + SizeTb float64 `json:"sizeTb,omitempty"` + // StartTime: Output only. The date and time the backup started. + StartTime string `json:"startTime,omitempty"` + // Type: Output only. The type of the backup. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default unspecified value. + // "INCREMENTAL" - Incremental backups. + // "FULL" - Full backups. + // "LONG_TERM" - Long term backups. + Type string `json:"type,omitempty"` + // VaultId: Optional. The OCID of the vault. + VaultId string `json:"vaultId,omitempty"` + // ForceSendFields is a list of field names (e.g. "AvailableTillTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AvailableTillTime") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDatabaseBackupProperties) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDatabaseBackupProperties + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *AutonomousDatabaseBackupProperties) UnmarshalJSON(data []byte) error { + type NoMethod AutonomousDatabaseBackupProperties + var s1 struct { + DatabaseSizeTb gensupport.JSONFloat64 `json:"databaseSizeTb"` + SizeTb gensupport.JSONFloat64 `json:"sizeTb"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DatabaseSizeTb = float64(s1.DatabaseSizeTb) + s.SizeTb = float64(s1.SizeTb) + return nil +} + +// AutonomousDatabaseCharacterSet: Details of the Autonomous Database character +// set resource. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDatabaseCharacterSets/ +type AutonomousDatabaseCharacterSet struct { + // CharacterSet: Output only. The character set name for the Autonomous + // Database which is the ID in the resource name. + CharacterSet string `json:"characterSet,omitempty"` + // CharacterSetType: Output only. The character set type for the Autonomous + // Database. + // + // Possible values: + // "CHARACTER_SET_TYPE_UNSPECIFIED" - Character set type is not specified. + // "DATABASE" - Character set type is set to database. + // "NATIONAL" - Character set type is set to national. + CharacterSetType string `json:"characterSetType,omitempty"` + // Name: Identifier. The name of the Autonomous Database Character Set resource + // in the following format: + // projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autono + // mous_database_character_set} + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "CharacterSet") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CharacterSet") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDatabaseCharacterSet) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDatabaseCharacterSet + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AutonomousDatabaseConnectionStrings: The connection string used to connect +// to the Autonomous Database. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseConnectionStrings +type AutonomousDatabaseConnectionStrings struct { + // AllConnectionStrings: Output only. Returns all connection strings that can + // be used to connect to the Autonomous Database. + AllConnectionStrings *AllConnectionStrings `json:"allConnectionStrings,omitempty"` + // Dedicated: Output only. The database service provides the least level of + // resources to each SQL statement, but supports the most number of concurrent + // SQL statements. + Dedicated string `json:"dedicated,omitempty"` + // High: Output only. The database service provides the highest level of + // resources to each SQL statement. + High string `json:"high,omitempty"` + // Low: Output only. The database service provides the least level of resources + // to each SQL statement. + Low string `json:"low,omitempty"` + // Medium: Output only. The database service provides a lower level of + // resources to each SQL statement. + Medium string `json:"medium,omitempty"` + // Profiles: Output only. A list of connection string profiles to allow clients + // to group, filter, and select values based on the structured metadata. + Profiles []*DatabaseConnectionStringProfile `json:"profiles,omitempty"` + // ForceSendFields is a list of field names (e.g. "AllConnectionStrings") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AllConnectionStrings") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDatabaseConnectionStrings) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDatabaseConnectionStrings + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AutonomousDatabaseConnectionUrls: The URLs for accessing Oracle Application +// Express (APEX) and SQL Developer Web with a browser from a Compute instance. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseConnectionUrls +type AutonomousDatabaseConnectionUrls struct { + // ApexUri: Output only. Oracle Application Express (APEX) URL. + ApexUri string `json:"apexUri,omitempty"` + // DatabaseTransformsUri: Output only. The URL of the Database Transforms for + // the Autonomous Database. + DatabaseTransformsUri string `json:"databaseTransformsUri,omitempty"` + // GraphStudioUri: Output only. The URL of the Graph Studio for the Autonomous + // Database. + GraphStudioUri string `json:"graphStudioUri,omitempty"` + // MachineLearningNotebookUri: Output only. The URL of the Oracle Machine + // Learning (OML) Notebook for the Autonomous Database. + MachineLearningNotebookUri string `json:"machineLearningNotebookUri,omitempty"` + // MachineLearningUserManagementUri: Output only. The URL of Machine Learning + // user management the Autonomous Database. + MachineLearningUserManagementUri string `json:"machineLearningUserManagementUri,omitempty"` + // MongoDbUri: Output only. The URL of the MongoDB API for the Autonomous + // Database. + MongoDbUri string `json:"mongoDbUri,omitempty"` + // OrdsUri: Output only. The Oracle REST Data Services (ORDS) URL of the Web + // Access for the Autonomous Database. + OrdsUri string `json:"ordsUri,omitempty"` + // SqlDevWebUri: Output only. The URL of the Oracle SQL Developer Web for the + // Autonomous Database. + SqlDevWebUri string `json:"sqlDevWebUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApexUri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApexUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDatabaseConnectionUrls) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDatabaseConnectionUrls + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AutonomousDatabaseProperties: The properties of an Autonomous Database. +type AutonomousDatabaseProperties struct { + // ActualUsedDataStorageSizeTb: Output only. The amount of storage currently + // being used for user and system data, in terabytes. + ActualUsedDataStorageSizeTb float64 `json:"actualUsedDataStorageSizeTb,omitempty"` + // AllocatedStorageSizeTb: Output only. The amount of storage currently + // allocated for the database tables and billed for, rounded up in terabytes. + AllocatedStorageSizeTb float64 `json:"allocatedStorageSizeTb,omitempty"` + // ApexDetails: Output only. The details for the Oracle APEX Application + // Development. + ApexDetails *AutonomousDatabaseApex `json:"apexDetails,omitempty"` + // ArePrimaryAllowlistedIpsUsed: Output only. This field indicates the status + // of Data Guard and Access control for the Autonomous Database. The field's + // value is null if Data Guard is disabled or Access Control is disabled. The + // field's value is TRUE if both Data Guard and Access Control are enabled, and + // the Autonomous Database is using primary IP access control list (ACL) for + // standby. The field's value is FALSE if both Data Guard and Access Control + // are enabled, and the Autonomous Database is using a different IP access + // control list (ACL) for standby compared to primary. + ArePrimaryAllowlistedIpsUsed bool `json:"arePrimaryAllowlistedIpsUsed,omitempty"` + // AutonomousContainerDatabaseId: Output only. The Autonomous Container + // Database OCID. + AutonomousContainerDatabaseId string `json:"autonomousContainerDatabaseId,omitempty"` + // AvailableUpgradeVersions: Output only. The list of available Oracle Database + // upgrade versions for an Autonomous Database. + AvailableUpgradeVersions []string `json:"availableUpgradeVersions,omitempty"` + // BackupRetentionPeriodDays: Optional. The retention period for the Autonomous + // Database. This field is specified in days, can range from 1 day to 60 days, + // and has a default value of 60 days. + BackupRetentionPeriodDays int64 `json:"backupRetentionPeriodDays,omitempty"` + // CharacterSet: Optional. The character set for the Autonomous Database. The + // default is AL32UTF8. + CharacterSet string `json:"characterSet,omitempty"` + // ComputeCount: Optional. The number of compute servers for the Autonomous + // Database. + ComputeCount float64 `json:"computeCount,omitempty"` + // ConnectionStrings: Output only. The connection strings used to connect to an + // Autonomous Database. + ConnectionStrings *AutonomousDatabaseConnectionStrings `json:"connectionStrings,omitempty"` + // ConnectionUrls: Output only. The Oracle Connection URLs for an Autonomous + // Database. + ConnectionUrls *AutonomousDatabaseConnectionUrls `json:"connectionUrls,omitempty"` + // CpuCoreCount: Optional. The number of CPU cores to be made available to the + // database. + CpuCoreCount int64 `json:"cpuCoreCount,omitempty"` + // CustomerContacts: Optional. The list of customer contacts. + CustomerContacts []*CustomerContact `json:"customerContacts,omitempty"` + // DataSafeState: Output only. The current state of the Data Safe registration + // for the Autonomous Database. + // + // Possible values: + // "DATA_SAFE_STATE_UNSPECIFIED" - Default unspecified value. + // "REGISTERING" - Registering data safe state. + // "REGISTERED" - Registered data safe state. + // "DEREGISTERING" - Deregistering data safe state. + // "NOT_REGISTERED" - Not registered data safe state. + // "FAILED" - Failed data safe state. + DataSafeState string `json:"dataSafeState,omitempty"` + // DataStorageSizeGb: Optional. The size of the data stored in the database, in + // gigabytes. + DataStorageSizeGb int64 `json:"dataStorageSizeGb,omitempty"` + // DataStorageSizeTb: Optional. The size of the data stored in the database, in + // terabytes. + DataStorageSizeTb int64 `json:"dataStorageSizeTb,omitempty"` + // DatabaseManagementState: Output only. The current state of database + // management for the Autonomous Database. + // + // Possible values: + // "DATABASE_MANAGEMENT_STATE_UNSPECIFIED" - Default unspecified value. + // "ENABLING" - Enabling Database Management state + // "ENABLED" - Enabled Database Management state + // "DISABLING" - Disabling Database Management state + // "NOT_ENABLED" - Not Enabled Database Management state + // "FAILED_ENABLING" - Failed enabling Database Management state + // "FAILED_DISABLING" - Failed disabling Database Management state + DatabaseManagementState string `json:"databaseManagementState,omitempty"` + // DbEdition: Optional. The edition of the Autonomous Databases. + // + // Possible values: + // "DATABASE_EDITION_UNSPECIFIED" - Default unspecified value. + // "STANDARD_EDITION" - Standard Database Edition + // "ENTERPRISE_EDITION" - Enterprise Database Edition + DbEdition string `json:"dbEdition,omitempty"` + // DbVersion: Optional. The Oracle Database version for the Autonomous + // Database. + DbVersion string `json:"dbVersion,omitempty"` + // DbWorkload: Required. The workload type of the Autonomous Database. + // + // Possible values: + // "DB_WORKLOAD_UNSPECIFIED" - Default unspecified value. + // "OLTP" - Autonomous Transaction Processing database. + // "DW" - Autonomous Data Warehouse database. + // "AJD" - Autonomous JSON Database. + // "APEX" - Autonomous Database with the Oracle APEX Application Development + // workload type. + DbWorkload string `json:"dbWorkload,omitempty"` + // FailedDataRecoveryDuration: Output only. This field indicates the number of + // seconds of data loss during a Data Guard failover. + FailedDataRecoveryDuration string `json:"failedDataRecoveryDuration,omitempty"` + // IsAutoScalingEnabled: Optional. This field indicates if auto scaling is + // enabled for the Autonomous Database CPU core count. + IsAutoScalingEnabled bool `json:"isAutoScalingEnabled,omitempty"` + // IsLocalDataGuardEnabled: Output only. This field indicates whether the + // Autonomous Database has local (in-region) Data Guard enabled. + IsLocalDataGuardEnabled bool `json:"isLocalDataGuardEnabled,omitempty"` + // IsStorageAutoScalingEnabled: Optional. This field indicates if auto scaling + // is enabled for the Autonomous Database storage. + IsStorageAutoScalingEnabled bool `json:"isStorageAutoScalingEnabled,omitempty"` + // LicenseType: Required. The license type used for the Autonomous Database. + // + // Possible values: + // "LICENSE_TYPE_UNSPECIFIED" - Unspecified + // "LICENSE_INCLUDED" - License included part of offer + // "BRING_YOUR_OWN_LICENSE" - Bring your own license + LicenseType string `json:"licenseType,omitempty"` + // LifecycleDetails: Output only. The details of the current lifestyle state of + // the Autonomous Database. + LifecycleDetails string `json:"lifecycleDetails,omitempty"` + // LocalAdgAutoFailoverMaxDataLossLimit: Output only. This field indicates the + // maximum data loss limit for an Autonomous Database, in seconds. + LocalAdgAutoFailoverMaxDataLossLimit int64 `json:"localAdgAutoFailoverMaxDataLossLimit,omitempty"` + // LocalDisasterRecoveryType: Output only. This field indicates the local + // disaster recovery (DR) type of an Autonomous Database. + // + // Possible values: + // "LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED" - Default unspecified value. + // "ADG" - Autonomous Data Guard recovery. + // "BACKUP_BASED" - Backup based recovery. + LocalDisasterRecoveryType string `json:"localDisasterRecoveryType,omitempty"` + // LocalStandbyDb: Output only. The details of the Autonomous Data Guard + // standby database. + LocalStandbyDb *AutonomousDatabaseStandbySummary `json:"localStandbyDb,omitempty"` + // MaintenanceBeginTime: Output only. The date and time when maintenance will + // begin. + MaintenanceBeginTime string `json:"maintenanceBeginTime,omitempty"` + // MaintenanceEndTime: Output only. The date and time when maintenance will + // end. + MaintenanceEndTime string `json:"maintenanceEndTime,omitempty"` + // MaintenanceScheduleType: Optional. The maintenance schedule of the + // Autonomous Database. + // + // Possible values: + // "MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED" - Default unspecified value. + // "EARLY" - An EARLY maintenance schedule patches the database before the + // the regular scheduled maintenance. + // "REGULAR" - A REGULAR maintenance schedule follows the normal maintenance + // cycle. + MaintenanceScheduleType string `json:"maintenanceScheduleType,omitempty"` + // MemoryPerOracleComputeUnitGbs: Output only. The amount of memory enabled per + // ECPU, in gigabytes. + MemoryPerOracleComputeUnitGbs int64 `json:"memoryPerOracleComputeUnitGbs,omitempty"` + // MemoryTableGbs: Output only. The memory assigned to in-memory tables in an + // Autonomous Database. + MemoryTableGbs int64 `json:"memoryTableGbs,omitempty"` + // MtlsConnectionRequired: Optional. This field specifies if the Autonomous + // Database requires mTLS connections. + MtlsConnectionRequired bool `json:"mtlsConnectionRequired,omitempty"` + // NCharacterSet: Optional. The national character set for the Autonomous + // Database. The default is AL16UTF16. + NCharacterSet string `json:"nCharacterSet,omitempty"` + // NextLongTermBackupTime: Output only. The long term backup schedule of the + // Autonomous Database. + NextLongTermBackupTime string `json:"nextLongTermBackupTime,omitempty"` + // OciUrl: Output only. The Oracle Cloud Infrastructure link for the Autonomous + // Database. + OciUrl string `json:"ociUrl,omitempty"` + // Ocid: Output only. OCID of the Autonomous Database. + // https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + Ocid string `json:"ocid,omitempty"` + // OpenMode: Output only. This field indicates the current mode of the + // Autonomous Database. + // + // Possible values: + // "OPEN_MODE_UNSPECIFIED" - Default unspecified value. + // "READ_ONLY" - Read Only Mode + // "READ_WRITE" - Read Write Mode + OpenMode string `json:"openMode,omitempty"` + // OperationsInsightsState: Output only. This field indicates the state of + // Operations Insights for the Autonomous Database. + // + // Possible values: + // "OPERATIONS_INSIGHTS_STATE_UNSPECIFIED" - Default unspecified value. + // "ENABLING" - Enabling status for operation insights. + // "ENABLED" - Enabled status for operation insights. + // "DISABLING" - Disabling status for operation insights. + // "NOT_ENABLED" - Not Enabled status for operation insights. + // "FAILED_ENABLING" - Failed enabling status for operation insights. + // "FAILED_DISABLING" - Failed disabling status for operation insights. + OperationsInsightsState string `json:"operationsInsightsState,omitempty"` + // PeerDbIds: Output only. The list of OCIDs of standby databases located in + // Autonomous Data Guard remote regions that are associated with the source + // database. + PeerDbIds []string `json:"peerDbIds,omitempty"` + // PermissionLevel: Output only. The permission level of the Autonomous + // Database. + // + // Possible values: + // "PERMISSION_LEVEL_UNSPECIFIED" - Default unspecified value. + // "RESTRICTED" - Restricted mode allows access only by admin users. + // "UNRESTRICTED" - Normal access. + PermissionLevel string `json:"permissionLevel,omitempty"` + // PrivateEndpoint: Output only. The private endpoint for the Autonomous + // Database. + PrivateEndpoint string `json:"privateEndpoint,omitempty"` + // PrivateEndpointIp: Optional. The private endpoint IP address for the + // Autonomous Database. + PrivateEndpointIp string `json:"privateEndpointIp,omitempty"` + // PrivateEndpointLabel: Optional. The private endpoint label for the + // Autonomous Database. + PrivateEndpointLabel string `json:"privateEndpointLabel,omitempty"` + // RefreshableMode: Output only. The refresh mode of the cloned Autonomous + // Database. + // + // Possible values: + // "REFRESHABLE_MODE_UNSPECIFIED" - The default unspecified value. + // "AUTOMATIC" - AUTOMATIC indicates that the cloned database is + // automatically refreshed with data from the source Autonomous Database. + // "MANUAL" - MANUAL indicates that the cloned database is manually refreshed + // with data from the source Autonomous Database. + RefreshableMode string `json:"refreshableMode,omitempty"` + // RefreshableState: Output only. The refresh State of the clone. + // + // Possible values: + // "REFRESHABLE_STATE_UNSPECIFIED" - Default unspecified value. + // "REFRESHING" - Refreshing + // "NOT_REFRESHING" - Not refreshed + RefreshableState string `json:"refreshableState,omitempty"` + // Role: Output only. The Data Guard role of the Autonomous Database. + // + // Possible values: + // "ROLE_UNSPECIFIED" - Default unspecified value. + // "PRIMARY" - Primary role + // "STANDBY" - Standby role + // "DISABLED_STANDBY" - Disabled standby role + // "BACKUP_COPY" - Backup copy role + // "SNAPSHOT_STANDBY" - Snapshot standby role + Role string `json:"role,omitempty"` + // ScheduledOperationDetails: Output only. The list and details of the + // scheduled operations of the Autonomous Database. + ScheduledOperationDetails []*ScheduledOperationDetails `json:"scheduledOperationDetails,omitempty"` + // SecretId: Optional. The ID of the Oracle Cloud Infrastructure vault secret. + SecretId string `json:"secretId,omitempty"` + // SqlWebDeveloperUrl: Output only. The SQL Web Developer URL for the + // Autonomous Database. + SqlWebDeveloperUrl string `json:"sqlWebDeveloperUrl,omitempty"` + // State: Output only. The current lifecycle state of the Autonomous Database. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default unspecified value. + // "PROVISIONING" - Indicates that the Autonomous Database is in Provisioning + // state. + // "AVAILABLE" - Indicates that the Autonomous Database is in Available + // state. + // "STOPPING" - Indicates that the Autonomous Database is in Stopping state. + // "STOPPED" - Indicates that the Autonomous Database is in Stopped state. + // "STARTING" - Indicates that the Autonomous Database is in Starting state. + // "TERMINATING" - Indicates that the Autonomous Database is in Terminating + // state. + // "TERMINATED" - Indicates that the Autonomous Database is in Terminated + // state. + // "UNAVAILABLE" - Indicates that the Autonomous Database is in Unavailable + // state. + // "RESTORE_IN_PROGRESS" - Indicates that the Autonomous Database Restore is + // in progress. + // "RESTORE_FAILED" - Indicates that the Autonomous Database failed to + // restore. + // "BACKUP_IN_PROGRESS" - Indicates that the Autonomous Database backup is in + // progress. + // "SCALE_IN_PROGRESS" - Indicates that the Autonomous Database scale is in + // progress. + // "AVAILABLE_NEEDS_ATTENTION" - Indicates that the Autonomous Database is in + // Available Needs Attention state. + // "UPDATING" - Indicates that the Autonomous Database is in Updating state. + // "MAINTENANCE_IN_PROGRESS" - Indicates that the Autonomous Database is in + // Maintenance In Progress state. + // "RESTARTING" - Indicates that the Autonomous Database is in Restarting + // state. + // "RECREATING" - Indicates that the Autonomous Database is in Recreating + // state. + // "ROLE_CHANGE_IN_PROGRESS" - Indicates that the Autonomous Database is in + // Role Change In Progress state. + // "UPGRADING" - Indicates that the Autonomous Database is in Upgrading + // state. + // "INACCESSIBLE" - Indicates that the Autonomous Database is in Inaccessible + // state. + // "STANDBY" - Indicates that the Autonomous Database is in Standby state. + State string `json:"state,omitempty"` + // SupportedCloneRegions: Output only. The list of available regions that can + // be used to create a clone for the Autonomous Database. + SupportedCloneRegions []string `json:"supportedCloneRegions,omitempty"` + // TotalAutoBackupStorageSizeGbs: Output only. The storage space used by + // automatic backups of Autonomous Database, in gigabytes. + TotalAutoBackupStorageSizeGbs float64 `json:"totalAutoBackupStorageSizeGbs,omitempty"` + // UsedDataStorageSizeTbs: Output only. The storage space used by Autonomous + // Database, in gigabytes. + UsedDataStorageSizeTbs int64 `json:"usedDataStorageSizeTbs,omitempty"` + // VaultId: Optional. The ID of the Oracle Cloud Infrastructure vault. + VaultId string `json:"vaultId,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ActualUsedDataStorageSizeTb") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActualUsedDataStorageSizeTb") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDatabaseProperties) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDatabaseProperties + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *AutonomousDatabaseProperties) UnmarshalJSON(data []byte) error { + type NoMethod AutonomousDatabaseProperties + var s1 struct { + ActualUsedDataStorageSizeTb gensupport.JSONFloat64 `json:"actualUsedDataStorageSizeTb"` + AllocatedStorageSizeTb gensupport.JSONFloat64 `json:"allocatedStorageSizeTb"` + ComputeCount gensupport.JSONFloat64 `json:"computeCount"` + TotalAutoBackupStorageSizeGbs gensupport.JSONFloat64 `json:"totalAutoBackupStorageSizeGbs"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ActualUsedDataStorageSizeTb = float64(s1.ActualUsedDataStorageSizeTb) + s.AllocatedStorageSizeTb = float64(s1.AllocatedStorageSizeTb) + s.ComputeCount = float64(s1.ComputeCount) + s.TotalAutoBackupStorageSizeGbs = float64(s1.TotalAutoBackupStorageSizeGbs) + return nil +} + +// AutonomousDatabaseStandbySummary: Autonomous Data Guard standby database +// details. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/AutonomousDatabaseStandbySummary +type AutonomousDatabaseStandbySummary struct { + // DataGuardRoleChangedTime: Output only. The date and time the Autonomous Data + // Guard role was switched for the standby Autonomous Database. + DataGuardRoleChangedTime string `json:"dataGuardRoleChangedTime,omitempty"` + // DisasterRecoveryRoleChangedTime: Output only. The date and time the Disaster + // Recovery role was switched for the standby Autonomous Database. + DisasterRecoveryRoleChangedTime string `json:"disasterRecoveryRoleChangedTime,omitempty"` + // LagTimeDuration: Output only. The amount of time, in seconds, that the data + // of the standby database lags in comparison to the data of the primary + // database. + LagTimeDuration string `json:"lagTimeDuration,omitempty"` + // LifecycleDetails: Output only. The additional details about the current + // lifecycle state of the Autonomous Database. + LifecycleDetails string `json:"lifecycleDetails,omitempty"` + // State: Output only. The current lifecycle state of the Autonomous Database. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default unspecified value. + // "PROVISIONING" - Indicates that the Autonomous Database is in Provisioning + // state. + // "AVAILABLE" - Indicates that the Autonomous Database is in Available + // state. + // "STOPPING" - Indicates that the Autonomous Database is in Stopping state. + // "STOPPED" - Indicates that the Autonomous Database is in Stopped state. + // "STARTING" - Indicates that the Autonomous Database is in Starting state. + // "TERMINATING" - Indicates that the Autonomous Database is in Terminating + // state. + // "TERMINATED" - Indicates that the Autonomous Database is in Terminated + // state. + // "UNAVAILABLE" - Indicates that the Autonomous Database is in Unavailable + // state. + // "RESTORE_IN_PROGRESS" - Indicates that the Autonomous Database Restore is + // in progress. + // "RESTORE_FAILED" - Indicates that the Autonomous Database failed to + // restore. + // "BACKUP_IN_PROGRESS" - Indicates that the Autonomous Database backup is in + // progress. + // "SCALE_IN_PROGRESS" - Indicates that the Autonomous Database scale is in + // progress. + // "AVAILABLE_NEEDS_ATTENTION" - Indicates that the Autonomous Database is in + // Available Needs Attention state. + // "UPDATING" - Indicates that the Autonomous Database is in Updating state. + // "MAINTENANCE_IN_PROGRESS" - Indicates that the Autonomous Database is in + // Maintenance In Progress state. + // "RESTARTING" - Indicates that the Autonomous Database is in Restarting + // state. + // "RECREATING" - Indicates that the Autonomous Database is in Recreating + // state. + // "ROLE_CHANGE_IN_PROGRESS" - Indicates that the Autonomous Database is in + // Role Change In Progress state. + // "UPGRADING" - Indicates that the Autonomous Database is in Upgrading + // state. + // "INACCESSIBLE" - Indicates that the Autonomous Database is in Inaccessible + // state. + // "STANDBY" - Indicates that the Autonomous Database is in Standby state. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataGuardRoleChangedTime") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataGuardRoleChangedTime") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDatabaseStandbySummary) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDatabaseStandbySummary + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AutonomousDbVersion: Details of the Autonomous Database version. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/AutonomousDbVersionSummary/ +type AutonomousDbVersion struct { + // DbWorkload: Output only. The Autonomous Database workload type. + // + // Possible values: + // "DB_WORKLOAD_UNSPECIFIED" - Default unspecified value. + // "OLTP" - Autonomous Transaction Processing database. + // "DW" - Autonomous Data Warehouse database. + // "AJD" - Autonomous JSON Database. + // "APEX" - Autonomous Database with the Oracle APEX Application Development + // workload type. + DbWorkload string `json:"dbWorkload,omitempty"` + // Name: Identifier. The name of the Autonomous Database Version resource with + // the format: + // projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_ver + // sion} + Name string `json:"name,omitempty"` + // Version: Output only. An Oracle Database version for Autonomous Database. + Version string `json:"version,omitempty"` + // WorkloadUri: Output only. A URL that points to a detailed description of the + // Autonomous Database version. + WorkloadUri string `json:"workloadUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "DbWorkload") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbWorkload") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutonomousDbVersion) MarshalJSON() ([]byte, error) { + type NoMethod AutonomousDbVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// CloudAccountDetails: Details of the OCI Cloud Account. +type CloudAccountDetails struct { + // AccountCreationUri: Output only. URL to create a new account and link. + AccountCreationUri string `json:"accountCreationUri,omitempty"` + // CloudAccount: Output only. OCI account name. + CloudAccount string `json:"cloudAccount,omitempty"` + // CloudAccountHomeRegion: Output only. OCI account home region. + CloudAccountHomeRegion string `json:"cloudAccountHomeRegion,omitempty"` + // LinkExistingAccountUri: Output only. URL to link an existing account. + LinkExistingAccountUri string `json:"linkExistingAccountUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccountCreationUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccountCreationUri") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudAccountDetails) MarshalJSON() ([]byte, error) { + type NoMethod CloudAccountDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudExadataInfrastructure: Represents CloudExadataInfrastructure resource. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/CloudExadataInfrastructure/ +type CloudExadataInfrastructure struct { + // CreateTime: Output only. The date and time that the Exadata Infrastructure + // was created. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Optional. User friendly name for this resource. + DisplayName string `json:"displayName,omitempty"` + // EntitlementId: Output only. Entitlement ID of the private offer against + // which this infrastructure resource is provisioned. + EntitlementId string `json:"entitlementId,omitempty"` + // GcpOracleZone: Optional. GCP location where Oracle Exadata is hosted. + GcpOracleZone string `json:"gcpOracleZone,omitempty"` + // Labels: Optional. Labels or tags associated with the resource. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The name of the Exadata Infrastructure resource with the + // format: + // projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exad + // ata_infrastructure} + Name string `json:"name,omitempty"` + // Properties: Optional. Various properties of the infra. + Properties *CloudExadataInfrastructureProperties `json:"properties,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudExadataInfrastructure) MarshalJSON() ([]byte, error) { + type NoMethod CloudExadataInfrastructure + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudExadataInfrastructureProperties: Various properties of Exadata +// Infrastructure. +type CloudExadataInfrastructureProperties struct { + // ActivatedStorageCount: Output only. The requested number of additional + // storage servers activated for the Exadata Infrastructure. + ActivatedStorageCount int64 `json:"activatedStorageCount,omitempty"` + // AdditionalStorageCount: Output only. The requested number of additional + // storage servers for the Exadata Infrastructure. + AdditionalStorageCount int64 `json:"additionalStorageCount,omitempty"` + // AvailableStorageSizeGb: Output only. The available storage can be allocated + // to the Exadata Infrastructure resource, in gigabytes (GB). + AvailableStorageSizeGb int64 `json:"availableStorageSizeGb,omitempty"` + // ComputeCount: Optional. The number of compute servers for the Exadata + // Infrastructure. + ComputeCount int64 `json:"computeCount,omitempty"` + // CpuCount: Optional. The number of enabled CPU cores. + CpuCount int64 `json:"cpuCount,omitempty"` + // CustomerContacts: Optional. The list of customer contacts. + CustomerContacts []*CustomerContact `json:"customerContacts,omitempty"` + // DataStorageSizeTb: Output only. Size, in terabytes, of the DATA disk group. + DataStorageSizeTb float64 `json:"dataStorageSizeTb,omitempty"` + // DbNodeStorageSizeGb: Optional. The local node storage allocated in GBs. + DbNodeStorageSizeGb int64 `json:"dbNodeStorageSizeGb,omitempty"` + // DbServerVersion: Output only. The software version of the database servers + // (dom0) in the Exadata Infrastructure. + DbServerVersion string `json:"dbServerVersion,omitempty"` + // MaintenanceWindow: Optional. Maintenance window for repair. + MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"` + // MaxCpuCount: Output only. The total number of CPU cores available. + MaxCpuCount int64 `json:"maxCpuCount,omitempty"` + // MaxDataStorageTb: Output only. The total available DATA disk group size. + MaxDataStorageTb float64 `json:"maxDataStorageTb,omitempty"` + // MaxDbNodeStorageSizeGb: Output only. The total local node storage available + // in GBs. + MaxDbNodeStorageSizeGb int64 `json:"maxDbNodeStorageSizeGb,omitempty"` + // MaxMemoryGb: Output only. The total memory available in GBs. + MaxMemoryGb int64 `json:"maxMemoryGb,omitempty"` + // MemorySizeGb: Optional. The memory allocated in GBs. + MemorySizeGb int64 `json:"memorySizeGb,omitempty"` + // MonthlyDbServerVersion: Output only. The monthly software version of the + // database servers (dom0) in the Exadata Infrastructure. Example: 20.1.15 + MonthlyDbServerVersion string `json:"monthlyDbServerVersion,omitempty"` + // MonthlyStorageServerVersion: Output only. The monthly software version of + // the storage servers (cells) in the Exadata Infrastructure. Example: 20.1.15 + MonthlyStorageServerVersion string `json:"monthlyStorageServerVersion,omitempty"` + // NextMaintenanceRunId: Output only. The OCID of the next maintenance run. + NextMaintenanceRunId string `json:"nextMaintenanceRunId,omitempty"` + // NextMaintenanceRunTime: Output only. The time when the next maintenance run + // will occur. + NextMaintenanceRunTime string `json:"nextMaintenanceRunTime,omitempty"` + // NextSecurityMaintenanceRunTime: Output only. The time when the next security + // maintenance run will occur. + NextSecurityMaintenanceRunTime string `json:"nextSecurityMaintenanceRunTime,omitempty"` + // OciUrl: Output only. Deep link to the OCI console to view this resource. + OciUrl string `json:"ociUrl,omitempty"` + // Ocid: Output only. OCID of created infra. + // https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + Ocid string `json:"ocid,omitempty"` + // Shape: Required. The shape of the Exadata Infrastructure. The shape + // determines the amount of CPU, storage, and memory resources allocated to the + // instance. + Shape string `json:"shape,omitempty"` + // State: Output only. The current lifecycle state of the Exadata + // Infrastructure. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default unspecified value. + // "PROVISIONING" - The Exadata Infrastructure is being provisioned. + // "AVAILABLE" - The Exadata Infrastructure is available for use. + // "UPDATING" - The Exadata Infrastructure is being updated. + // "TERMINATING" - The Exadata Infrastructure is being terminated. + // "TERMINATED" - The Exadata Infrastructure is terminated. + // "FAILED" - The Exadata Infrastructure is in failed state. + // "MAINTENANCE_IN_PROGRESS" - The Exadata Infrastructure is in maintenance. + State string `json:"state,omitempty"` + // StorageCount: Optional. The number of Cloud Exadata storage servers for the + // Exadata Infrastructure. + StorageCount int64 `json:"storageCount,omitempty"` + // StorageServerVersion: Output only. The software version of the storage + // servers (cells) in the Exadata Infrastructure. + StorageServerVersion string `json:"storageServerVersion,omitempty"` + // TotalStorageSizeGb: Optional. The total storage allocated to the Exadata + // Infrastructure resource, in gigabytes (GB). + TotalStorageSizeGb int64 `json:"totalStorageSizeGb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActivatedStorageCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActivatedStorageCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudExadataInfrastructureProperties) MarshalJSON() ([]byte, error) { + type NoMethod CloudExadataInfrastructureProperties + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *CloudExadataInfrastructureProperties) UnmarshalJSON(data []byte) error { + type NoMethod CloudExadataInfrastructureProperties + var s1 struct { + DataStorageSizeTb gensupport.JSONFloat64 `json:"dataStorageSizeTb"` + MaxDataStorageTb gensupport.JSONFloat64 `json:"maxDataStorageTb"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DataStorageSizeTb = float64(s1.DataStorageSizeTb) + s.MaxDataStorageTb = float64(s1.MaxDataStorageTb) + return nil +} + +// CloudVmCluster: Details of the Cloud VM Cluster resource. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/CloudVmCluster/ +type CloudVmCluster struct { + // BackupSubnetCidr: Required. CIDR range of the backup subnet. + BackupSubnetCidr string `json:"backupSubnetCidr,omitempty"` + // Cidr: Required. Network settings. CIDR to use for cluster IP allocation. + Cidr string `json:"cidr,omitempty"` + // CreateTime: Output only. The date and time that the VM cluster was created. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Optional. User friendly name for this resource. + DisplayName string `json:"displayName,omitempty"` + // ExadataInfrastructure: Required. The name of the Exadata Infrastructure + // resource on which VM cluster resource is created, in the following format: + // projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extra + // data_infrastructure} + ExadataInfrastructure string `json:"exadataInfrastructure,omitempty"` + // GcpOracleZone: Output only. GCP location where Oracle Exadata is hosted. It + // is same as GCP Oracle zone of Exadata infrastructure. + GcpOracleZone string `json:"gcpOracleZone,omitempty"` + // Labels: Optional. Labels or tags associated with the VM Cluster. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The name of the VM Cluster resource with the format: + // projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster} + Name string `json:"name,omitempty"` + // Network: Required. The name of the VPC network. Format: + // projects/{project}/global/networks/{network} + Network string `json:"network,omitempty"` + // Properties: Optional. Various properties of the VM Cluster. + Properties *CloudVmClusterProperties `json:"properties,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BackupSubnetCidr") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupSubnetCidr") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudVmCluster) MarshalJSON() ([]byte, error) { + type NoMethod CloudVmCluster + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloudVmClusterProperties: Various properties and settings associated with +// Exadata VM cluster. +type CloudVmClusterProperties struct { + // ClusterName: Optional. OCI Cluster name. + ClusterName string `json:"clusterName,omitempty"` + // CompartmentId: Output only. Compartment ID of cluster. + CompartmentId string `json:"compartmentId,omitempty"` + // CpuCoreCount: Required. Number of enabled CPU cores. + CpuCoreCount int64 `json:"cpuCoreCount,omitempty"` + // DataStorageSizeTb: Optional. The data disk group size to be allocated in + // TBs. + DataStorageSizeTb float64 `json:"dataStorageSizeTb,omitempty"` + // DbNodeStorageSizeGb: Optional. Local storage per VM. + DbNodeStorageSizeGb int64 `json:"dbNodeStorageSizeGb,omitempty"` + // DbServerOcids: Optional. OCID of database servers. + DbServerOcids []string `json:"dbServerOcids,omitempty"` + // DiagnosticsDataCollectionOptions: Optional. Data collection options for + // diagnostics. + DiagnosticsDataCollectionOptions *DataCollectionOptions `json:"diagnosticsDataCollectionOptions,omitempty"` + // DiskRedundancy: Optional. The type of redundancy. + // + // Possible values: + // "DISK_REDUNDANCY_UNSPECIFIED" - Unspecified. + // "HIGH" - High - 3 way mirror. + // "NORMAL" - Normal - 2 way mirror. + DiskRedundancy string `json:"diskRedundancy,omitempty"` + // DnsListenerIp: Output only. DNS listener IP. + DnsListenerIp string `json:"dnsListenerIp,omitempty"` + // Domain: Output only. Parent DNS domain where SCAN DNS and hosts names are + // qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com + Domain string `json:"domain,omitempty"` + // GiVersion: Optional. Grid Infrastructure Version. + GiVersion string `json:"giVersion,omitempty"` + // Hostname: Output only. host name without domain. format: "-" with some + // suffix. ex: sp2-yi0xq where "sp2" is the hostname_prefix. + Hostname string `json:"hostname,omitempty"` + // HostnamePrefix: Optional. Prefix for VM cluster host names. + HostnamePrefix string `json:"hostnamePrefix,omitempty"` + // LicenseType: Required. License type of VM Cluster. + // + // Possible values: + // "LICENSE_TYPE_UNSPECIFIED" - Unspecified + // "LICENSE_INCLUDED" - License included part of offer + // "BRING_YOUR_OWN_LICENSE" - Bring your own license + LicenseType string `json:"licenseType,omitempty"` + // LocalBackupEnabled: Optional. Use local backup. + LocalBackupEnabled bool `json:"localBackupEnabled,omitempty"` + // MemorySizeGb: Optional. Memory allocated in GBs. + MemorySizeGb int64 `json:"memorySizeGb,omitempty"` + // NodeCount: Optional. Number of database servers. + NodeCount int64 `json:"nodeCount,omitempty"` + // OciUrl: Output only. Deep link to the OCI console to view this resource. + OciUrl string `json:"ociUrl,omitempty"` + // Ocid: Output only. Oracle Cloud Infrastructure ID of VM Cluster. + Ocid string `json:"ocid,omitempty"` + // OcpuCount: Optional. OCPU count per VM. Minimum is 0.1. + OcpuCount float64 `json:"ocpuCount,omitempty"` + // ScanDns: Output only. SCAN DNS name. ex: + // sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com + ScanDns string `json:"scanDns,omitempty"` + // ScanDnsRecordId: Output only. OCID of scan DNS record. + ScanDnsRecordId string `json:"scanDnsRecordId,omitempty"` + // ScanIpIds: Output only. OCIDs of scan IPs. + ScanIpIds []string `json:"scanIpIds,omitempty"` + // ScanListenerPortTcp: Output only. SCAN listener port - TCP + ScanListenerPortTcp int64 `json:"scanListenerPortTcp,omitempty"` + // ScanListenerPortTcpSsl: Output only. SCAN listener port - TLS + ScanListenerPortTcpSsl int64 `json:"scanListenerPortTcpSsl,omitempty"` + // Shape: Output only. Shape of VM Cluster. + Shape string `json:"shape,omitempty"` + // SparseDiskgroupEnabled: Optional. Use exadata sparse snapshots. + SparseDiskgroupEnabled bool `json:"sparseDiskgroupEnabled,omitempty"` + // SshPublicKeys: Optional. SSH public keys to be stored with cluster. + SshPublicKeys []string `json:"sshPublicKeys,omitempty"` + // State: Output only. State of the cluster. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default unspecified value. + // "PROVISIONING" - Indicates that the resource is in Provisioning state. + // "AVAILABLE" - Indicates that the resource is in Available state. + // "UPDATING" - Indicates that the resource is in Updating state. + // "TERMINATING" - Indicates that the resource is in Terminating state. + // "TERMINATED" - Indicates that the resource is in Terminated state. + // "FAILED" - Indicates that the resource is in Failed state. + // "MAINTENANCE_IN_PROGRESS" - Indicates that the resource is in Maintenance + // In Progress state. + State string `json:"state,omitempty"` + // StorageSizeGb: Output only. The storage allocation for the disk group, in + // gigabytes (GB). + StorageSizeGb int64 `json:"storageSizeGb,omitempty"` + // SystemVersion: Output only. Operating system version of the image. + SystemVersion string `json:"systemVersion,omitempty"` + // TimeZone: Optional. Time zone of VM Cluster to set. Defaults to UTC if not + // specified. + TimeZone *TimeZone `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ClusterName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CloudVmClusterProperties) MarshalJSON() ([]byte, error) { + type NoMethod CloudVmClusterProperties + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *CloudVmClusterProperties) UnmarshalJSON(data []byte) error { + type NoMethod CloudVmClusterProperties + var s1 struct { + DataStorageSizeTb gensupport.JSONFloat64 `json:"dataStorageSizeTb"` + OcpuCount gensupport.JSONFloat64 `json:"ocpuCount"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DataStorageSizeTb = float64(s1.DataStorageSizeTb) + s.OcpuCount = float64(s1.OcpuCount) + return nil +} + +// CustomerContact: The CustomerContact reference as defined by Oracle. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/CustomerContact +type CustomerContact struct { + // Email: Required. The email address used by Oracle to send notifications + // regarding databases and infrastructure. + Email string `json:"email,omitempty"` + // ForceSendFields is a list of field names (e.g. "Email") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CustomerContact) MarshalJSON() ([]byte, error) { + type NoMethod CustomerContact + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DataCollectionOptions: Data collection options for diagnostics. +type DataCollectionOptions struct { + // DiagnosticsEventsEnabled: Optional. Indicates whether diagnostic collection + // is enabled for the VM cluster + DiagnosticsEventsEnabled bool `json:"diagnosticsEventsEnabled,omitempty"` + // HealthMonitoringEnabled: Optional. Indicates whether health monitoring is + // enabled for the VM cluster + HealthMonitoringEnabled bool `json:"healthMonitoringEnabled,omitempty"` + // IncidentLogsEnabled: Optional. Indicates whether incident logs and trace + // collection are enabled for the VM cluster + IncidentLogsEnabled bool `json:"incidentLogsEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "DiagnosticsEventsEnabled") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DiagnosticsEventsEnabled") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DataCollectionOptions) MarshalJSON() ([]byte, error) { + type NoMethod DataCollectionOptions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DatabaseConnectionStringProfile: The connection string profile to allow +// clients to group. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/DatabaseConnectionStringProfile +type DatabaseConnectionStringProfile struct { + // ConsumerGroup: Output only. The current consumer group being used by the + // connection. + // + // Possible values: + // "CONSUMER_GROUP_UNSPECIFIED" - Default unspecified value. + // "HIGH" - High consumer group. + // "MEDIUM" - Medium consumer group. + // "LOW" - Low consumer group. + // "TP" - TP consumer group. + // "TPURGENT" - TPURGENT consumer group. + ConsumerGroup string `json:"consumerGroup,omitempty"` + // DisplayName: Output only. The display name for the database connection. + DisplayName string `json:"displayName,omitempty"` + // HostFormat: Output only. The host name format being currently used in + // connection string. + // + // Possible values: + // "HOST_FORMAT_UNSPECIFIED" - Default unspecified value. + // "FQDN" - FQDN + // "IP" - IP + HostFormat string `json:"hostFormat,omitempty"` + // IsRegional: Output only. This field indicates if the connection string is + // regional and is only applicable for cross-region Data Guard. + IsRegional bool `json:"isRegional,omitempty"` + // Protocol: Output only. The protocol being used by the connection. + // + // Possible values: + // "PROTOCOL_UNSPECIFIED" - Default unspecified value. + // "TCP" - Tcp + // "TCPS" - Tcps + Protocol string `json:"protocol,omitempty"` + // SessionMode: Output only. The current session mode of the connection. + // + // Possible values: + // "SESSION_MODE_UNSPECIFIED" - Default unspecified value. + // "DIRECT" - Direct + // "INDIRECT" - Indirect + SessionMode string `json:"sessionMode,omitempty"` + // SyntaxFormat: Output only. The syntax of the connection string. + // + // Possible values: + // "SYNTAX_FORMAT_UNSPECIFIED" - Default unspecified value. + // "LONG" - Long + // "EZCONNECT" - Ezconnect + // "EZCONNECTPLUS" - Ezconnectplus + SyntaxFormat string `json:"syntaxFormat,omitempty"` + // TlsAuthentication: Output only. This field indicates the TLS authentication + // type of the connection. + // + // Possible values: + // "TLS_AUTHENTICATION_UNSPECIFIED" - Default unspecified value. + // "SERVER" - Server + // "MUTUAL" - Mutual + TlsAuthentication string `json:"tlsAuthentication,omitempty"` + // Value: Output only. The value of the connection string. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConsumerGroup") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConsumerGroup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DatabaseConnectionStringProfile) MarshalJSON() ([]byte, error) { + type NoMethod DatabaseConnectionStringProfile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DbNode: Details of the database node resource. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbNode/ +type DbNode struct { + // Name: Identifier. The name of the database node resource in the following + // format: + // projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/db + // Nodes/{db_node} + Name string `json:"name,omitempty"` + // Properties: Optional. Various properties of the database node. + Properties *DbNodeProperties `json:"properties,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DbNode) MarshalJSON() ([]byte, error) { + type NoMethod DbNode + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DbNodeProperties: Various properties and settings associated with Db node. +type DbNodeProperties struct { + // DbNodeStorageSizeGb: Optional. Local storage per database node. + DbNodeStorageSizeGb int64 `json:"dbNodeStorageSizeGb,omitempty"` + // DbServerOcid: Optional. Database server OCID. + DbServerOcid string `json:"dbServerOcid,omitempty"` + // Hostname: Optional. DNS + Hostname string `json:"hostname,omitempty"` + // MemorySizeGb: Memory allocated in GBs. + MemorySizeGb int64 `json:"memorySizeGb,omitempty"` + // Ocid: Output only. OCID of database node. + Ocid string `json:"ocid,omitempty"` + // OcpuCount: Optional. OCPU count per database node. + OcpuCount int64 `json:"ocpuCount,omitempty"` + // State: Output only. State of the database node. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default unspecified value. + // "PROVISIONING" - Indicates that the resource is in Provisioning state. + // "AVAILABLE" - Indicates that the resource is in Available state. + // "UPDATING" - Indicates that the resource is in Updating state. + // "STOPPING" - Indicates that the resource is in Stopping state. + // "STOPPED" - Indicates that the resource is in Stopped state. + // "STARTING" - Indicates that the resource is in Starting state. + // "TERMINATING" - Indicates that the resource is in Terminating state. + // "TERMINATED" - Indicates that the resource is in Terminated state. + // "FAILED" - Indicates that the resource is in Failed state. + State string `json:"state,omitempty"` + // TotalCpuCoreCount: Total CPU core count of the database node. + TotalCpuCoreCount int64 `json:"totalCpuCoreCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "DbNodeStorageSizeGb") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbNodeStorageSizeGb") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DbNodeProperties) MarshalJSON() ([]byte, error) { + type NoMethod DbNodeProperties + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DbServer: Details of the database server resource. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbServer/ +type DbServer struct { + // DisplayName: Optional. User friendly name for this resource. + DisplayName string `json:"displayName,omitempty"` + // Name: Identifier. The name of the database server resource with the format: + // projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_ex + // adata_infrastructure}/dbServers/{db_server} + Name string `json:"name,omitempty"` + // Properties: Optional. Various properties of the database server. + Properties *DbServerProperties `json:"properties,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DbServer) MarshalJSON() ([]byte, error) { + type NoMethod DbServer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DbServerProperties: Various properties and settings associated with Exadata +// database server. +type DbServerProperties struct { + // DbNodeIds: Output only. OCID of database nodes associated with the database + // server. + DbNodeIds []string `json:"dbNodeIds,omitempty"` + // DbNodeStorageSizeGb: Optional. Local storage per VM. + DbNodeStorageSizeGb int64 `json:"dbNodeStorageSizeGb,omitempty"` + // MaxDbNodeStorageSizeGb: Optional. Maximum local storage per VM. + MaxDbNodeStorageSizeGb int64 `json:"maxDbNodeStorageSizeGb,omitempty"` + // MaxMemorySizeGb: Optional. Maximum memory allocated in GBs. + MaxMemorySizeGb int64 `json:"maxMemorySizeGb,omitempty"` + // MaxOcpuCount: Optional. Maximum OCPU count per database. + MaxOcpuCount int64 `json:"maxOcpuCount,omitempty"` + // MemorySizeGb: Optional. Memory allocated in GBs. + MemorySizeGb int64 `json:"memorySizeGb,omitempty"` + // Ocid: Output only. OCID of database server. + Ocid string `json:"ocid,omitempty"` + // OcpuCount: Optional. OCPU count per database. + OcpuCount int64 `json:"ocpuCount,omitempty"` + // State: Output only. State of the database server. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default unspecified value. + // "CREATING" - Indicates that the resource is in Creating state. + // "AVAILABLE" - Indicates that the resource is in Available state. + // "UNAVAILABLE" - Indicates that the resource is in Unavailable state. + // "DELETING" - Indicates that the resource is in Deleting state. + // "DELETED" - Indicates that the resource is in Deleted state. + State string `json:"state,omitempty"` + // VmCount: Optional. Vm count per database. + VmCount int64 `json:"vmCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "DbNodeIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbNodeIds") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DbServerProperties) MarshalJSON() ([]byte, error) { + type NoMethod DbServerProperties + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DbSystemShape: Details of the Database System Shapes resource. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/DbSystemShapeSummary/ +type DbSystemShape struct { + // AvailableCoreCountPerNode: Optional. Number of cores per node. + AvailableCoreCountPerNode int64 `json:"availableCoreCountPerNode,omitempty"` + // AvailableDataStorageTb: Optional. Storage per storage server in terabytes. + AvailableDataStorageTb int64 `json:"availableDataStorageTb,omitempty"` + // AvailableMemoryPerNodeGb: Optional. Memory per database server node in + // gigabytes. + AvailableMemoryPerNodeGb int64 `json:"availableMemoryPerNodeGb,omitempty"` + // MaxNodeCount: Optional. Maximum number of database servers. + MaxNodeCount int64 `json:"maxNodeCount,omitempty"` + // MaxStorageCount: Optional. Maximum number of storage servers. + MaxStorageCount int64 `json:"maxStorageCount,omitempty"` + // MinCoreCountPerNode: Optional. Minimum core count per node. + MinCoreCountPerNode int64 `json:"minCoreCountPerNode,omitempty"` + // MinDbNodeStoragePerNodeGb: Optional. Minimum node storage per database + // server in gigabytes. + MinDbNodeStoragePerNodeGb int64 `json:"minDbNodeStoragePerNodeGb,omitempty"` + // MinMemoryPerNodeGb: Optional. Minimum memory per node in gigabytes. + MinMemoryPerNodeGb int64 `json:"minMemoryPerNodeGb,omitempty"` + // MinNodeCount: Optional. Minimum number of database servers. + MinNodeCount int64 `json:"minNodeCount,omitempty"` + // MinStorageCount: Optional. Minimum number of storage servers. + MinStorageCount int64 `json:"minStorageCount,omitempty"` + // Name: Identifier. The name of the Database System Shape resource with the + // format: + // projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape} + Name string `json:"name,omitempty"` + // Shape: Optional. shape + Shape string `json:"shape,omitempty"` + // ForceSendFields is a list of field names (e.g. "AvailableCoreCountPerNode") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AvailableCoreCountPerNode") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DbSystemShape) MarshalJSON() ([]byte, error) { + type NoMethod DbSystemShape + return gensupport.MarshalJSON(NoMethod(s), 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:"-"` +} + +// Entitlement: Details of the Entitlement resource. +type Entitlement struct { + // CloudAccountDetails: Details of the OCI Cloud Account. + CloudAccountDetails *CloudAccountDetails `json:"cloudAccountDetails,omitempty"` + // EntitlementId: Output only. Google Cloud Marketplace order ID (aka + // entitlement ID) + EntitlementId string `json:"entitlementId,omitempty"` + // Name: Identifier. The name of the Entitlement resource with the format: + // projects/{project}/locations/{region}/entitlements/{entitlement} + Name string `json:"name,omitempty"` + // State: Output only. Entitlement State. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default unspecified value. + // "ACCOUNT_NOT_LINKED" - Account not linked. + // "ACCOUNT_NOT_ACTIVE" - Account is linked but not active. + // "ACTIVE" - Entitlement and Account are active. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "CloudAccountDetails") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CloudAccountDetails") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Entitlement) MarshalJSON() ([]byte, error) { + type NoMethod Entitlement + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GenerateAutonomousDatabaseWalletRequest: The request for +// `AutonomousDatabase.GenerateWallet`. +type GenerateAutonomousDatabaseWalletRequest struct { + // IsRegional: Optional. True when requesting regional connection strings in + // PDB connect info, applicable to cross-region Data Guard only. + IsRegional bool `json:"isRegional,omitempty"` + // Password: Required. The password used to encrypt the keys inside the wallet. + // The password must be a minimum of 8 characters. + Password string `json:"password,omitempty"` + // Type: Optional. The type of wallet generation for the Autonomous Database. + // The default value is SINGLE. + // + // Possible values: + // "GENERATE_TYPE_UNSPECIFIED" - Default unspecified value. + // "ALL" - Used to generate wallet for all databases in the region. + // "SINGLE" - Used to generate wallet for a single database. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsRegional") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsRegional") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GenerateAutonomousDatabaseWalletRequest) MarshalJSON() ([]byte, error) { + type NoMethod GenerateAutonomousDatabaseWalletRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GenerateAutonomousDatabaseWalletResponse: The response for +// `AutonomousDatabase.GenerateWallet`. +type GenerateAutonomousDatabaseWalletResponse struct { + // ArchiveContent: Output only. The base64 encoded wallet files. + ArchiveContent string `json:"archiveContent,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ArchiveContent") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ArchiveContent") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GenerateAutonomousDatabaseWalletResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateAutonomousDatabaseWalletResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GiVersion: Details of the Oracle Grid Infrastructure (GI) version resource. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/GiVersionSummary/ +type GiVersion struct { + // Name: Identifier. The name of the Oracle Grid Infrastructure (GI) version + // resource with the format: + // projects/{project}/locations/{region}/giVersions/{gi_versions} + Name string `json:"name,omitempty"` + // Version: Optional. version + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GiVersion) MarshalJSON() ([]byte, error) { + type NoMethod GiVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAutonomousDatabaseBackupsResponse: The response for +// `AutonomousDatabaseBackup.List`. +type ListAutonomousDatabaseBackupsResponse struct { + // AutonomousDatabaseBackups: The list of Autonomous Database Backups. + AutonomousDatabaseBackups []*AutonomousDatabaseBackup `json:"autonomousDatabaseBackups,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "AutonomousDatabaseBackups") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutonomousDatabaseBackups") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAutonomousDatabaseBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAutonomousDatabaseBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAutonomousDatabaseCharacterSetsResponse: The response for +// `AutonomousDatabaseCharacterSet.List`. +type ListAutonomousDatabaseCharacterSetsResponse struct { + // AutonomousDatabaseCharacterSets: The list of Autonomous Database Character + // Sets. + AutonomousDatabaseCharacterSets []*AutonomousDatabaseCharacterSet `json:"autonomousDatabaseCharacterSets,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. + // "AutonomousDatabaseCharacterSets") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutonomousDatabaseCharacterSets") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAutonomousDatabaseCharacterSetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAutonomousDatabaseCharacterSetsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAutonomousDatabasesResponse: The response for `AutonomousDatabase.List`. +type ListAutonomousDatabasesResponse struct { + // AutonomousDatabases: The list of Autonomous Databases. + AutonomousDatabases []*AutonomousDatabase `json:"autonomousDatabases,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "AutonomousDatabases") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutonomousDatabases") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAutonomousDatabasesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAutonomousDatabasesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAutonomousDbVersionsResponse: The response for +// `AutonomousDbVersion.List`. +type ListAutonomousDbVersionsResponse struct { + // AutonomousDbVersions: The list of Autonomous Database versions. + AutonomousDbVersions []*AutonomousDbVersion `json:"autonomousDbVersions,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "AutonomousDbVersions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutonomousDbVersions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAutonomousDbVersionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAutonomousDbVersionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListCloudExadataInfrastructuresResponse: The response for +// `CloudExadataInfrastructures.list`. +type ListCloudExadataInfrastructuresResponse struct { + // CloudExadataInfrastructures: The list of Exadata Infrastructures. + CloudExadataInfrastructures []*CloudExadataInfrastructure `json:"cloudExadataInfrastructures,omitempty"` + // NextPageToken: A token for fetching next page of response. + 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. + // "CloudExadataInfrastructures") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CloudExadataInfrastructures") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListCloudExadataInfrastructuresResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListCloudExadataInfrastructuresResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListCloudVmClustersResponse: The response for `CloudVmCluster.List`. +type ListCloudVmClustersResponse struct { + // CloudVmClusters: The list of VM Clusters. + CloudVmClusters []*CloudVmCluster `json:"cloudVmClusters,omitempty"` + // NextPageToken: A token to fetch the next page of results. + 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. "CloudVmClusters") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CloudVmClusters") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListCloudVmClustersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListCloudVmClustersResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListDbNodesResponse: The response for `DbNode.List`. +type ListDbNodesResponse struct { + // DbNodes: The list of DB Nodes + DbNodes []*DbNode `json:"dbNodes,omitempty"` + // NextPageToken: A token identifying a page of results the node should return. + 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. "DbNodes") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbNodes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListDbNodesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDbNodesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListDbServersResponse: The response for `DbServer.List`. +type ListDbServersResponse struct { + // DbServers: The list of database servers. + DbServers []*DbServer `json:"dbServers,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "DbServers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbServers") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListDbServersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDbServersResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListDbSystemShapesResponse: The response for `DbSystemShape.List`. +type ListDbSystemShapesResponse struct { + // DbSystemShapes: The list of Database System shapes. + DbSystemShapes []*DbSystemShape `json:"dbSystemShapes,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "DbSystemShapes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbSystemShapes") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListDbSystemShapesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDbSystemShapesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListEntitlementsResponse: The response for `Entitlement.List`. +type ListEntitlementsResponse struct { + // Entitlements: The list of Entitlements + Entitlements []*Entitlement `json:"entitlements,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "Entitlements") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Entitlements") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListEntitlementsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListEntitlementsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListGiVersionsResponse: The response for `GiVersion.List`. +type ListGiVersionsResponse struct { + // GiVersions: The list of Oracle Grid Infrastructure (GI) versions. + GiVersions []*GiVersion `json:"giVersions,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "GiVersions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GiVersions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListGiVersionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListGiVersionsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// LocationMetadata: Metadata for a given Location. +type LocationMetadata struct { + // GcpOracleZones: Output only. GCP Oracle zones in a location. + GcpOracleZones []string `json:"gcpOracleZones,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcpOracleZones") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcpOracleZones") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod LocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MaintenanceWindow: Maintenance window as defined by Oracle. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/MaintenanceWindow +type MaintenanceWindow struct { + // CustomActionTimeoutMins: Optional. Determines the amount of time the system + // will wait before the start of each database server patching operation. + // Custom action timeout is in minutes and valid value is between 15 to 120 + // (inclusive). + CustomActionTimeoutMins int64 `json:"customActionTimeoutMins,omitempty"` + // DaysOfWeek: Optional. Days during the week when maintenance should be + // performed. + // + // 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 + DaysOfWeek []string `json:"daysOfWeek,omitempty"` + // HoursOfDay: Optional. The window of hours during the day when maintenance + // should be performed. The window is a 4 hour slot. Valid values are: 0 - + // represents time slot 0:00 - 3:59 UTC 4 - represents time slot 4:00 - 7:59 + // UTC 8 - represents time slot 8:00 - 11:59 UTC 12 - represents time slot + // 12:00 - 15:59 UTC 16 - represents time slot 16:00 - 19:59 UTC 20 - + // represents time slot 20:00 - 23:59 UTC + HoursOfDay []int64 `json:"hoursOfDay,omitempty"` + // IsCustomActionTimeoutEnabled: Optional. If true, enables the configuration + // of a custom action timeout (waiting period) between database server patching + // operations. + IsCustomActionTimeoutEnabled bool `json:"isCustomActionTimeoutEnabled,omitempty"` + // LeadTimeWeek: Optional. Lead time window allows user to set a lead time to + // prepare for a down time. The lead time is in weeks and valid value is + // between 1 to 4. + LeadTimeWeek int64 `json:"leadTimeWeek,omitempty"` + // Months: Optional. Months during the year when maintenance should be + // performed. + // + // Possible values: + // "MONTH_UNSPECIFIED" - The unspecified month. + // "JANUARY" - The month of January. + // "FEBRUARY" - The month of February. + // "MARCH" - The month of March. + // "APRIL" - The month of April. + // "MAY" - The month of May. + // "JUNE" - The month of June. + // "JULY" - The month of July. + // "AUGUST" - The month of August. + // "SEPTEMBER" - The month of September. + // "OCTOBER" - The month of October. + // "NOVEMBER" - The month of November. + // "DECEMBER" - The month of December. + Months []string `json:"months,omitempty"` + // PatchingMode: Optional. Cloud CloudExadataInfrastructure node patching + // method, either "ROLLING" or "NONROLLING". Default value is ROLLING. + // + // Possible values: + // "PATCHING_MODE_UNSPECIFIED" - Default unspecified value. + // "ROLLING" - Updates the Cloud Exadata database server hosts in a rolling + // fashion. + // "NON_ROLLING" - The non-rolling maintenance method first updates your + // storage servers at the same time, then your database servers at the same + // time. + PatchingMode string `json:"patchingMode,omitempty"` + // Preference: Optional. The maintenance window scheduling preference. + // + // Possible values: + // "MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED" - Default unspecified value. + // "CUSTOM_PREFERENCE" - Custom preference. + // "NO_PREFERENCE" - No preference. + Preference string `json:"preference,omitempty"` + // WeeksOfMonth: Optional. Weeks during the month when maintenance should be + // performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + // and have a duration of 7 days. Weeks start and end based on calendar dates, + // not days of the week. + WeeksOfMonth []int64 `json:"weeksOfMonth,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomActionTimeoutMins") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomActionTimeoutMins") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MaintenanceWindow) MarshalJSON() ([]byte, error) { + type NoMethod MaintenanceWindow + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is the +// result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *Status `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the `name` + // should be a resource name ending with `operations/{unique_id}`. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is the + // original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // PercentComplete: Output only. An estimated percentage of the operation that + // has been completed at a given moment of time, between 0 and 100. + PercentComplete float64 `json:"percentComplete,omitempty"` + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been cancelled + // successfully have Operation.error value with a google.rpc.Status.code of 1, + // corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. The status of the operation. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *OperationMetadata) UnmarshalJSON(data []byte) error { + type NoMethod OperationMetadata + var s1 struct { + PercentComplete gensupport.JSONFloat64 `json:"percentComplete"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.PercentComplete = float64(s1.PercentComplete) + return nil +} + +// RestoreAutonomousDatabaseRequest: The request for +// `AutonomousDatabase.Restore`. +type RestoreAutonomousDatabaseRequest struct { + // RestoreTime: Required. The time and date to restore the database to. + RestoreTime string `json:"restoreTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestoreTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RestoreTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RestoreAutonomousDatabaseRequest) MarshalJSON() ([]byte, error) { + type NoMethod RestoreAutonomousDatabaseRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ScheduledOperationDetails: Details of scheduled operation. +// https://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/ScheduledOperationDetails +type ScheduledOperationDetails struct { + // DayOfWeek: Output only. Day of week. + // + // 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"` + // StartTime: Output only. Auto start time. + StartTime *TimeOfDay `json:"startTime,omitempty"` + // StopTime: Output only. Auto stop time. + StopTime *TimeOfDay `json:"stopTime,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ScheduledOperationDetails) MarshalJSON() ([]byte, error) { + type NoMethod ScheduledOperationDetails + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TimeOfDay: Represents a time of day. The date and time zone are either not +// significant or are specified elsewhere. An API may choose to allow leap +// seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. +type TimeOfDay struct { + // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may + // choose to allow the value "24:00:00" for scenarios like business closing + // time. + Hours int64 `json:"hours,omitempty"` + // Minutes: Minutes of hour of day. Must be from 0 to 59. + Minutes int64 `json:"minutes,omitempty"` + // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + // Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An + // API may allow the value 60 if it allows leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Hours") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TimeOfDay) MarshalJSON() ([]byte, error) { + type NoMethod TimeOfDay + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TimeZone: Represents a time zone from the IANA Time Zone Database +// (https://www.iana.org/time-zones). +type TimeZone struct { + // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + Id string `json:"id,omitempty"` + // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TimeZone) MarshalJSON() ([]byte, error) { + type NoMethod TimeZone + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsGetCall 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 *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 +// details. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.get" call. +// 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 +} + +type ProjectsLocationsListCall 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 *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 +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.list" call. +// 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 +} + +// 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")) + 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 ProjectsLocationsAutonomousDatabaseBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the long term and automatic backups of an Autonomous Database. +// +// - parent: The parent value for ListAutonomousDatabaseBackups in the +// following format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsAutonomousDatabaseBackupsService) List(parent string) *ProjectsLocationsAutonomousDatabaseBackupsListCall { + c := &ProjectsLocationsAutonomousDatabaseBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. Only the **autonomous_database_id** field is +// supported in the following format: +// `autonomous_database_id="{autonomous_database_id}". The accepted values +// must be a valid Autonomous Database ID, limited to the naming restrictions +// of the ID: ^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). The ID must start with a +// letter, end with a letter or a number, and be a maximum of 63 characters. +func (c *ProjectsLocationsAutonomousDatabaseBackupsListCall) Filter(filter string) *ProjectsLocationsAutonomousDatabaseBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, at most 50 Autonomous DB Backups will be +// returned. The maximum value is 1000; values above 1000 will be coerced to +// 1000. +func (c *ProjectsLocationsAutonomousDatabaseBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsAutonomousDatabaseBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsAutonomousDatabaseBackupsListCall) PageToken(pageToken string) *ProjectsLocationsAutonomousDatabaseBackupsListCall { + 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 +// details. +func (c *ProjectsLocationsAutonomousDatabaseBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutonomousDatabaseBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsAutonomousDatabaseBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutonomousDatabaseBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAutonomousDatabaseBackupsListCall) Context(ctx context.Context) *ProjectsLocationsAutonomousDatabaseBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAutonomousDatabaseBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAutonomousDatabaseBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/autonomousDatabaseBackups") + 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 "oracledatabase.projects.locations.autonomousDatabaseBackups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAutonomousDatabaseBackupsResponse.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 *ProjectsLocationsAutonomousDatabaseBackupsListCall) Do(opts ...googleapi.CallOption) (*ListAutonomousDatabaseBackupsResponse, 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 := &ListAutonomousDatabaseBackupsResponse{ + 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 +} + +// 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 *ProjectsLocationsAutonomousDatabaseBackupsListCall) Pages(ctx context.Context, f func(*ListAutonomousDatabaseBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsAutonomousDatabaseCharacterSetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Autonomous Database Character Sets in a given project and +// location. +// +// - parent: The parent value for the Autonomous Database in the following +// format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsAutonomousDatabaseCharacterSetsService) List(parent string) *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall { + c := &ProjectsLocationsAutonomousDatabaseCharacterSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. Only the **character_set_type** field is supported +// in the following format: `character_set_type="{characterSetType}". Accepted +// values include `DATABASE` and `NATIONAL`. +func (c *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) Filter(filter string) *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, at most 50 Autonomous DB Character Sets will be +// returned. The maximum value is 1000; values above 1000 will be coerced to +// 1000. +func (c *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) PageSize(pageSize int64) *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) PageToken(pageToken string) *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall { + 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 +// details. +func (c *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) Context(ctx context.Context) *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/autonomousDatabaseCharacterSets") + 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 "oracledatabase.projects.locations.autonomousDatabaseCharacterSets.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAutonomousDatabaseCharacterSetsResponse.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 *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) Do(opts ...googleapi.CallOption) (*ListAutonomousDatabaseCharacterSetsResponse, 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 := &ListAutonomousDatabaseCharacterSetsResponse{ + 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 +} + +// 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 *ProjectsLocationsAutonomousDatabaseCharacterSetsListCall) Pages(ctx context.Context, f func(*ListAutonomousDatabaseCharacterSetsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsAutonomousDatabasesCreateCall struct { + s *Service + parent string + autonomousdatabase *AutonomousDatabase + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Autonomous Database in a given project and location. +// +// - parent: The name of the parent in the following format: +// projects/{project}/locations/{location}. +func (r *ProjectsLocationsAutonomousDatabasesService) Create(parent string, autonomousdatabase *AutonomousDatabase) *ProjectsLocationsAutonomousDatabasesCreateCall { + c := &ProjectsLocationsAutonomousDatabasesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.autonomousdatabase = autonomousdatabase + return c +} + +// AutonomousDatabaseId sets the optional parameter "autonomousDatabaseId": +// Required. The ID of the Autonomous Database to create. This value is +// restricted to (^a-z ([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 +// characters in length. The value must start with a letter and end with a +// letter or a number. +func (c *ProjectsLocationsAutonomousDatabasesCreateCall) AutonomousDatabaseId(autonomousDatabaseId string) *ProjectsLocationsAutonomousDatabasesCreateCall { + c.urlParams_.Set("autonomousDatabaseId", autonomousDatabaseId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional ID to +// identify the request. This value is used to identify duplicate requests. If +// you make a request with the same request ID and the original request is +// still in progress or completed, the server ignores the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsAutonomousDatabasesCreateCall) RequestId(requestId string) *ProjectsLocationsAutonomousDatabasesCreateCall { + 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 +// details. +func (c *ProjectsLocationsAutonomousDatabasesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutonomousDatabasesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAutonomousDatabasesCreateCall) Context(ctx context.Context) *ProjectsLocationsAutonomousDatabasesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAutonomousDatabasesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAutonomousDatabasesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autonomousdatabase) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/autonomousDatabases") + 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 "oracledatabase.projects.locations.autonomousDatabases.create" call. +// 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 *ProjectsLocationsAutonomousDatabasesCreateCall) 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 +} + +type ProjectsLocationsAutonomousDatabasesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Autonomous Database. +// +// - name: The name of the resource in the following format: +// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_dat +// abase}. +func (r *ProjectsLocationsAutonomousDatabasesService) Delete(name string) *ProjectsLocationsAutonomousDatabasesDeleteCall { + c := &ProjectsLocationsAutonomousDatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional ID to +// identify the request. This value is used to identify duplicate requests. If +// you make a request with the same request ID and the original request is +// still in progress or completed, the server ignores the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsAutonomousDatabasesDeleteCall) RequestId(requestId string) *ProjectsLocationsAutonomousDatabasesDeleteCall { + 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 +// details. +func (c *ProjectsLocationsAutonomousDatabasesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutonomousDatabasesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAutonomousDatabasesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAutonomousDatabasesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAutonomousDatabasesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAutonomousDatabasesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.autonomousDatabases.delete" call. +// 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 *ProjectsLocationsAutonomousDatabasesDeleteCall) 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 +} + +type ProjectsLocationsAutonomousDatabasesGenerateWalletCall struct { + s *Service + name string + generateautonomousdatabasewalletrequest *GenerateAutonomousDatabaseWalletRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateWallet: Generates a wallet for a single Autonomous Database. +// +// - name: The name of the Autonomous Database in the following format: +// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_dat +// abase}. +func (r *ProjectsLocationsAutonomousDatabasesService) GenerateWallet(name string, generateautonomousdatabasewalletrequest *GenerateAutonomousDatabaseWalletRequest) *ProjectsLocationsAutonomousDatabasesGenerateWalletCall { + c := &ProjectsLocationsAutonomousDatabasesGenerateWalletCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.generateautonomousdatabasewalletrequest = generateautonomousdatabasewalletrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAutonomousDatabasesGenerateWalletCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutonomousDatabasesGenerateWalletCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAutonomousDatabasesGenerateWalletCall) Context(ctx context.Context) *ProjectsLocationsAutonomousDatabasesGenerateWalletCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAutonomousDatabasesGenerateWalletCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAutonomousDatabasesGenerateWalletCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateautonomousdatabasewalletrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:generateWallet") + 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 "oracledatabase.projects.locations.autonomousDatabases.generateWallet" call. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateAutonomousDatabaseWalletResponse.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 *ProjectsLocationsAutonomousDatabasesGenerateWalletCall) Do(opts ...googleapi.CallOption) (*GenerateAutonomousDatabaseWalletResponse, 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 := &GenerateAutonomousDatabaseWalletResponse{ + 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 +} + +type ProjectsLocationsAutonomousDatabasesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a single Autonomous Database. +// +// - name: The name of the Autonomous Database in the following format: +// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_dat +// abase}. +func (r *ProjectsLocationsAutonomousDatabasesService) Get(name string) *ProjectsLocationsAutonomousDatabasesGetCall { + c := &ProjectsLocationsAutonomousDatabasesGetCall{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 +// details. +func (c *ProjectsLocationsAutonomousDatabasesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutonomousDatabasesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsAutonomousDatabasesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutonomousDatabasesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAutonomousDatabasesGetCall) Context(ctx context.Context) *ProjectsLocationsAutonomousDatabasesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAutonomousDatabasesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAutonomousDatabasesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.autonomousDatabases.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *AutonomousDatabase.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 *ProjectsLocationsAutonomousDatabasesGetCall) Do(opts ...googleapi.CallOption) (*AutonomousDatabase, 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 := &AutonomousDatabase{ + 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 +} + +type ProjectsLocationsAutonomousDatabasesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the Autonomous Databases in a given project and location. +// +// - parent: The parent value for the Autonomous Database in the following +// format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsAutonomousDatabasesService) List(parent string) *ProjectsLocationsAutonomousDatabasesListCall { + c := &ProjectsLocationsAutonomousDatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. +func (c *ProjectsLocationsAutonomousDatabasesListCall) Filter(filter string) *ProjectsLocationsAutonomousDatabasesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": An expression for ordering +// the results of the request. +func (c *ProjectsLocationsAutonomousDatabasesListCall) OrderBy(orderBy string) *ProjectsLocationsAutonomousDatabasesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, at most 50 Autonomous Database will be returned. +// The maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsAutonomousDatabasesListCall) PageSize(pageSize int64) *ProjectsLocationsAutonomousDatabasesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsAutonomousDatabasesListCall) PageToken(pageToken string) *ProjectsLocationsAutonomousDatabasesListCall { + 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 +// details. +func (c *ProjectsLocationsAutonomousDatabasesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutonomousDatabasesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsAutonomousDatabasesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutonomousDatabasesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAutonomousDatabasesListCall) Context(ctx context.Context) *ProjectsLocationsAutonomousDatabasesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAutonomousDatabasesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAutonomousDatabasesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/autonomousDatabases") + 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 "oracledatabase.projects.locations.autonomousDatabases.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAutonomousDatabasesResponse.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 *ProjectsLocationsAutonomousDatabasesListCall) Do(opts ...googleapi.CallOption) (*ListAutonomousDatabasesResponse, 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 := &ListAutonomousDatabasesResponse{ + 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 +} + +// 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 *ProjectsLocationsAutonomousDatabasesListCall) Pages(ctx context.Context, f func(*ListAutonomousDatabasesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsAutonomousDatabasesRestoreCall struct { + s *Service + name string + restoreautonomousdatabaserequest *RestoreAutonomousDatabaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a single Autonomous Database. +// +// - name: The name of the Autonomous Database in the following format: +// projects/{project}/locations/{location}/autonomousDatabases/{autonomous_dat +// abase}. +func (r *ProjectsLocationsAutonomousDatabasesService) Restore(name string, restoreautonomousdatabaserequest *RestoreAutonomousDatabaseRequest) *ProjectsLocationsAutonomousDatabasesRestoreCall { + c := &ProjectsLocationsAutonomousDatabasesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.restoreautonomousdatabaserequest = restoreautonomousdatabaserequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAutonomousDatabasesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutonomousDatabasesRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAutonomousDatabasesRestoreCall) Context(ctx context.Context) *ProjectsLocationsAutonomousDatabasesRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAutonomousDatabasesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAutonomousDatabasesRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoreautonomousdatabaserequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}: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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "oracledatabase.projects.locations.autonomousDatabases.restore" call. +// 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 *ProjectsLocationsAutonomousDatabasesRestoreCall) 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 +} + +type ProjectsLocationsAutonomousDbVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the available Autonomous Database versions for a project and +// location. +// +// - parent: The parent value for the Autonomous Database in the following +// format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsAutonomousDbVersionsService) List(parent string) *ProjectsLocationsAutonomousDbVersionsListCall { + c := &ProjectsLocationsAutonomousDbVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, at most 50 Autonomous DB Versions will be +// returned. The maximum value is 1000; values above 1000 will be coerced to +// 1000. +func (c *ProjectsLocationsAutonomousDbVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsAutonomousDbVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsAutonomousDbVersionsListCall) PageToken(pageToken string) *ProjectsLocationsAutonomousDbVersionsListCall { + 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 +// details. +func (c *ProjectsLocationsAutonomousDbVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutonomousDbVersionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsAutonomousDbVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutonomousDbVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAutonomousDbVersionsListCall) Context(ctx context.Context) *ProjectsLocationsAutonomousDbVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAutonomousDbVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAutonomousDbVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/autonomousDbVersions") + 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 "oracledatabase.projects.locations.autonomousDbVersions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAutonomousDbVersionsResponse.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 *ProjectsLocationsAutonomousDbVersionsListCall) Do(opts ...googleapi.CallOption) (*ListAutonomousDbVersionsResponse, 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 := &ListAutonomousDbVersionsResponse{ + 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 +} + +// 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 *ProjectsLocationsAutonomousDbVersionsListCall) Pages(ctx context.Context, f func(*ListAutonomousDbVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsCloudExadataInfrastructuresCreateCall struct { + s *Service + parent string + cloudexadatainfrastructure *CloudExadataInfrastructure + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Exadata Infrastructure in a given project and +// location. +// +// - parent: The parent value for CloudExadataInfrastructure in the following +// format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsCloudExadataInfrastructuresService) Create(parent string, cloudexadatainfrastructure *CloudExadataInfrastructure) *ProjectsLocationsCloudExadataInfrastructuresCreateCall { + c := &ProjectsLocationsCloudExadataInfrastructuresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cloudexadatainfrastructure = cloudexadatainfrastructure + return c +} + +// CloudExadataInfrastructureId sets the optional parameter +// "cloudExadataInfrastructureId": Required. The ID of the Exadata +// Infrastructure to create. This value is restricted to (^a-z +// ([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 characters in +// length. The value must start with a letter and end with a letter or a +// number. +func (c *ProjectsLocationsCloudExadataInfrastructuresCreateCall) CloudExadataInfrastructureId(cloudExadataInfrastructureId string) *ProjectsLocationsCloudExadataInfrastructuresCreateCall { + c.urlParams_.Set("cloudExadataInfrastructureId", cloudExadataInfrastructureId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional ID to +// identify the request. This value is used to identify duplicate requests. If +// you make a request with the same request ID and the original request is +// still in progress or completed, the server ignores the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsCloudExadataInfrastructuresCreateCall) RequestId(requestId string) *ProjectsLocationsCloudExadataInfrastructuresCreateCall { + 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 +// details. +func (c *ProjectsLocationsCloudExadataInfrastructuresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudExadataInfrastructuresCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudExadataInfrastructuresCreateCall) Context(ctx context.Context) *ProjectsLocationsCloudExadataInfrastructuresCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudExadataInfrastructuresCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudExadataInfrastructuresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudexadatainfrastructure) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cloudExadataInfrastructures") + 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 "oracledatabase.projects.locations.cloudExadataInfrastructures.create" call. +// 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 *ProjectsLocationsCloudExadataInfrastructuresCreateCall) 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 +} + +type ProjectsLocationsCloudExadataInfrastructuresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single Exadata Infrastructure. +// +// - name: The name of the Cloud Exadata Infrastructure in the following +// format: +// projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_ +// exadata_infrastructure}. +func (r *ProjectsLocationsCloudExadataInfrastructuresService) Delete(name string) *ProjectsLocationsCloudExadataInfrastructuresDeleteCall { + c := &ProjectsLocationsCloudExadataInfrastructuresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to true, all VM clusters +// for this Exadata Infrastructure will be deleted. An Exadata Infrastructure +// can only be deleted once all its VM clusters have been deleted. +func (c *ProjectsLocationsCloudExadataInfrastructuresDeleteCall) Force(force bool) *ProjectsLocationsCloudExadataInfrastructuresDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional ID to +// identify the request. This value is used to identify duplicate requests. If +// you make a request with the same request ID and the original request is +// still in progress or completed, the server ignores the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsCloudExadataInfrastructuresDeleteCall) RequestId(requestId string) *ProjectsLocationsCloudExadataInfrastructuresDeleteCall { + 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 +// details. +func (c *ProjectsLocationsCloudExadataInfrastructuresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudExadataInfrastructuresDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudExadataInfrastructuresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCloudExadataInfrastructuresDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudExadataInfrastructuresDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudExadataInfrastructuresDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.cloudExadataInfrastructures.delete" call. +// 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 *ProjectsLocationsCloudExadataInfrastructuresDeleteCall) 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 +} + +type ProjectsLocationsCloudExadataInfrastructuresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single Exadata Infrastructure. +// +// - name: The name of the Cloud Exadata Infrastructure in the following +// format: +// projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_ +// exadata_infrastructure}. +func (r *ProjectsLocationsCloudExadataInfrastructuresService) Get(name string) *ProjectsLocationsCloudExadataInfrastructuresGetCall { + c := &ProjectsLocationsCloudExadataInfrastructuresGetCall{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 +// details. +func (c *ProjectsLocationsCloudExadataInfrastructuresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudExadataInfrastructuresGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCloudExadataInfrastructuresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudExadataInfrastructuresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudExadataInfrastructuresGetCall) Context(ctx context.Context) *ProjectsLocationsCloudExadataInfrastructuresGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudExadataInfrastructuresGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudExadataInfrastructuresGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.cloudExadataInfrastructures.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *CloudExadataInfrastructure.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 *ProjectsLocationsCloudExadataInfrastructuresGetCall) Do(opts ...googleapi.CallOption) (*CloudExadataInfrastructure, 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 := &CloudExadataInfrastructure{ + 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 +} + +type ProjectsLocationsCloudExadataInfrastructuresListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Exadata Infrastructures in a given project and location. +// +// - parent: The parent value for CloudExadataInfrastructure in the following +// format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsCloudExadataInfrastructuresService) List(parent string) *ProjectsLocationsCloudExadataInfrastructuresListCall { + c := &ProjectsLocationsCloudExadataInfrastructuresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, at most 50 Exadata infrastructures will be +// returned. The maximum value is 1000; values above 1000 will be coerced to +// 1000. +func (c *ProjectsLocationsCloudExadataInfrastructuresListCall) PageSize(pageSize int64) *ProjectsLocationsCloudExadataInfrastructuresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsCloudExadataInfrastructuresListCall) PageToken(pageToken string) *ProjectsLocationsCloudExadataInfrastructuresListCall { + 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 +// details. +func (c *ProjectsLocationsCloudExadataInfrastructuresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudExadataInfrastructuresListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCloudExadataInfrastructuresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudExadataInfrastructuresListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudExadataInfrastructuresListCall) Context(ctx context.Context) *ProjectsLocationsCloudExadataInfrastructuresListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudExadataInfrastructuresListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudExadataInfrastructuresListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/cloudExadataInfrastructures") + 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 "oracledatabase.projects.locations.cloudExadataInfrastructures.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListCloudExadataInfrastructuresResponse.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 *ProjectsLocationsCloudExadataInfrastructuresListCall) Do(opts ...googleapi.CallOption) (*ListCloudExadataInfrastructuresResponse, 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 := &ListCloudExadataInfrastructuresResponse{ + 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 +} + +// 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 *ProjectsLocationsCloudExadataInfrastructuresListCall) Pages(ctx context.Context, f func(*ListCloudExadataInfrastructuresResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsCloudExadataInfrastructuresDbServersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the database servers of an Exadata Infrastructure instance. +// +// - parent: The parent value for database server in the following format: +// projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudE +// xadataInfrastructure}. +func (r *ProjectsLocationsCloudExadataInfrastructuresDbServersService) List(parent string) *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall { + c := &ProjectsLocationsCloudExadataInfrastructuresDbServersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, a maximum of 50 db servers will be returned. The +// maximum value is 1000; values above 1000 will be reset to 1000. +func (c *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall) PageSize(pageSize int64) *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall) PageToken(pageToken string) *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall { + 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 +// details. +func (c *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall) Context(ctx context.Context) *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/dbServers") + 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 "oracledatabase.projects.locations.cloudExadataInfrastructures.dbServers.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListDbServersResponse.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 *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall) Do(opts ...googleapi.CallOption) (*ListDbServersResponse, 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 := &ListDbServersResponse{ + 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 +} + +// 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 *ProjectsLocationsCloudExadataInfrastructuresDbServersListCall) Pages(ctx context.Context, f func(*ListDbServersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsCloudVmClustersCreateCall struct { + s *Service + parent string + cloudvmcluster *CloudVmCluster + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new VM Cluster in a given project and location. +// +// - parent: The name of the parent in the following format: +// projects/{project}/locations/{location}. +func (r *ProjectsLocationsCloudVmClustersService) Create(parent string, cloudvmcluster *CloudVmCluster) *ProjectsLocationsCloudVmClustersCreateCall { + c := &ProjectsLocationsCloudVmClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.cloudvmcluster = cloudvmcluster + return c +} + +// CloudVmClusterId sets the optional parameter "cloudVmClusterId": Required. +// The ID of the VM Cluster to create. This value is restricted to (^a-z +// ([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 characters in +// length. The value must start with a letter and end with a letter or a +// number. +func (c *ProjectsLocationsCloudVmClustersCreateCall) CloudVmClusterId(cloudVmClusterId string) *ProjectsLocationsCloudVmClustersCreateCall { + c.urlParams_.Set("cloudVmClusterId", cloudVmClusterId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional ID to +// identify the request. This value is used to identify duplicate requests. If +// you make a request with the same request ID and the original request is +// still in progress or completed, the server ignores the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsCloudVmClustersCreateCall) RequestId(requestId string) *ProjectsLocationsCloudVmClustersCreateCall { + 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 +// details. +func (c *ProjectsLocationsCloudVmClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudVmClustersCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudVmClustersCreateCall) Context(ctx context.Context) *ProjectsLocationsCloudVmClustersCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudVmClustersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudVmClustersCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cloudvmcluster) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cloudVmClusters") + 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 "oracledatabase.projects.locations.cloudVmClusters.create" call. +// 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 *ProjectsLocationsCloudVmClustersCreateCall) 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 +} + +type ProjectsLocationsCloudVmClustersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single VM Cluster. +// +// - name: The name of the Cloud VM Cluster in the following format: +// projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. +func (r *ProjectsLocationsCloudVmClustersService) Delete(name string) *ProjectsLocationsCloudVmClustersDeleteCall { + c := &ProjectsLocationsCloudVmClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to true, all child +// resources for the VM Cluster will be deleted. A VM Cluster can only be +// deleted once all its child resources have been deleted. +func (c *ProjectsLocationsCloudVmClustersDeleteCall) Force(force bool) *ProjectsLocationsCloudVmClustersDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional ID to +// identify the request. This value is used to identify duplicate requests. If +// you make a request with the same request ID and the original request is +// still in progress or completed, the server ignores the second request. This +// prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsCloudVmClustersDeleteCall) RequestId(requestId string) *ProjectsLocationsCloudVmClustersDeleteCall { + 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 +// details. +func (c *ProjectsLocationsCloudVmClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudVmClustersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudVmClustersDeleteCall) Context(ctx context.Context) *ProjectsLocationsCloudVmClustersDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudVmClustersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudVmClustersDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.cloudVmClusters.delete" call. +// 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 *ProjectsLocationsCloudVmClustersDeleteCall) 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 +} + +type ProjectsLocationsCloudVmClustersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single VM Cluster. +// +// - name: The name of the Cloud VM Cluster in the following format: +// projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. +func (r *ProjectsLocationsCloudVmClustersService) Get(name string) *ProjectsLocationsCloudVmClustersGetCall { + c := &ProjectsLocationsCloudVmClustersGetCall{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 +// details. +func (c *ProjectsLocationsCloudVmClustersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudVmClustersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCloudVmClustersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudVmClustersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudVmClustersGetCall) Context(ctx context.Context) *ProjectsLocationsCloudVmClustersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudVmClustersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudVmClustersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.cloudVmClusters.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *CloudVmCluster.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 *ProjectsLocationsCloudVmClustersGetCall) Do(opts ...googleapi.CallOption) (*CloudVmCluster, 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 := &CloudVmCluster{ + 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 +} + +type ProjectsLocationsCloudVmClustersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the VM Clusters in a given project and location. +// +// - parent: The name of the parent in the following format: +// projects/{project}/locations/{location}. +func (r *ProjectsLocationsCloudVmClustersService) List(parent string) *ProjectsLocationsCloudVmClustersListCall { + c := &ProjectsLocationsCloudVmClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. +func (c *ProjectsLocationsCloudVmClustersListCall) Filter(filter string) *ProjectsLocationsCloudVmClustersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The number of VM clusters +// to return. If unspecified, at most 50 VM clusters will be returned. The +// maximum value is 1,000. +func (c *ProjectsLocationsCloudVmClustersListCall) PageSize(pageSize int64) *ProjectsLocationsCloudVmClustersListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying the +// page of results the server returns. +func (c *ProjectsLocationsCloudVmClustersListCall) PageToken(pageToken string) *ProjectsLocationsCloudVmClustersListCall { + 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 +// details. +func (c *ProjectsLocationsCloudVmClustersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudVmClustersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCloudVmClustersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudVmClustersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudVmClustersListCall) Context(ctx context.Context) *ProjectsLocationsCloudVmClustersListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudVmClustersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudVmClustersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/cloudVmClusters") + 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 "oracledatabase.projects.locations.cloudVmClusters.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListCloudVmClustersResponse.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 *ProjectsLocationsCloudVmClustersListCall) Do(opts ...googleapi.CallOption) (*ListCloudVmClustersResponse, 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 := &ListCloudVmClustersResponse{ + 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 +} + +// 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 *ProjectsLocationsCloudVmClustersListCall) Pages(ctx context.Context, f func(*ListCloudVmClustersResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsCloudVmClustersDbNodesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the database nodes of a VM Cluster. +// +// - parent: The parent value for database node in the following format: +// projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. +func (r *ProjectsLocationsCloudVmClustersDbNodesService) List(parent string) *ProjectsLocationsCloudVmClustersDbNodesListCall { + c := &ProjectsLocationsCloudVmClustersDbNodesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, at most 50 db nodes will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsCloudVmClustersDbNodesListCall) PageSize(pageSize int64) *ProjectsLocationsCloudVmClustersDbNodesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the node should return. +func (c *ProjectsLocationsCloudVmClustersDbNodesListCall) PageToken(pageToken string) *ProjectsLocationsCloudVmClustersDbNodesListCall { + 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 +// details. +func (c *ProjectsLocationsCloudVmClustersDbNodesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCloudVmClustersDbNodesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsCloudVmClustersDbNodesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCloudVmClustersDbNodesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCloudVmClustersDbNodesListCall) Context(ctx context.Context) *ProjectsLocationsCloudVmClustersDbNodesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCloudVmClustersDbNodesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCloudVmClustersDbNodesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/dbNodes") + 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 "oracledatabase.projects.locations.cloudVmClusters.dbNodes.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListDbNodesResponse.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 *ProjectsLocationsCloudVmClustersDbNodesListCall) Do(opts ...googleapi.CallOption) (*ListDbNodesResponse, 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 := &ListDbNodesResponse{ + 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 +} + +// 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 *ProjectsLocationsCloudVmClustersDbNodesListCall) Pages(ctx context.Context, f func(*ListDbNodesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsDbSystemShapesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the database system shapes available for the project and +// location. +// +// - parent: The parent value for Database System Shapes in the following +// format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsDbSystemShapesService) List(parent string) *ProjectsLocationsDbSystemShapesListCall { + c := &ProjectsLocationsDbSystemShapesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, at most 50 database system shapes will be +// returned. The maximum value is 1000; values above 1000 will be coerced to +// 1000. +func (c *ProjectsLocationsDbSystemShapesListCall) PageSize(pageSize int64) *ProjectsLocationsDbSystemShapesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsDbSystemShapesListCall) PageToken(pageToken string) *ProjectsLocationsDbSystemShapesListCall { + 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 +// details. +func (c *ProjectsLocationsDbSystemShapesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDbSystemShapesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsDbSystemShapesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDbSystemShapesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDbSystemShapesListCall) Context(ctx context.Context) *ProjectsLocationsDbSystemShapesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDbSystemShapesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDbSystemShapesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/dbSystemShapes") + 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 "oracledatabase.projects.locations.dbSystemShapes.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListDbSystemShapesResponse.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 *ProjectsLocationsDbSystemShapesListCall) Do(opts ...googleapi.CallOption) (*ListDbSystemShapesResponse, 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 := &ListDbSystemShapesResponse{ + 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 +} + +// 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 *ProjectsLocationsDbSystemShapesListCall) Pages(ctx context.Context, f func(*ListDbSystemShapesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsEntitlementsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the entitlements in a given project. +// +// - parent: The parent value for Entitlement in the following format: +// projects/{project}/locations/{location}. +func (r *ProjectsLocationsEntitlementsService) List(parent string) *ProjectsLocationsEntitlementsListCall { + c := &ProjectsLocationsEntitlementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, a maximum of 50 entitlements will be returned. +// The maximum value is 1000. +func (c *ProjectsLocationsEntitlementsListCall) PageSize(pageSize int64) *ProjectsLocationsEntitlementsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsEntitlementsListCall) PageToken(pageToken string) *ProjectsLocationsEntitlementsListCall { + 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 +// details. +func (c *ProjectsLocationsEntitlementsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEntitlementsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsEntitlementsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEntitlementsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEntitlementsListCall) Context(ctx context.Context) *ProjectsLocationsEntitlementsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEntitlementsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEntitlementsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/entitlements") + 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 "oracledatabase.projects.locations.entitlements.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListEntitlementsResponse.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 *ProjectsLocationsEntitlementsListCall) Do(opts ...googleapi.CallOption) (*ListEntitlementsResponse, 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 := &ListEntitlementsResponse{ + 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 +} + +// 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 *ProjectsLocationsEntitlementsListCall) Pages(ctx context.Context, f func(*ListEntitlementsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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 ProjectsLocationsGiVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the valid Oracle Grid Infrastructure (GI) versions for the +// given project and location. +// +// - parent: The parent value for Grid Infrastructure Version in the following +// format: Format: projects/{project}/locations/{location}. +func (r *ProjectsLocationsGiVersionsService) List(parent string) *ProjectsLocationsGiVersionsListCall { + c := &ProjectsLocationsGiVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) +// versions will be returned. The maximum value is 1000; values above 1000 will +// be reset to 1000. +func (c *ProjectsLocationsGiVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsGiVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsGiVersionsListCall) PageToken(pageToken string) *ProjectsLocationsGiVersionsListCall { + 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 +// details. +func (c *ProjectsLocationsGiVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGiVersionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGiVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGiVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGiVersionsListCall) Context(ctx context.Context) *ProjectsLocationsGiVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGiVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGiVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/giVersions") + 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 "oracledatabase.projects.locations.giVersions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListGiVersionsResponse.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 *ProjectsLocationsGiVersionsListCall) Do(opts ...googleapi.CallOption) (*ListGiVersionsResponse, 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 := &ListGiVersionsResponse{ + 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 +} + +// 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 *ProjectsLocationsGiVersionsListCall) Pages(ctx context.Context, f func(*ListGiVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// 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 *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + 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 "oracledatabase.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + 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 +// details. +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. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.operations.delete" call. +// 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 +} + +type ProjectsLocationsOperationsGetCall 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 *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 +// details. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.operations.get" call. +// 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 +} + +type ProjectsLocationsOperationsListCall 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`. +// +// - 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 +// details. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +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. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// 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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "oracledatabase.projects.locations.operations.list" call. +// 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 +} + +// 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")) + 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/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 63d2c8d0aad..653ca4d6207 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -147,7 +147,7 @@ ], "parameters": { "parent": { - "description": "Required. The name of the project in which the assessment will be created, in the format `projects/{project}`.", + "description": "Required. The name of the project in which the assessment is created, in the format `projects/{project}`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -179,7 +179,7 @@ ], "parameters": { "parent": { - "description": "Required. The name of the project this policy will apply to, in the format `projects/{project}`.", + "description": "Required. The name of the project this policy applies to, in the format `projects/{project}`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -300,7 +300,7 @@ "type": "string" }, "updateMask": { - "description": "Optional. The mask to control which fields of the policy get updated. If the mask is not present, all fields will be updated.", + "description": "Optional. The mask to control which fields of the policy get updated. If the mask is not present, all fields are updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -350,7 +350,7 @@ "keys": { "methods": { "addIpOverride": { - "description": "Adds an IP override to a key. The following restrictions hold: * The maximum number of IP overrides per key is 100. * For any conflict (such as IP already exists or IP part of an existing IP range), an error will be returned.", + "description": "Adds an IP override to a key. The following restrictions hold: * The maximum number of IP overrides per key is 100. * For any conflict (such as IP already exists or IP part of an existing IP range), an error is returned.", "flatPath": "v1/projects/{projectsId}/keys/{keysId}:addIpOverride", "httpMethod": "POST", "id": "recaptchaenterprise.projects.keys.addIpOverride", @@ -387,7 +387,7 @@ ], "parameters": { "parent": { - "description": "Required. The name of the project in which the key will be created, in the format `projects/{project}`.", + "description": "Required. The name of the project in which the key is created, in the format `projects/{project}`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -501,7 +501,7 @@ "type": "string" }, "parent": { - "description": "Required. The name of the project that contains the keys that will be listed, in the format `projects/{project}`.", + "description": "Required. The name of the project that contains the keys that is listed, in the format `projects/{project}`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -597,7 +597,7 @@ "type": "string" }, "updateMask": { - "description": "Optional. The mask to control which fields of the key get updated. If the mask is not present, all fields will be updated.", + "description": "Optional. The mask to control which fields of the key get updated. If the mask is not present, all fields are updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -615,7 +615,7 @@ ] }, "removeIpOverride": { - "description": "Removes an IP override from a key. The following restrictions hold: * If the IP isn't found in an existing IP override, a `NOT_FOUND` error will be returned. * If the IP is found in an existing IP override, but the override type does not match, a `NOT_FOUND` error will be returned.", + "description": "Removes an IP override from a key. The following restrictions hold: * If the IP isn't found in an existing IP override, a `NOT_FOUND` error is returned. * If the IP is found in an existing IP override, but the override type does not match, a `NOT_FOUND` error is returned.", "flatPath": "v1/projects/{projectsId}/keys/{keysId}:removeIpOverride", "httpMethod": "POST", "id": "recaptchaenterprise.projects.keys.removeIpOverride", @@ -786,7 +786,7 @@ } } }, - "revision": "20240825", + "revision": "20240906", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -918,7 +918,7 @@ "type": "string" }, "annotation": { - "description": "Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.", + "description": "Optional. The annotation that is assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.", "enum": [ "ANNOTATION_UNSPECIFIED", "LEGITIMATE", @@ -1164,7 +1164,7 @@ "type": "boolean" }, "firewallPolicyEvaluation": { - "description": "Optional. Flag for enabling firewall policy config assessment. If this flag is enabled, the firewall policy will be evaluated and a suggested firewall action will be returned in the response.", + "description": "Optional. Flag for enabling firewall policy config assessment. If this flag is enabled, the firewall policy is evaluated and a suggested firewall action is returned in the response.", "type": "boolean" }, "fraudPrevention": { @@ -1249,23 +1249,23 @@ }, "block": { "$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction", - "description": "This action will deny access to a given page. The user will get an HTTP error code." + "description": "This action denies access to a given page. The user gets an HTTP error code." }, "includeRecaptchaScript": { "$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction", - "description": "This action will inject reCAPTCHA JavaScript code into the HTML page returned by the site backend." + "description": "This action injects reCAPTCHA JavaScript code into the HTML page returned by the site backend." }, "redirect": { "$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction", - "description": "This action will redirect the request to a ReCaptcha interstitial to attach a token." + "description": "This action redirects the request to a reCAPTCHA interstitial to attach a token." }, "setHeader": { "$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction", - "description": "This action will set a custom header but allow the request to continue to the customer backend." + "description": "This action sets a custom header but allow the request to continue to the customer backend." }, "substitute": { "$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction", - "description": "This action will transparently serve a different page to an offending user." + "description": "This action transparently serves a different page to an offending user." } }, "type": "object" @@ -1289,7 +1289,7 @@ "type": "object" }, "GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction": { - "description": "A redirect action returns a 307 (temporary redirect) response, pointing the user to a ReCaptcha interstitial page to attach a token.", + "description": "A redirect action returns a 307 (temporary redirect) response, pointing the user to a reCAPTCHA interstitial page to attach a token.", "id": "GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction", "properties": {}, "type": "object" @@ -1356,12 +1356,12 @@ "properties": { "error": { "$ref": "GoogleRpcStatus", - "description": "Output only. If the processing of a policy config fails, an error will be populated and the firewall_policy will be left empty.", + "description": "Output only. If the processing of a policy config fails, an error is populated and the firewall_policy is left empty.", "readOnly": true }, "firewallPolicy": { "$ref": "GoogleCloudRecaptchaenterpriseV1FirewallPolicy", - "description": "Output only. The policy that matched the request. If more than one policy may match, this is the first match. If no policy matches the incoming request, the policy field will be left empty.", + "description": "Output only. The policy that matched the request. If more than one policy may match, this is the first match. If no policy matches the incoming request, the policy field is left empty.", "readOnly": true } }, @@ -1514,7 +1514,7 @@ }, "appleDeveloperId": { "$ref": "GoogleCloudRecaptchaenterpriseV1AppleDeveloperId", - "description": "Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA Enterprise to get a better assessment of the integrity of your app." + "description": "Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app." } }, "type": "object" @@ -1689,7 +1689,7 @@ "id": "GoogleCloudRecaptchaenterpriseV1Metrics", "properties": { "challengeMetrics": { - "description": "Metrics will be continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will have challenge-based data.", + "description": "Metrics are continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have challenge-based data.", "items": { "$ref": "GoogleCloudRecaptchaenterpriseV1ChallengeMetrics" }, @@ -1701,7 +1701,7 @@ "type": "string" }, "scoreMetrics": { - "description": "Metrics will be continuous and in order by dates, and in the granularity of day. All Key types should have score-based data.", + "description": "Metrics are continuous and in order by dates, and in the granularity of day. All Key types should have score-based data.", "items": { "$ref": "GoogleCloudRecaptchaenterpriseV1ScoreMetrics" }, @@ -2010,7 +2010,7 @@ "id": "GoogleCloudRecaptchaenterpriseV1TestingOptions", "properties": { "testingChallenge": { - "description": "Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.", + "description": "Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.", "enum": [ "TESTING_CHALLENGE_UNSPECIFIED", "NOCAPTCHA", @@ -2024,7 +2024,7 @@ "type": "string" }, "testingScore": { - "description": "Optional. All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.", + "description": "Optional. All assessments for this Key return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.", "format": "float", "type": "number" } @@ -2410,13 +2410,15 @@ "WAF_SERVICE_UNSPECIFIED", "CA", "FASTLY", - "CLOUDFLARE" + "CLOUDFLARE", + "AKAMAI" ], "enumDescriptions": [ "Undefined WAF", "Cloud Armor", "Fastly", - "Cloudflare" + "Cloudflare", + "Akamai" ], "type": "string" } @@ -2428,7 +2430,7 @@ "id": "GoogleCloudRecaptchaenterpriseV1WebKeySettings", "properties": { "allowAllDomains": { - "description": "Optional. If set to true, it means allowed_domains will not be enforced.", + "description": "Optional. If set to true, it means allowed_domains are not enforced.", "type": "boolean" }, "allowAmpTraffic": { @@ -2443,7 +2445,7 @@ "type": "array" }, "challengeSecurityPreference": { - "description": "Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.", + "description": "Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE.", "enum": [ "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED", "USABILITY", diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index 08752d9fd44..9a4564d0865 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -395,9 +395,9 @@ type GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest struct { // example when a stable account identifier is not yet known in the initial // request. AccountId string `json:"accountId,omitempty"` - // Annotation: Optional. The annotation that will be assigned to the Event. - // This field can be left empty to provide reasons that apply to an event - // without concluding whether the event is legitimate or fraudulent. + // Annotation: Optional. The annotation that is assigned to the Event. This + // field can be left empty to provide reasons that apply to an event without + // concluding whether the event is legitimate or fraudulent. // // Possible values: // "ANNOTATION_UNSPECIFIED" - Default unspecified type. @@ -686,8 +686,8 @@ type GoogleCloudRecaptchaenterpriseV1Event struct { // without a token. If enabled, `site_key` must reference an Express site key. Express bool `json:"express,omitempty"` // FirewallPolicyEvaluation: Optional. Flag for enabling firewall policy config - // assessment. If this flag is enabled, the firewall policy will be evaluated - // and a suggested firewall action will be returned in the response. + // assessment. If this flag is enabled, the firewall policy is evaluated and a + // suggested firewall action is returned in the response. FirewallPolicyEvaluation bool `json:"firewallPolicyEvaluation,omitempty"` // FraudPrevention: Optional. The Fraud Prevention setting for this assessment. // @@ -767,19 +767,19 @@ type GoogleCloudRecaptchaenterpriseV1FirewallAction struct { // Allow: The user request did not match any policy and should be allowed // access to the requested resource. Allow *GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction `json:"allow,omitempty"` - // Block: This action will deny access to a given page. The user will get an - // HTTP error code. + // Block: This action denies access to a given page. The user gets an HTTP + // error code. Block *GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction `json:"block,omitempty"` - // IncludeRecaptchaScript: This action will inject reCAPTCHA JavaScript code - // into the HTML page returned by the site backend. + // IncludeRecaptchaScript: This action injects reCAPTCHA JavaScript code into + // the HTML page returned by the site backend. IncludeRecaptchaScript *GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction `json:"includeRecaptchaScript,omitempty"` - // Redirect: This action will redirect the request to a ReCaptcha interstitial - // to attach a token. + // Redirect: This action redirects the request to a reCAPTCHA interstitial to + // attach a token. Redirect *GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction `json:"redirect,omitempty"` - // SetHeader: This action will set a custom header but allow the request to + // SetHeader: This action sets a custom header but allow the request to // continue to the customer backend. SetHeader *GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction `json:"setHeader,omitempty"` - // Substitute: This action will transparently serve a different page to an + // Substitute: This action transparently serves a different page to an // offending user. Substitute *GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction `json:"substitute,omitempty"` // ForceSendFields is a list of field names (e.g. "Allow") to unconditionally @@ -821,7 +821,7 @@ type GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction // GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction: A redirect // action returns a 307 (temporary redirect) response, pointing the user to a -// ReCaptcha interstitial page to attach a token. +// reCAPTCHA interstitial page to attach a token. type GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction struct { } @@ -931,12 +931,12 @@ func (s GoogleCloudRecaptchaenterpriseV1FirewallPolicy) MarshalJSON() ([]byte, e // GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment: Policy config // assessment. type GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment struct { - // Error: Output only. If the processing of a policy config fails, an error - // will be populated and the firewall_policy will be left empty. + // Error: Output only. If the processing of a policy config fails, an error is + // populated and the firewall_policy is left empty. Error *GoogleRpcStatus `json:"error,omitempty"` // FirewallPolicy: Output only. The policy that matched the request. If more // than one policy may match, this is the first match. If no policy matches the - // incoming request, the policy field will be left empty. + // incoming request, the policy field is left empty. FirewallPolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy `json:"firewallPolicy,omitempty"` // ForceSendFields is a list of field names (e.g. "Error") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -1233,10 +1233,10 @@ type GoogleCloudRecaptchaenterpriseV1IOSKeySettings struct { // Example: 'com.companyname.productname.appname' AllowedBundleIds []string `json:"allowedBundleIds,omitempty"` // AppleDeveloperId: Optional. Apple Developer account details for the app that - // is protected by the reCAPTCHA Key. reCAPTCHA Enterprise leverages - // platform-specific checks like Apple App Attest and Apple DeviceCheck to - // protect your app from abuse. Providing these fields allows reCAPTCHA - // Enterprise to get a better assessment of the integrity of your app. + // is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific + // checks like Apple App Attest and Apple DeviceCheck to protect your app from + // abuse. Providing these fields allows reCAPTCHA to get a better assessment of + // the integrity of your app. AppleDeveloperId *GoogleCloudRecaptchaenterpriseV1AppleDeveloperId `json:"appleDeveloperId,omitempty"` // ForceSendFields is a list of field names (e.g. "AllowAllBundleIds") to // unconditionally include in API requests. By default, fields with empty or @@ -1486,14 +1486,14 @@ func (s GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse) Marsha // GoogleCloudRecaptchaenterpriseV1Metrics: Metrics for a single Key. type GoogleCloudRecaptchaenterpriseV1Metrics struct { - // ChallengeMetrics: Metrics will be continuous and in order by dates, and in - // the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE), - // will have challenge-based data. + // ChallengeMetrics: Metrics are continuous and in order by dates, and in the + // granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have + // challenge-based data. ChallengeMetrics []*GoogleCloudRecaptchaenterpriseV1ChallengeMetrics `json:"challengeMetrics,omitempty"` // Name: Output only. Identifier. The name of the metrics, in the format // `projects/{project}/keys/{key}/metrics`. Name string `json:"name,omitempty"` - // ScoreMetrics: Metrics will be continuous and in order by dates, and in the + // ScoreMetrics: Metrics are continuous and in order by dates, and in the // granularity of day. All Key types should have score-based data. ScoreMetrics []*GoogleCloudRecaptchaenterpriseV1ScoreMetrics `json:"scoreMetrics,omitempty"` // StartTime: Inclusive start time aligned to a day (UTC). @@ -1992,7 +1992,7 @@ func (s *GoogleCloudRecaptchaenterpriseV1SmsTollFraudVerdict) UnmarshalJSON(data // testing. type GoogleCloudRecaptchaenterpriseV1TestingOptions struct { // TestingChallenge: Optional. For challenge-based keys only (CHECKBOX, - // INVISIBLE), all challenge requests for this site will return nocaptcha if + // INVISIBLE), all challenge requests for this site return nocaptcha if // NOCAPTCHA, or an unsolvable challenge if CHALLENGE. // // Possible values: @@ -2003,9 +2003,8 @@ type GoogleCloudRecaptchaenterpriseV1TestingOptions struct { // "UNSOLVABLE_CHALLENGE" - Challenge requests for this key always return an // unsolvable challenge. TestingChallenge string `json:"testingChallenge,omitempty"` - // TestingScore: Optional. All assessments for this Key will return this score. - // Must be between 0 (likely not legitimate) and 1 (likely legitimate) - // inclusive. + // TestingScore: Optional. All assessments for this Key return this score. Must + // be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive. TestingScore float64 `json:"testingScore,omitempty"` // ForceSendFields is a list of field names (e.g. "TestingChallenge") to // unconditionally include in API requests. By default, fields with empty or @@ -2516,6 +2515,7 @@ type GoogleCloudRecaptchaenterpriseV1WafSettings struct { // "CA" - Cloud Armor // "FASTLY" - Fastly // "CLOUDFLARE" - Cloudflare + // "AKAMAI" - Akamai WafService string `json:"wafService,omitempty"` // ForceSendFields is a list of field names (e.g. "WafFeature") to // unconditionally include in API requests. By default, fields with empty or @@ -2538,8 +2538,8 @@ func (s GoogleCloudRecaptchaenterpriseV1WafSettings) MarshalJSON() ([]byte, erro // GoogleCloudRecaptchaenterpriseV1WebKeySettings: Settings specific to keys // that can be used by websites. type GoogleCloudRecaptchaenterpriseV1WebKeySettings struct { - // AllowAllDomains: Optional. If set to true, it means allowed_domains will not - // be enforced. + // AllowAllDomains: Optional. If set to true, it means allowed_domains are not + // enforced. AllowAllDomains bool `json:"allowAllDomains,omitempty"` // AllowAmpTraffic: Optional. If set to true, the key can be used on AMP // (Accelerated Mobile Pages) websites. This is supported only for the SCORE @@ -2552,7 +2552,8 @@ type GoogleCloudRecaptchaenterpriseV1WebKeySettings struct { AllowedDomains []string `json:"allowedDomains,omitempty"` // ChallengeSecurityPreference: Optional. Settings for the frequency and // difficulty at which this key triggers captcha challenges. This should only - // be specified for IntegrationTypes CHECKBOX and INVISIBLE. + // be specified for IntegrationTypes CHECKBOX and INVISIBLE and + // SCORE_AND_CHALLENGE. // // Possible values: // "CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED" - Default type that indicates @@ -2753,8 +2754,8 @@ type ProjectsAssessmentsCreateCall struct { // Create: Creates an Assessment of the likelihood an event is legitimate. // -// - parent: The name of the project in which the assessment will be created, -// in the format `projects/{project}`. +// - parent: The name of the project in which the assessment is created, in the +// format `projects/{project}`. func (r *ProjectsAssessmentsService) Create(parent string, googlecloudrecaptchaenterprisev1assessment *GoogleCloudRecaptchaenterpriseV1Assessment) *ProjectsAssessmentsCreateCall { c := &ProjectsAssessmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -2858,7 +2859,7 @@ type ProjectsFirewallpoliciesCreateCall struct { // reCAPTCHA Enterprise actions can be executed. A project may have a maximum // of 1000 policies. // -// - parent: The name of the project this policy will apply to, in the format +// - parent: The name of the project this policy applies to, in the format // `projects/{project}`. func (r *ProjectsFirewallpoliciesService) Create(parent string, googlecloudrecaptchaenterprisev1firewallpolicy *GoogleCloudRecaptchaenterpriseV1FirewallPolicy) *ProjectsFirewallpoliciesCreateCall { c := &ProjectsFirewallpoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -3322,7 +3323,7 @@ func (r *ProjectsFirewallpoliciesService) Patch(name string, googlecloudrecaptch // UpdateMask sets the optional parameter "updateMask": The mask to control // which fields of the policy get updated. If the mask is not present, all -// fields will be updated. +// fields are updated. func (c *ProjectsFirewallpoliciesPatchCall) UpdateMask(updateMask string) *ProjectsFirewallpoliciesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -3526,7 +3527,7 @@ type ProjectsKeysAddIpOverrideCall struct { // AddIpOverride: Adds an IP override to a key. The following restrictions // hold: * The maximum number of IP overrides per key is 100. * For any // conflict (such as IP already exists or IP part of an existing IP range), an -// error will be returned. +// error is returned. // // - name: The name of the key to which the IP override is added, in the format // `projects/{project}/keys/{key}`. @@ -3631,8 +3632,8 @@ type ProjectsKeysCreateCall struct { // Create: Creates a new reCAPTCHA Enterprise key. // -// - parent: The name of the project in which the key will be created, in the -// format `projects/{project}`. +// - parent: The name of the project in which the key is created, in the format +// `projects/{project}`. func (r *ProjectsKeysService) Create(parent string, googlecloudrecaptchaenterprisev1key *GoogleCloudRecaptchaenterpriseV1Key) *ProjectsKeysCreateCall { c := &ProjectsKeysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4050,8 +4051,8 @@ type ProjectsKeysListCall struct { // List: Returns the list of all keys that belong to a project. // -// - parent: The name of the project that contains the keys that will be -// listed, in the format `projects/{project}`. +// - parent: The name of the project that contains the keys that is listed, in +// the format `projects/{project}`. func (r *ProjectsKeysService) List(parent string) *ProjectsKeysListCall { c := &ProjectsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4458,7 +4459,7 @@ func (r *ProjectsKeysService) Patch(name string, googlecloudrecaptchaenterprisev // UpdateMask sets the optional parameter "updateMask": The mask to control // which fields of the key get updated. If the mask is not present, all fields -// will be updated. +// are updated. func (c *ProjectsKeysPatchCall) UpdateMask(updateMask string) *ProjectsKeysPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -4558,8 +4559,8 @@ type ProjectsKeysRemoveIpOverrideCall struct { // RemoveIpOverride: Removes an IP override from a key. The following // restrictions hold: * If the IP isn't found in an existing IP override, a -// `NOT_FOUND` error will be returned. * If the IP is found in an existing IP -// override, but the override type does not match, a `NOT_FOUND` error will be +// `NOT_FOUND` error is returned. * If the IP is found in an existing IP +// override, but the override type does not match, a `NOT_FOUND` error is // returned. // // - name: The name of the key from which the IP override is removed, in the diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 37aabd36b09..d117d6ee1c3 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -2092,7 +2092,7 @@ } } }, - "revision": "20240822", + "revision": "20240912", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4149,6 +4149,36 @@ }, "type": "object" }, + "GoogleCloudRetailV2ProductAttributeInterval": { + "description": "Product attribute name and numeric interval.", + "id": "GoogleCloudRetailV2ProductAttributeInterval", + "properties": { + "interval": { + "$ref": "GoogleCloudRetailV2Interval", + "description": "The numeric interval (e.g. [10, 20))" + }, + "name": { + "description": "The attribute name (e.g. \"length\")", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2ProductAttributeValue": { + "description": "Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`.", + "id": "GoogleCloudRetailV2ProductAttributeValue", + "properties": { + "name": { + "description": "The attribute name.", + "type": "string" + }, + "value": { + "description": "The attribute value.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2ProductDetail": { "description": "Detailed product information associated with a user event.", "id": "GoogleCloudRetailV2ProductDetail", @@ -4785,6 +4815,10 @@ "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", "type": "string" }, + "conversationalSearchSpec": { + "$ref": "GoogleCloudRetailV2SearchRequestConversationalSearchSpec", + "description": "Optional. This field specifies all conversational related parameters addition to traditional retail search." + }, "dynamicFacetSpec": { "$ref": "GoogleCloudRetailV2SearchRequestDynamicFacetSpec", "deprecated": true, @@ -4867,6 +4901,10 @@ "$ref": "GoogleCloudRetailV2SearchRequestSpellCorrectionSpec", "description": "The spell correction specification that specifies the mode under which spell correction will take effect." }, + "tileNavigationSpec": { + "$ref": "GoogleCloudRetailV2SearchRequestTileNavigationSpec", + "description": "Optional. This field specifies tile navigation related parameters." + }, "userInfo": { "$ref": "GoogleCloudRetailV2UserInfo", "description": "User information." @@ -4919,6 +4957,59 @@ }, "type": "object" }, + "GoogleCloudRetailV2SearchRequestConversationalSearchSpec": { + "description": "This field specifies all conversational related parameters addition to traditional retail search.", + "id": "GoogleCloudRetailV2SearchRequestConversationalSearchSpec", + "properties": { + "conversationId": { + "description": "This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResult.conversation_id. For the initial request, this should be empty.", + "type": "string" + }, + "followupConversationRequested": { + "description": "This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc.", + "type": "boolean" + }, + "userAnswer": { + "$ref": "GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswer", + "description": "This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswer": { + "description": "This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.", + "id": "GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswer", + "properties": { + "selectedAnswer": { + "$ref": "GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswerSelectedAnswer", + "description": "This field specifies the selected attributes during the conversational search. This should be a subset of ConversationalSearchResult.suggested_answers." + }, + "textAnswer": { + "description": "This field specifies the incremental input text from the user during the conversational search.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswerSelectedAnswer": { + "description": "This field specifies the selected answers during the conversational search.", + "id": "GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswerSelectedAnswer", + "properties": { + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2ProductAttributeValue", + "description": "This field specifies the selected answer which is a attribute key-value." + }, + "productAttributeValues": { + "deprecated": true, + "description": "This field is deprecated and should not be set.", + "items": { + "$ref": "GoogleCloudRetailV2ProductAttributeValue" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2SearchRequestDynamicFacetSpec": { "description": "The specifications of dynamically generated facets.", "id": "GoogleCloudRetailV2SearchRequestDynamicFacetSpec", @@ -5089,6 +5180,24 @@ }, "type": "object" }, + "GoogleCloudRetailV2SearchRequestTileNavigationSpec": { + "description": "This field specifies tile navigation related parameters.", + "id": "GoogleCloudRetailV2SearchRequestTileNavigationSpec", + "properties": { + "appliedTiles": { + "description": "This field specifies the tiles which are already clicked in client side. NOTE: This field is not being used for filtering search products. Client side should also put all the applied tiles in SearchRequest.filter.", + "items": { + "$ref": "GoogleCloudRetailV2Tile" + }, + "type": "array" + }, + "tileNavigationRequested": { + "description": "This field specifies whether the customer would like to request tile navigation.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudRetailV2SearchResponse": { "description": "Response message for SearchService.Search method.", "id": "GoogleCloudRetailV2SearchResponse", @@ -5104,6 +5213,10 @@ "description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.", "type": "string" }, + "conversationalSearchResult": { + "$ref": "GoogleCloudRetailV2SearchResponseConversationalSearchResult", + "description": "This field specifies all related information that is needed on client side for UI rendering of conversational retail search." + }, "correctedQuery": { "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", "type": "string" @@ -5148,6 +5261,10 @@ }, "type": "array" }, + "tileNavigationResult": { + "$ref": "GoogleCloudRetailV2SearchResponseTileNavigationResult", + "description": "This field specifies all related information for tile navigation that will be used in client side." + }, "totalSize": { "description": "The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.", "format": "int32", @@ -5156,6 +5273,66 @@ }, "type": "object" }, + "GoogleCloudRetailV2SearchResponseConversationalSearchResult": { + "description": "This field specifies all related information that is needed on client side for UI rendering of conversational retail search.", + "id": "GoogleCloudRetailV2SearchResponseConversationalSearchResult", + "properties": { + "additionalFilter": { + "$ref": "GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter", + "description": "This is the incremental additional filters implied from the current user answer. User should add the suggested addition filters to the previous SearchRequest.filter, and use the merged filter in the follow up search request." + }, + "additionalFilters": { + "deprecated": true, + "description": "This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field `additional_filter`.", + "items": { + "$ref": "GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter" + }, + "type": "array" + }, + "conversationId": { + "description": "Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request's SearchRequest.ConversationalSearchSpec.conversation_id to restore conversation state in server.", + "type": "string" + }, + "followupQuestion": { + "description": "The follow-up question. e.g., `What is the color?`", + "type": "string" + }, + "refinedQuery": { + "description": "The current refined query for the conversational search. This field will be used in customer UI that the query in the search bar should be replaced with the refined query. For example, if SearchRequest.query is `dress` and next SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is `red color`, which does not match any product attribute value filters, the refined query will be `dress, red color`.", + "type": "string" + }, + "suggestedAnswers": { + "description": "The answer options provided to client for the follow-up question.", + "items": { + "$ref": "GoogleCloudRetailV2SearchResponseConversationalSearchResultSuggestedAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter": { + "description": "Additional filter that client side need to apply.", + "id": "GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter", + "properties": { + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2ProductAttributeValue", + "description": "Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2SearchResponseConversationalSearchResultSuggestedAnswer": { + "description": "Suggested answers to the follow-up question.", + "id": "GoogleCloudRetailV2SearchResponseConversationalSearchResultSuggestedAnswer", + "properties": { + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2ProductAttributeValue", + "description": "Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future." + } + }, + "type": "object" + }, "GoogleCloudRetailV2SearchResponseFacet": { "description": "A facet result.", "id": "GoogleCloudRetailV2SearchResponseFacet", @@ -5266,6 +5443,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2SearchResponseTileNavigationResult": { + "description": "This field specifies all related information for tile navigation that will be used in client side.", + "id": "GoogleCloudRetailV2SearchResponseTileNavigationResult", + "properties": { + "tiles": { + "description": "The current tiles that are used for tile navigation, sorted by engagement.", + "items": { + "$ref": "GoogleCloudRetailV2Tile" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2ServingConfig": { "description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions).", "id": "GoogleCloudRetailV2ServingConfig", @@ -5459,6 +5650,25 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2Tile": { + "description": "This field specifies the tile information including an attribute key, attribute value. More fields will be added in the future, eg: product id or product counts, etc.", + "id": "GoogleCloudRetailV2Tile", + "properties": { + "productAttributeInterval": { + "$ref": "GoogleCloudRetailV2ProductAttributeInterval", + "description": "The product attribute key-numeric interval." + }, + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2ProductAttributeValue", + "description": "The product attribute key-value." + }, + "representativeProductId": { + "description": "The representative product id for this tile.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2TuneModelMetadata": { "description": "Metadata associated with a tune operation.", "id": "GoogleCloudRetailV2TuneModelMetadata", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 74966cdb2e5..72d381d3e50 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -3498,6 +3498,58 @@ func (s GoogleCloudRetailV2Product) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2ProductAttributeInterval: Product attribute name and +// numeric interval. +type GoogleCloudRetailV2ProductAttributeInterval struct { + // Interval: The numeric interval (e.g. [10, 20)) + Interval *GoogleCloudRetailV2Interval `json:"interval,omitempty"` + // Name: The attribute name (e.g. "length") + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Interval") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Interval") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2ProductAttributeInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ProductAttributeInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2ProductAttributeValue: Product attribute which structured +// by an attribute name and value. This structure is used in conversational +// search filters and answers. For example, if we have `name=color` and +// `value=red`, this means that the color is `red`. +type GoogleCloudRetailV2ProductAttributeValue struct { + // Name: The attribute name. + Name string `json:"name,omitempty"` + // Value: The attribute value. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2ProductAttributeValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ProductAttributeValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2ProductDetail: Detailed product information associated // with a user event. type GoogleCloudRetailV2ProductDetail struct { @@ -4602,6 +4654,9 @@ type GoogleCloudRetailV2SearchRequest struct { // expanded search. This field is strongly recommended to achieve high search // quality. For more information about filter syntax, see SearchRequest.filter. CanonicalFilter string `json:"canonicalFilter,omitempty"` + // ConversationalSearchSpec: Optional. This field specifies all conversational + // related parameters addition to traditional retail search. + ConversationalSearchSpec *GoogleCloudRetailV2SearchRequestConversationalSearchSpec `json:"conversationalSearchSpec,omitempty"` // DynamicFacetSpec: Deprecated. Refer to // https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic // facets. Do not set this field. The specification for dynamically generated @@ -4703,6 +4758,9 @@ type GoogleCloudRetailV2SearchRequest struct { // SpellCorrectionSpec: The spell correction specification that specifies the // mode under which spell correction will take effect. SpellCorrectionSpec *GoogleCloudRetailV2SearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + // TileNavigationSpec: Optional. This field specifies tile navigation related + // parameters. + TileNavigationSpec *GoogleCloudRetailV2SearchRequestTileNavigationSpec `json:"tileNavigationSpec,omitempty"` // UserInfo: User information. UserInfo *GoogleCloudRetailV2UserInfo `json:"userInfo,omitempty"` // VariantRollupKeys: The keys to fetch and rollup the matching variant @@ -4844,6 +4902,99 @@ func (s *GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec) UnmarshalJ return nil } +// GoogleCloudRetailV2SearchRequestConversationalSearchSpec: This field +// specifies all conversational related parameters addition to traditional +// retail search. +type GoogleCloudRetailV2SearchRequestConversationalSearchSpec struct { + // ConversationId: This field specifies the conversation id, which maintains + // the state of the conversation between client side and server side. Use the + // value from the previous ConversationalSearchResult.conversation_id. For the + // initial request, this should be empty. + ConversationId string `json:"conversationId,omitempty"` + // FollowupConversationRequested: This field specifies whether the customer + // would like to do conversational search. If this field is set to true, + // conversational related extra information will be returned from server side, + // including follow-up question, answer options, etc. + FollowupConversationRequested bool `json:"followupConversationRequested,omitempty"` + // UserAnswer: This field specifies the current user answer during the + // conversational search. This can be either user selected from suggested + // answers or user input plain text. + UserAnswer *GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswer `json:"userAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConversationId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConversationId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2SearchRequestConversationalSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2SearchRequestConversationalSearchSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswer: This +// field specifies the current user answer during the conversational search. +// This can be either user selected from suggested answers or user input plain +// text. +type GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswer struct { + // SelectedAnswer: This field specifies the selected attributes during the + // conversational search. This should be a subset of + // ConversationalSearchResult.suggested_answers. + SelectedAnswer *GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswerSelectedAnswer `json:"selectedAnswer,omitempty"` + // TextAnswer: This field specifies the incremental input text from the user + // during the conversational search. + TextAnswer string `json:"textAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "SelectedAnswer") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SelectedAnswer") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswerSelectedAns +// wer: This field specifies the selected answers during the conversational +// search. +type GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswerSelectedAnswer struct { + // ProductAttributeValue: This field specifies the selected answer which is a + // attribute key-value. + ProductAttributeValue *GoogleCloudRetailV2ProductAttributeValue `json:"productAttributeValue,omitempty"` + // ProductAttributeValues: This field is deprecated and should not be set. + ProductAttributeValues []*GoogleCloudRetailV2ProductAttributeValue `json:"productAttributeValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeValue") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswerSelectedAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2SearchRequestConversationalSearchSpecUserAnswerSelectedAnswer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2SearchRequestDynamicFacetSpec: The specifications of // dynamically generated facets. type GoogleCloudRetailV2SearchRequestDynamicFacetSpec struct { @@ -5131,6 +5282,35 @@ func (s GoogleCloudRetailV2SearchRequestSpellCorrectionSpec) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2SearchRequestTileNavigationSpec: This field specifies +// tile navigation related parameters. +type GoogleCloudRetailV2SearchRequestTileNavigationSpec struct { + // AppliedTiles: This field specifies the tiles which are already clicked in + // client side. NOTE: This field is not being used for filtering search + // products. Client side should also put all the applied tiles in + // SearchRequest.filter. + AppliedTiles []*GoogleCloudRetailV2Tile `json:"appliedTiles,omitempty"` + // TileNavigationRequested: This field specifies whether the customer would + // like to request tile navigation. + TileNavigationRequested bool `json:"tileNavigationRequested,omitempty"` + // ForceSendFields is a list of field names (e.g. "AppliedTiles") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AppliedTiles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2SearchRequestTileNavigationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2SearchRequestTileNavigationSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2SearchResponse: Response message for SearchService.Search // method. type GoogleCloudRetailV2SearchResponse struct { @@ -5141,6 +5321,10 @@ type GoogleCloudRetailV2SearchResponse struct { // UserEvent logs resulting from this search, which enables accurate // attribution of search model performance. AttributionToken string `json:"attributionToken,omitempty"` + // ConversationalSearchResult: This field specifies all related information + // that is needed on client side for UI rendering of conversational retail + // search. + ConversationalSearchResult *GoogleCloudRetailV2SearchResponseConversationalSearchResult `json:"conversationalSearchResult,omitempty"` // CorrectedQuery: Contains the spell corrected query, if found. If the spell // correction type is AUTOMATIC, then the search results are based on // corrected_query. Otherwise the original query is used for search. @@ -5166,6 +5350,9 @@ type GoogleCloudRetailV2SearchResponse struct { RedirectUri string `json:"redirectUri,omitempty"` // Results: A list of matched items. The order represents the ranking. Results []*GoogleCloudRetailV2SearchResponseSearchResult `json:"results,omitempty"` + // TileNavigationResult: This field specifies all related information for tile + // navigation that will be used in client side. + TileNavigationResult *GoogleCloudRetailV2SearchResponseTileNavigationResult `json:"tileNavigationResult,omitempty"` // TotalSize: The estimated total count of matched items irrespective of // pagination. The count of results returned by pagination may be less than the // total_size that matches. @@ -5191,6 +5378,104 @@ func (s GoogleCloudRetailV2SearchResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2SearchResponseConversationalSearchResult: This field +// specifies all related information that is needed on client side for UI +// rendering of conversational retail search. +type GoogleCloudRetailV2SearchResponseConversationalSearchResult struct { + // AdditionalFilter: This is the incremental additional filters implied from + // the current user answer. User should add the suggested addition filters to + // the previous SearchRequest.filter, and use the merged filter in the follow + // up search request. + AdditionalFilter *GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter `json:"additionalFilter,omitempty"` + // AdditionalFilters: This field is deprecated but will be kept for backward + // compatibility. There is expected to have only one additional filter and the + // value will be the same to the same as field `additional_filter`. + AdditionalFilters []*GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter `json:"additionalFilters,omitempty"` + // ConversationId: Conversation UUID. This field will be stored in client side + // storage to maintain the conversation session with server and will be used + // for next search request's + // SearchRequest.ConversationalSearchSpec.conversation_id to restore + // conversation state in server. + ConversationId string `json:"conversationId,omitempty"` + // FollowupQuestion: The follow-up question. e.g., `What is the color?` + FollowupQuestion string `json:"followupQuestion,omitempty"` + // RefinedQuery: The current refined query for the conversational search. This + // field will be used in customer UI that the query in the search bar should be + // replaced with the refined query. For example, if SearchRequest.query is + // `dress` and next + // SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is `red + // color`, which does not match any product attribute value filters, the + // refined query will be `dress, red color`. + RefinedQuery string `json:"refinedQuery,omitempty"` + // SuggestedAnswers: The answer options provided to client for the follow-up + // question. + SuggestedAnswers []*GoogleCloudRetailV2SearchResponseConversationalSearchResultSuggestedAnswer `json:"suggestedAnswers,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdditionalFilter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdditionalFilter") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2SearchResponseConversationalSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2SearchResponseConversationalSearchResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter: +// Additional filter that client side need to apply. +type GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter struct { + // ProductAttributeValue: Product attribute value, including an attribute key + // and an attribute value. Other types can be added here in the future. + ProductAttributeValue *GoogleCloudRetailV2ProductAttributeValue `json:"productAttributeValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeValue") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2SearchResponseConversationalSearchResultAdditionalFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2SearchResponseConversationalSearchResultSuggestedAnswer: +// Suggested answers to the follow-up question. +type GoogleCloudRetailV2SearchResponseConversationalSearchResultSuggestedAnswer struct { + // ProductAttributeValue: Product attribute value, including an attribute key + // and an attribute value. Other types can be added here in the future. + ProductAttributeValue *GoogleCloudRetailV2ProductAttributeValue `json:"productAttributeValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeValue") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2SearchResponseConversationalSearchResultSuggestedAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2SearchResponseConversationalSearchResultSuggestedAnswer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2SearchResponseFacet: A facet result. type GoogleCloudRetailV2SearchResponseFacet struct { // DynamicFacet: Whether the facet is dynamically generated. @@ -5359,6 +5644,31 @@ func (s GoogleCloudRetailV2SearchResponseSearchResult) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2SearchResponseTileNavigationResult: This field specifies +// all related information for tile navigation that will be used in client +// side. +type GoogleCloudRetailV2SearchResponseTileNavigationResult struct { + // Tiles: The current tiles that are used for tile navigation, sorted by + // engagement. + Tiles []*GoogleCloudRetailV2Tile `json:"tiles,omitempty"` + // ForceSendFields is a list of field names (e.g. "Tiles") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Tiles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2SearchResponseTileNavigationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2SearchResponseTileNavigationResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2ServingConfig: Configures metadata that is used to // generate serving time results (e.g. search results or recommendation // predictions). @@ -5619,6 +5929,34 @@ func (s GoogleCloudRetailV2SetInventoryRequest) MarshalJSON() ([]byte, error) { type GoogleCloudRetailV2SetInventoryResponse struct { } +// GoogleCloudRetailV2Tile: This field specifies the tile information including +// an attribute key, attribute value. More fields will be added in the future, +// eg: product id or product counts, etc. +type GoogleCloudRetailV2Tile struct { + // ProductAttributeInterval: The product attribute key-numeric interval. + ProductAttributeInterval *GoogleCloudRetailV2ProductAttributeInterval `json:"productAttributeInterval,omitempty"` + // ProductAttributeValue: The product attribute key-value. + ProductAttributeValue *GoogleCloudRetailV2ProductAttributeValue `json:"productAttributeValue,omitempty"` + // RepresentativeProductId: The representative product id for this tile. + RepresentativeProductId string `json:"representativeProductId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeInterval") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeInterval") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2Tile) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2Tile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2TuneModelMetadata: Metadata associated with a tune // operation. type GoogleCloudRetailV2TuneModelMetadata struct { diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 17ddacc84b1..1e5aea82760 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2613,7 +2613,7 @@ } } }, - "revision": "20240822", + "revision": "20240912", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5972,6 +5972,36 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaProductAttributeInterval": { + "description": "Product attribute name and numeric interval.", + "id": "GoogleCloudRetailV2alphaProductAttributeInterval", + "properties": { + "interval": { + "$ref": "GoogleCloudRetailV2alphaInterval", + "description": "The numeric interval (e.g. [10, 20))" + }, + "name": { + "description": "The attribute name (e.g. \"length\")", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaProductAttributeValue": { + "description": "Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`.", + "id": "GoogleCloudRetailV2alphaProductAttributeValue", + "properties": { + "name": { + "description": "The attribute name.", + "type": "string" + }, + "value": { + "description": "The attribute value.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaProductDetail": { "description": "Detailed product information associated with a user event.", "id": "GoogleCloudRetailV2alphaProductDetail", @@ -6638,6 +6668,10 @@ "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", "type": "string" }, + "conversationalSearchSpec": { + "$ref": "GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpec", + "description": "Optional. This field specifies all conversational related parameters addition to traditional retail search." + }, "dynamicFacetSpec": { "$ref": "GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec", "deprecated": true, @@ -6738,6 +6772,10 @@ "$ref": "GoogleCloudRetailV2alphaSearchRequestSpellCorrectionSpec", "description": "The spell correction specification that specifies the mode under which spell correction will take effect." }, + "tileNavigationSpec": { + "$ref": "GoogleCloudRetailV2alphaSearchRequestTileNavigationSpec", + "description": "Optional. This field specifies tile navigation related parameters." + }, "userInfo": { "$ref": "GoogleCloudRetailV2alphaUserInfo", "description": "User information." @@ -6790,6 +6828,59 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpec": { + "description": "This field specifies all conversational related parameters addition to traditional retail search.", + "id": "GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpec", + "properties": { + "conversationId": { + "description": "This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResult.conversation_id. For the initial request, this should be empty.", + "type": "string" + }, + "followupConversationRequested": { + "description": "This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc.", + "type": "boolean" + }, + "userAnswer": { + "$ref": "GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswer", + "description": "This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswer": { + "description": "This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.", + "id": "GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswer", + "properties": { + "selectedAnswer": { + "$ref": "GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer", + "description": "This field specifies the selected attributes during the conversational search. This should be a subset of ConversationalSearchResult.suggested_answers." + }, + "textAnswer": { + "description": "This field specifies the incremental input text from the user during the conversational search.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer": { + "description": "This field specifies the selected answers during the conversational search.", + "id": "GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer", + "properties": { + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2alphaProductAttributeValue", + "description": "This field specifies the selected answer which is a attribute key-value." + }, + "productAttributeValues": { + "deprecated": true, + "description": "This field is deprecated and should not be set.", + "items": { + "$ref": "GoogleCloudRetailV2alphaProductAttributeValue" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec": { "description": "The specifications of dynamically generated facets.", "id": "GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec", @@ -6960,6 +7051,24 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaSearchRequestTileNavigationSpec": { + "description": "This field specifies tile navigation related parameters.", + "id": "GoogleCloudRetailV2alphaSearchRequestTileNavigationSpec", + "properties": { + "appliedTiles": { + "description": "This field specifies the tiles which are already clicked in client side. NOTE: This field is not being used for filtering search products. Client side should also put all the applied tiles in SearchRequest.filter.", + "items": { + "$ref": "GoogleCloudRetailV2alphaTile" + }, + "type": "array" + }, + "tileNavigationRequested": { + "description": "This field specifies whether the customer would like to request tile navigation.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaSearchResponse": { "description": "Response message for SearchService.Search method.", "id": "GoogleCloudRetailV2alphaSearchResponse", @@ -6975,6 +7084,10 @@ "description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.", "type": "string" }, + "conversationalSearchResult": { + "$ref": "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResult", + "description": "This field specifies all related information that is needed on client side for UI rendering of conversational retail search." + }, "correctedQuery": { "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", "type": "string" @@ -7019,6 +7132,10 @@ }, "type": "array" }, + "tileNavigationResult": { + "$ref": "GoogleCloudRetailV2alphaSearchResponseTileNavigationResult", + "description": "This field specifies all related information for tile navigation that will be used in client side." + }, "totalSize": { "description": "The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.", "format": "int32", @@ -7027,6 +7144,66 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResult": { + "description": "This field specifies all related information that is needed on client side for UI rendering of conversational retail search.", + "id": "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResult", + "properties": { + "additionalFilter": { + "$ref": "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFilter", + "description": "This is the incremental additional filters implied from the current user answer. User should add the suggested addition filters to the previous SearchRequest.filter, and use the merged filter in the follow up search request." + }, + "additionalFilters": { + "deprecated": true, + "description": "This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field `additional_filter`.", + "items": { + "$ref": "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFilter" + }, + "type": "array" + }, + "conversationId": { + "description": "Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request's SearchRequest.ConversationalSearchSpec.conversation_id to restore conversation state in server.", + "type": "string" + }, + "followupQuestion": { + "description": "The follow-up question. e.g., `What is the color?`", + "type": "string" + }, + "refinedQuery": { + "description": "The current refined query for the conversational search. This field will be used in customer UI that the query in the search bar should be replaced with the refined query. For example, if SearchRequest.query is `dress` and next SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is `red color`, which does not match any product attribute value filters, the refined query will be `dress, red color`.", + "type": "string" + }, + "suggestedAnswers": { + "description": "The answer options provided to client for the follow-up question.", + "items": { + "$ref": "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultSuggestedAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFilter": { + "description": "Additional filter that client side need to apply.", + "id": "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFilter", + "properties": { + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2alphaProductAttributeValue", + "description": "Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultSuggestedAnswer": { + "description": "Suggested answers to the follow-up question.", + "id": "GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultSuggestedAnswer", + "properties": { + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2alphaProductAttributeValue", + "description": "Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future." + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaSearchResponseFacet": { "description": "A facet result.", "id": "GoogleCloudRetailV2alphaSearchResponseFacet", @@ -7137,6 +7314,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaSearchResponseTileNavigationResult": { + "description": "This field specifies all related information for tile navigation that will be used in client side.", + "id": "GoogleCloudRetailV2alphaSearchResponseTileNavigationResult", + "properties": { + "tiles": { + "description": "The current tiles that are used for tile navigation, sorted by engagement.", + "items": { + "$ref": "GoogleCloudRetailV2alphaTile" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaServingConfig": { "description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions).", "id": "GoogleCloudRetailV2alphaServingConfig", @@ -7330,6 +7521,25 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2alphaTile": { + "description": "This field specifies the tile information including an attribute key, attribute value. More fields will be added in the future, eg: product id or product counts, etc.", + "id": "GoogleCloudRetailV2alphaTile", + "properties": { + "productAttributeInterval": { + "$ref": "GoogleCloudRetailV2alphaProductAttributeInterval", + "description": "The product attribute key-numeric interval." + }, + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2alphaProductAttributeValue", + "description": "The product attribute key-value." + }, + "representativeProductId": { + "description": "The representative product id for this tile.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaTransformedUserEventsMetadata": { "description": "Metadata related to transform user events operation.", "id": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 55c4357307c..9bed4e8a3d8 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -5495,6 +5495,58 @@ func (s GoogleCloudRetailV2alphaProduct) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaProductAttributeInterval: Product attribute name and +// numeric interval. +type GoogleCloudRetailV2alphaProductAttributeInterval struct { + // Interval: The numeric interval (e.g. [10, 20)) + Interval *GoogleCloudRetailV2alphaInterval `json:"interval,omitempty"` + // Name: The attribute name (e.g. "length") + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Interval") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Interval") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaProductAttributeInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaProductAttributeInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaProductAttributeValue: Product attribute which +// structured by an attribute name and value. This structure is used in +// conversational search filters and answers. For example, if we have +// `name=color` and `value=red`, this means that the color is `red`. +type GoogleCloudRetailV2alphaProductAttributeValue struct { + // Name: The attribute name. + Name string `json:"name,omitempty"` + // Value: The attribute value. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaProductAttributeValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaProductAttributeValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaProductDetail: Detailed product information // associated with a user event. type GoogleCloudRetailV2alphaProductDetail struct { @@ -6637,6 +6689,9 @@ type GoogleCloudRetailV2alphaSearchRequest struct { // expanded search. This field is strongly recommended to achieve high search // quality. For more information about filter syntax, see SearchRequest.filter. CanonicalFilter string `json:"canonicalFilter,omitempty"` + // ConversationalSearchSpec: Optional. This field specifies all conversational + // related parameters addition to traditional retail search. + ConversationalSearchSpec *GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpec `json:"conversationalSearchSpec,omitempty"` // DynamicFacetSpec: Deprecated. Refer to // https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic // facets. Do not set this field. The specification for dynamically generated @@ -6752,6 +6807,9 @@ type GoogleCloudRetailV2alphaSearchRequest struct { // SpellCorrectionSpec: The spell correction specification that specifies the // mode under which spell correction will take effect. SpellCorrectionSpec *GoogleCloudRetailV2alphaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + // TileNavigationSpec: Optional. This field specifies tile navigation related + // parameters. + TileNavigationSpec *GoogleCloudRetailV2alphaSearchRequestTileNavigationSpec `json:"tileNavigationSpec,omitempty"` // UserInfo: User information. UserInfo *GoogleCloudRetailV2alphaUserInfo `json:"userInfo,omitempty"` // VariantRollupKeys: The keys to fetch and rollup the matching variant @@ -6893,6 +6951,99 @@ func (s *GoogleCloudRetailV2alphaSearchRequestBoostSpecConditionBoostSpec) Unmar return nil } +// GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpec: This field +// specifies all conversational related parameters addition to traditional +// retail search. +type GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpec struct { + // ConversationId: This field specifies the conversation id, which maintains + // the state of the conversation between client side and server side. Use the + // value from the previous ConversationalSearchResult.conversation_id. For the + // initial request, this should be empty. + ConversationId string `json:"conversationId,omitempty"` + // FollowupConversationRequested: This field specifies whether the customer + // would like to do conversational search. If this field is set to true, + // conversational related extra information will be returned from server side, + // including follow-up question, answer options, etc. + FollowupConversationRequested bool `json:"followupConversationRequested,omitempty"` + // UserAnswer: This field specifies the current user answer during the + // conversational search. This can be either user selected from suggested + // answers or user input plain text. + UserAnswer *GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswer `json:"userAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConversationId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConversationId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswer: +// This field specifies the current user answer during the conversational +// search. This can be either user selected from suggested answers or user +// input plain text. +type GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswer struct { + // SelectedAnswer: This field specifies the selected attributes during the + // conversational search. This should be a subset of + // ConversationalSearchResult.suggested_answers. + SelectedAnswer *GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer `json:"selectedAnswer,omitempty"` + // TextAnswer: This field specifies the incremental input text from the user + // during the conversational search. + TextAnswer string `json:"textAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "SelectedAnswer") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SelectedAnswer") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswerSelect +// edAnswer: This field specifies the selected answers during the +// conversational search. +type GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer struct { + // ProductAttributeValue: This field specifies the selected answer which is a + // attribute key-value. + ProductAttributeValue *GoogleCloudRetailV2alphaProductAttributeValue `json:"productAttributeValue,omitempty"` + // ProductAttributeValues: This field is deprecated and should not be set. + ProductAttributeValues []*GoogleCloudRetailV2alphaProductAttributeValue `json:"productAttributeValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeValue") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec: The specifications of // dynamically generated facets. type GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec struct { @@ -7180,6 +7331,35 @@ func (s GoogleCloudRetailV2alphaSearchRequestSpellCorrectionSpec) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaSearchRequestTileNavigationSpec: This field +// specifies tile navigation related parameters. +type GoogleCloudRetailV2alphaSearchRequestTileNavigationSpec struct { + // AppliedTiles: This field specifies the tiles which are already clicked in + // client side. NOTE: This field is not being used for filtering search + // products. Client side should also put all the applied tiles in + // SearchRequest.filter. + AppliedTiles []*GoogleCloudRetailV2alphaTile `json:"appliedTiles,omitempty"` + // TileNavigationRequested: This field specifies whether the customer would + // like to request tile navigation. + TileNavigationRequested bool `json:"tileNavigationRequested,omitempty"` + // ForceSendFields is a list of field names (e.g. "AppliedTiles") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AppliedTiles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaSearchRequestTileNavigationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaSearchRequestTileNavigationSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaSearchResponse: Response message for // SearchService.Search method. type GoogleCloudRetailV2alphaSearchResponse struct { @@ -7190,6 +7370,10 @@ type GoogleCloudRetailV2alphaSearchResponse struct { // UserEvent logs resulting from this search, which enables accurate // attribution of search model performance. AttributionToken string `json:"attributionToken,omitempty"` + // ConversationalSearchResult: This field specifies all related information + // that is needed on client side for UI rendering of conversational retail + // search. + ConversationalSearchResult *GoogleCloudRetailV2alphaSearchResponseConversationalSearchResult `json:"conversationalSearchResult,omitempty"` // CorrectedQuery: Contains the spell corrected query, if found. If the spell // correction type is AUTOMATIC, then the search results are based on // corrected_query. Otherwise the original query is used for search. @@ -7215,6 +7399,9 @@ type GoogleCloudRetailV2alphaSearchResponse struct { RedirectUri string `json:"redirectUri,omitempty"` // Results: A list of matched items. The order represents the ranking. Results []*GoogleCloudRetailV2alphaSearchResponseSearchResult `json:"results,omitempty"` + // TileNavigationResult: This field specifies all related information for tile + // navigation that will be used in client side. + TileNavigationResult *GoogleCloudRetailV2alphaSearchResponseTileNavigationResult `json:"tileNavigationResult,omitempty"` // TotalSize: The estimated total count of matched items irrespective of // pagination. The count of results returned by pagination may be less than the // total_size that matches. @@ -7240,6 +7427,104 @@ func (s GoogleCloudRetailV2alphaSearchResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaSearchResponseConversationalSearchResult: This field +// specifies all related information that is needed on client side for UI +// rendering of conversational retail search. +type GoogleCloudRetailV2alphaSearchResponseConversationalSearchResult struct { + // AdditionalFilter: This is the incremental additional filters implied from + // the current user answer. User should add the suggested addition filters to + // the previous SearchRequest.filter, and use the merged filter in the follow + // up search request. + AdditionalFilter *GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFilter `json:"additionalFilter,omitempty"` + // AdditionalFilters: This field is deprecated but will be kept for backward + // compatibility. There is expected to have only one additional filter and the + // value will be the same to the same as field `additional_filter`. + AdditionalFilters []*GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFilter `json:"additionalFilters,omitempty"` + // ConversationId: Conversation UUID. This field will be stored in client side + // storage to maintain the conversation session with server and will be used + // for next search request's + // SearchRequest.ConversationalSearchSpec.conversation_id to restore + // conversation state in server. + ConversationId string `json:"conversationId,omitempty"` + // FollowupQuestion: The follow-up question. e.g., `What is the color?` + FollowupQuestion string `json:"followupQuestion,omitempty"` + // RefinedQuery: The current refined query for the conversational search. This + // field will be used in customer UI that the query in the search bar should be + // replaced with the refined query. For example, if SearchRequest.query is + // `dress` and next + // SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is `red + // color`, which does not match any product attribute value filters, the + // refined query will be `dress, red color`. + RefinedQuery string `json:"refinedQuery,omitempty"` + // SuggestedAnswers: The answer options provided to client for the follow-up + // question. + SuggestedAnswers []*GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultSuggestedAnswer `json:"suggestedAnswers,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdditionalFilter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdditionalFilter") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaSearchResponseConversationalSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaSearchResponseConversationalSearchResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFil +// ter: Additional filter that client side need to apply. +type GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFilter struct { + // ProductAttributeValue: Product attribute value, including an attribute key + // and an attribute value. Other types can be added here in the future. + ProductAttributeValue *GoogleCloudRetailV2alphaProductAttributeValue `json:"productAttributeValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeValue") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultAdditionalFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultSuggestedAnsw +// er: Suggested answers to the follow-up question. +type GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultSuggestedAnswer struct { + // ProductAttributeValue: Product attribute value, including an attribute key + // and an attribute value. Other types can be added here in the future. + ProductAttributeValue *GoogleCloudRetailV2alphaProductAttributeValue `json:"productAttributeValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeValue") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultSuggestedAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaSearchResponseConversationalSearchResultSuggestedAnswer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaSearchResponseFacet: A facet result. type GoogleCloudRetailV2alphaSearchResponseFacet struct { // DynamicFacet: Whether the facet is dynamically generated. @@ -7408,6 +7693,31 @@ func (s GoogleCloudRetailV2alphaSearchResponseSearchResult) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaSearchResponseTileNavigationResult: This field +// specifies all related information for tile navigation that will be used in +// client side. +type GoogleCloudRetailV2alphaSearchResponseTileNavigationResult struct { + // Tiles: The current tiles that are used for tile navigation, sorted by + // engagement. + Tiles []*GoogleCloudRetailV2alphaTile `json:"tiles,omitempty"` + // ForceSendFields is a list of field names (e.g. "Tiles") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Tiles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaSearchResponseTileNavigationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaSearchResponseTileNavigationResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaServingConfig: Configures metadata that is used to // generate serving time results (e.g. search results or recommendation // predictions). @@ -7668,6 +7978,34 @@ func (s GoogleCloudRetailV2alphaSetInventoryRequest) MarshalJSON() ([]byte, erro type GoogleCloudRetailV2alphaSetInventoryResponse struct { } +// GoogleCloudRetailV2alphaTile: This field specifies the tile information +// including an attribute key, attribute value. More fields will be added in +// the future, eg: product id or product counts, etc. +type GoogleCloudRetailV2alphaTile struct { + // ProductAttributeInterval: The product attribute key-numeric interval. + ProductAttributeInterval *GoogleCloudRetailV2alphaProductAttributeInterval `json:"productAttributeInterval,omitempty"` + // ProductAttributeValue: The product attribute key-value. + ProductAttributeValue *GoogleCloudRetailV2alphaProductAttributeValue `json:"productAttributeValue,omitempty"` + // RepresentativeProductId: The representative product id for this tile. + RepresentativeProductId string `json:"representativeProductId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeInterval") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeInterval") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaTile) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaTile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaTransformedUserEventsMetadata: Metadata related to // transform user events operation. type GoogleCloudRetailV2alphaTransformedUserEventsMetadata struct { diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 49ead852fca..21ede18827b 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2237,7 +2237,7 @@ } } }, - "revision": "20240822", + "revision": "20240912", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5950,6 +5950,36 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaProductAttributeInterval": { + "description": "Product attribute name and numeric interval.", + "id": "GoogleCloudRetailV2betaProductAttributeInterval", + "properties": { + "interval": { + "$ref": "GoogleCloudRetailV2betaInterval", + "description": "The numeric interval (e.g. [10, 20))" + }, + "name": { + "description": "The attribute name (e.g. \"length\")", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaProductAttributeValue": { + "description": "Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have `name=color` and `value=red`, this means that the color is `red`.", + "id": "GoogleCloudRetailV2betaProductAttributeValue", + "properties": { + "name": { + "description": "The attribute name.", + "type": "string" + }, + "value": { + "description": "The attribute value.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaProductDetail": { "description": "Detailed product information associated with a user event.", "id": "GoogleCloudRetailV2betaProductDetail", @@ -6586,6 +6616,10 @@ "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", "type": "string" }, + "conversationalSearchSpec": { + "$ref": "GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec", + "description": "Optional. This field specifies all conversational related parameters addition to traditional retail search." + }, "dynamicFacetSpec": { "$ref": "GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec", "deprecated": true, @@ -6668,6 +6702,10 @@ "$ref": "GoogleCloudRetailV2betaSearchRequestSpellCorrectionSpec", "description": "The spell correction specification that specifies the mode under which spell correction will take effect." }, + "tileNavigationSpec": { + "$ref": "GoogleCloudRetailV2betaSearchRequestTileNavigationSpec", + "description": "Optional. This field specifies tile navigation related parameters." + }, "userInfo": { "$ref": "GoogleCloudRetailV2betaUserInfo", "description": "User information." @@ -6720,6 +6758,59 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec": { + "description": "This field specifies all conversational related parameters addition to traditional retail search.", + "id": "GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec", + "properties": { + "conversationId": { + "description": "This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResult.conversation_id. For the initial request, this should be empty.", + "type": "string" + }, + "followupConversationRequested": { + "description": "This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc.", + "type": "boolean" + }, + "userAnswer": { + "$ref": "GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswer", + "description": "This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswer": { + "description": "This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.", + "id": "GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswer", + "properties": { + "selectedAnswer": { + "$ref": "GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer", + "description": "This field specifies the selected attributes during the conversational search. This should be a subset of ConversationalSearchResult.suggested_answers." + }, + "textAnswer": { + "description": "This field specifies the incremental input text from the user during the conversational search.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer": { + "description": "This field specifies the selected answers during the conversational search.", + "id": "GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer", + "properties": { + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2betaProductAttributeValue", + "description": "This field specifies the selected answer which is a attribute key-value." + }, + "productAttributeValues": { + "deprecated": true, + "description": "This field is deprecated and should not be set.", + "items": { + "$ref": "GoogleCloudRetailV2betaProductAttributeValue" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec": { "description": "The specifications of dynamically generated facets.", "id": "GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec", @@ -6890,6 +6981,24 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaSearchRequestTileNavigationSpec": { + "description": "This field specifies tile navigation related parameters.", + "id": "GoogleCloudRetailV2betaSearchRequestTileNavigationSpec", + "properties": { + "appliedTiles": { + "description": "This field specifies the tiles which are already clicked in client side. NOTE: This field is not being used for filtering search products. Client side should also put all the applied tiles in SearchRequest.filter.", + "items": { + "$ref": "GoogleCloudRetailV2betaTile" + }, + "type": "array" + }, + "tileNavigationRequested": { + "description": "This field specifies whether the customer would like to request tile navigation.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaSearchResponse": { "description": "Response message for SearchService.Search method.", "id": "GoogleCloudRetailV2betaSearchResponse", @@ -6905,6 +7014,10 @@ "description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.", "type": "string" }, + "conversationalSearchResult": { + "$ref": "GoogleCloudRetailV2betaSearchResponseConversationalSearchResult", + "description": "This field specifies all related information that is needed on client side for UI rendering of conversational retail search." + }, "correctedQuery": { "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", "type": "string" @@ -6949,6 +7062,10 @@ }, "type": "array" }, + "tileNavigationResult": { + "$ref": "GoogleCloudRetailV2betaSearchResponseTileNavigationResult", + "description": "This field specifies all related information for tile navigation that will be used in client side." + }, "totalSize": { "description": "The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.", "format": "int32", @@ -6957,6 +7074,66 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaSearchResponseConversationalSearchResult": { + "description": "This field specifies all related information that is needed on client side for UI rendering of conversational retail search.", + "id": "GoogleCloudRetailV2betaSearchResponseConversationalSearchResult", + "properties": { + "additionalFilter": { + "$ref": "GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter", + "description": "This is the incremental additional filters implied from the current user answer. User should add the suggested addition filters to the previous SearchRequest.filter, and use the merged filter in the follow up search request." + }, + "additionalFilters": { + "deprecated": true, + "description": "This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field `additional_filter`.", + "items": { + "$ref": "GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter" + }, + "type": "array" + }, + "conversationId": { + "description": "Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request's SearchRequest.ConversationalSearchSpec.conversation_id to restore conversation state in server.", + "type": "string" + }, + "followupQuestion": { + "description": "The follow-up question. e.g., `What is the color?`", + "type": "string" + }, + "refinedQuery": { + "description": "The current refined query for the conversational search. This field will be used in customer UI that the query in the search bar should be replaced with the refined query. For example, if SearchRequest.query is `dress` and next SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is `red color`, which does not match any product attribute value filters, the refined query will be `dress, red color`.", + "type": "string" + }, + "suggestedAnswers": { + "description": "The answer options provided to client for the follow-up question.", + "items": { + "$ref": "GoogleCloudRetailV2betaSearchResponseConversationalSearchResultSuggestedAnswer" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter": { + "description": "Additional filter that client side need to apply.", + "id": "GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter", + "properties": { + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2betaProductAttributeValue", + "description": "Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2betaSearchResponseConversationalSearchResultSuggestedAnswer": { + "description": "Suggested answers to the follow-up question.", + "id": "GoogleCloudRetailV2betaSearchResponseConversationalSearchResultSuggestedAnswer", + "properties": { + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2betaProductAttributeValue", + "description": "Product attribute value, including an attribute key and an attribute value. Other types can be added here in the future." + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaSearchResponseFacet": { "description": "A facet result.", "id": "GoogleCloudRetailV2betaSearchResponseFacet", @@ -7067,6 +7244,20 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaSearchResponseTileNavigationResult": { + "description": "This field specifies all related information for tile navigation that will be used in client side.", + "id": "GoogleCloudRetailV2betaSearchResponseTileNavigationResult", + "properties": { + "tiles": { + "description": "The current tiles that are used for tile navigation, sorted by engagement.", + "items": { + "$ref": "GoogleCloudRetailV2betaTile" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaServingConfig": { "description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions).", "id": "GoogleCloudRetailV2betaServingConfig", @@ -7260,6 +7451,25 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2betaTile": { + "description": "This field specifies the tile information including an attribute key, attribute value. More fields will be added in the future, eg: product id or product counts, etc.", + "id": "GoogleCloudRetailV2betaTile", + "properties": { + "productAttributeInterval": { + "$ref": "GoogleCloudRetailV2betaProductAttributeInterval", + "description": "The product attribute key-numeric interval." + }, + "productAttributeValue": { + "$ref": "GoogleCloudRetailV2betaProductAttributeValue", + "description": "The product attribute key-value." + }, + "representativeProductId": { + "description": "The representative product id for this tile.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaTuneModelMetadata": { "description": "Metadata associated with a tune operation.", "id": "GoogleCloudRetailV2betaTuneModelMetadata", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 0234cc281df..227565fbbb6 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -5902,6 +5902,58 @@ func (s GoogleCloudRetailV2betaProduct) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaProductAttributeInterval: Product attribute name and +// numeric interval. +type GoogleCloudRetailV2betaProductAttributeInterval struct { + // Interval: The numeric interval (e.g. [10, 20)) + Interval *GoogleCloudRetailV2betaInterval `json:"interval,omitempty"` + // Name: The attribute name (e.g. "length") + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Interval") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Interval") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaProductAttributeInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaProductAttributeInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaProductAttributeValue: Product attribute which +// structured by an attribute name and value. This structure is used in +// conversational search filters and answers. For example, if we have +// `name=color` and `value=red`, this means that the color is `red`. +type GoogleCloudRetailV2betaProductAttributeValue struct { + // Name: The attribute name. + Name string `json:"name,omitempty"` + // Value: The attribute value. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaProductAttributeValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaProductAttributeValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaProductDetail: Detailed product information // associated with a user event. type GoogleCloudRetailV2betaProductDetail struct { @@ -7008,6 +7060,9 @@ type GoogleCloudRetailV2betaSearchRequest struct { // expanded search. This field is strongly recommended to achieve high search // quality. For more information about filter syntax, see SearchRequest.filter. CanonicalFilter string `json:"canonicalFilter,omitempty"` + // ConversationalSearchSpec: Optional. This field specifies all conversational + // related parameters addition to traditional retail search. + ConversationalSearchSpec *GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec `json:"conversationalSearchSpec,omitempty"` // DynamicFacetSpec: Deprecated. Refer to // https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic // facets. Do not set this field. The specification for dynamically generated @@ -7109,6 +7164,9 @@ type GoogleCloudRetailV2betaSearchRequest struct { // SpellCorrectionSpec: The spell correction specification that specifies the // mode under which spell correction will take effect. SpellCorrectionSpec *GoogleCloudRetailV2betaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + // TileNavigationSpec: Optional. This field specifies tile navigation related + // parameters. + TileNavigationSpec *GoogleCloudRetailV2betaSearchRequestTileNavigationSpec `json:"tileNavigationSpec,omitempty"` // UserInfo: User information. UserInfo *GoogleCloudRetailV2betaUserInfo `json:"userInfo,omitempty"` // VariantRollupKeys: The keys to fetch and rollup the matching variant @@ -7250,6 +7308,99 @@ func (s *GoogleCloudRetailV2betaSearchRequestBoostSpecConditionBoostSpec) Unmars return nil } +// GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec: This field +// specifies all conversational related parameters addition to traditional +// retail search. +type GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec struct { + // ConversationId: This field specifies the conversation id, which maintains + // the state of the conversation between client side and server side. Use the + // value from the previous ConversationalSearchResult.conversation_id. For the + // initial request, this should be empty. + ConversationId string `json:"conversationId,omitempty"` + // FollowupConversationRequested: This field specifies whether the customer + // would like to do conversational search. If this field is set to true, + // conversational related extra information will be returned from server side, + // including follow-up question, answer options, etc. + FollowupConversationRequested bool `json:"followupConversationRequested,omitempty"` + // UserAnswer: This field specifies the current user answer during the + // conversational search. This can be either user selected from suggested + // answers or user input plain text. + UserAnswer *GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswer `json:"userAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConversationId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConversationId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswer: This +// field specifies the current user answer during the conversational search. +// This can be either user selected from suggested answers or user input plain +// text. +type GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswer struct { + // SelectedAnswer: This field specifies the selected attributes during the + // conversational search. This should be a subset of + // ConversationalSearchResult.suggested_answers. + SelectedAnswer *GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer `json:"selectedAnswer,omitempty"` + // TextAnswer: This field specifies the incremental input text from the user + // during the conversational search. + TextAnswer string `json:"textAnswer,omitempty"` + // ForceSendFields is a list of field names (e.g. "SelectedAnswer") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SelectedAnswer") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswerSelecte +// dAnswer: This field specifies the selected answers during the conversational +// search. +type GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer struct { + // ProductAttributeValue: This field specifies the selected answer which is a + // attribute key-value. + ProductAttributeValue *GoogleCloudRetailV2betaProductAttributeValue `json:"productAttributeValue,omitempty"` + // ProductAttributeValues: This field is deprecated and should not be set. + ProductAttributeValues []*GoogleCloudRetailV2betaProductAttributeValue `json:"productAttributeValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeValue") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswerSelectedAnswer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec: The specifications of // dynamically generated facets. type GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec struct { @@ -7537,6 +7688,35 @@ func (s GoogleCloudRetailV2betaSearchRequestSpellCorrectionSpec) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaSearchRequestTileNavigationSpec: This field specifies +// tile navigation related parameters. +type GoogleCloudRetailV2betaSearchRequestTileNavigationSpec struct { + // AppliedTiles: This field specifies the tiles which are already clicked in + // client side. NOTE: This field is not being used for filtering search + // products. Client side should also put all the applied tiles in + // SearchRequest.filter. + AppliedTiles []*GoogleCloudRetailV2betaTile `json:"appliedTiles,omitempty"` + // TileNavigationRequested: This field specifies whether the customer would + // like to request tile navigation. + TileNavigationRequested bool `json:"tileNavigationRequested,omitempty"` + // ForceSendFields is a list of field names (e.g. "AppliedTiles") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AppliedTiles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaSearchRequestTileNavigationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaSearchRequestTileNavigationSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaSearchResponse: Response message for // SearchService.Search method. type GoogleCloudRetailV2betaSearchResponse struct { @@ -7547,6 +7727,10 @@ type GoogleCloudRetailV2betaSearchResponse struct { // UserEvent logs resulting from this search, which enables accurate // attribution of search model performance. AttributionToken string `json:"attributionToken,omitempty"` + // ConversationalSearchResult: This field specifies all related information + // that is needed on client side for UI rendering of conversational retail + // search. + ConversationalSearchResult *GoogleCloudRetailV2betaSearchResponseConversationalSearchResult `json:"conversationalSearchResult,omitempty"` // CorrectedQuery: Contains the spell corrected query, if found. If the spell // correction type is AUTOMATIC, then the search results are based on // corrected_query. Otherwise the original query is used for search. @@ -7572,6 +7756,9 @@ type GoogleCloudRetailV2betaSearchResponse struct { RedirectUri string `json:"redirectUri,omitempty"` // Results: A list of matched items. The order represents the ranking. Results []*GoogleCloudRetailV2betaSearchResponseSearchResult `json:"results,omitempty"` + // TileNavigationResult: This field specifies all related information for tile + // navigation that will be used in client side. + TileNavigationResult *GoogleCloudRetailV2betaSearchResponseTileNavigationResult `json:"tileNavigationResult,omitempty"` // TotalSize: The estimated total count of matched items irrespective of // pagination. The count of results returned by pagination may be less than the // total_size that matches. @@ -7597,6 +7784,104 @@ func (s GoogleCloudRetailV2betaSearchResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaSearchResponseConversationalSearchResult: This field +// specifies all related information that is needed on client side for UI +// rendering of conversational retail search. +type GoogleCloudRetailV2betaSearchResponseConversationalSearchResult struct { + // AdditionalFilter: This is the incremental additional filters implied from + // the current user answer. User should add the suggested addition filters to + // the previous SearchRequest.filter, and use the merged filter in the follow + // up search request. + AdditionalFilter *GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter `json:"additionalFilter,omitempty"` + // AdditionalFilters: This field is deprecated but will be kept for backward + // compatibility. There is expected to have only one additional filter and the + // value will be the same to the same as field `additional_filter`. + AdditionalFilters []*GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter `json:"additionalFilters,omitempty"` + // ConversationId: Conversation UUID. This field will be stored in client side + // storage to maintain the conversation session with server and will be used + // for next search request's + // SearchRequest.ConversationalSearchSpec.conversation_id to restore + // conversation state in server. + ConversationId string `json:"conversationId,omitempty"` + // FollowupQuestion: The follow-up question. e.g., `What is the color?` + FollowupQuestion string `json:"followupQuestion,omitempty"` + // RefinedQuery: The current refined query for the conversational search. This + // field will be used in customer UI that the query in the search bar should be + // replaced with the refined query. For example, if SearchRequest.query is + // `dress` and next + // SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is `red + // color`, which does not match any product attribute value filters, the + // refined query will be `dress, red color`. + RefinedQuery string `json:"refinedQuery,omitempty"` + // SuggestedAnswers: The answer options provided to client for the follow-up + // question. + SuggestedAnswers []*GoogleCloudRetailV2betaSearchResponseConversationalSearchResultSuggestedAnswer `json:"suggestedAnswers,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdditionalFilter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdditionalFilter") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaSearchResponseConversationalSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaSearchResponseConversationalSearchResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilt +// er: Additional filter that client side need to apply. +type GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter struct { + // ProductAttributeValue: Product attribute value, including an attribute key + // and an attribute value. Other types can be added here in the future. + ProductAttributeValue *GoogleCloudRetailV2betaProductAttributeValue `json:"productAttributeValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeValue") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2betaSearchResponseConversationalSearchResultSuggestedAnswe +// r: Suggested answers to the follow-up question. +type GoogleCloudRetailV2betaSearchResponseConversationalSearchResultSuggestedAnswer struct { + // ProductAttributeValue: Product attribute value, including an attribute key + // and an attribute value. Other types can be added here in the future. + ProductAttributeValue *GoogleCloudRetailV2betaProductAttributeValue `json:"productAttributeValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeValue") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaSearchResponseConversationalSearchResultSuggestedAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaSearchResponseConversationalSearchResultSuggestedAnswer + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaSearchResponseFacet: A facet result. type GoogleCloudRetailV2betaSearchResponseFacet struct { // DynamicFacet: Whether the facet is dynamically generated. @@ -7765,6 +8050,31 @@ func (s GoogleCloudRetailV2betaSearchResponseSearchResult) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaSearchResponseTileNavigationResult: This field +// specifies all related information for tile navigation that will be used in +// client side. +type GoogleCloudRetailV2betaSearchResponseTileNavigationResult struct { + // Tiles: The current tiles that are used for tile navigation, sorted by + // engagement. + Tiles []*GoogleCloudRetailV2betaTile `json:"tiles,omitempty"` + // ForceSendFields is a list of field names (e.g. "Tiles") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Tiles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaSearchResponseTileNavigationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaSearchResponseTileNavigationResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaServingConfig: Configures metadata that is used to // generate serving time results (e.g. search results or recommendation // predictions). @@ -8025,6 +8335,34 @@ func (s GoogleCloudRetailV2betaSetInventoryRequest) MarshalJSON() ([]byte, error type GoogleCloudRetailV2betaSetInventoryResponse struct { } +// GoogleCloudRetailV2betaTile: This field specifies the tile information +// including an attribute key, attribute value. More fields will be added in +// the future, eg: product id or product counts, etc. +type GoogleCloudRetailV2betaTile struct { + // ProductAttributeInterval: The product attribute key-numeric interval. + ProductAttributeInterval *GoogleCloudRetailV2betaProductAttributeInterval `json:"productAttributeInterval,omitempty"` + // ProductAttributeValue: The product attribute key-value. + ProductAttributeValue *GoogleCloudRetailV2betaProductAttributeValue `json:"productAttributeValue,omitempty"` + // RepresentativeProductId: The representative product id for this tile. + RepresentativeProductId string `json:"representativeProductId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProductAttributeInterval") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProductAttributeInterval") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaTile) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaTile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaTuneModelMetadata: Metadata associated with a tune // operation. type GoogleCloudRetailV2betaTuneModelMetadata struct { diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index e2e1b81aee1..ad0462c878a 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -903,7 +903,7 @@ } } }, - "revision": "20240827", + "revision": "20240916", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -1339,6 +1339,10 @@ "description": "Represents a Microsoft Entra tenant.", "id": "AzureTenant", "properties": { + "displayName": { + "description": "The display name of the Azure tenant.", + "type": "string" + }, "id": { "description": "The ID of the Microsoft Entra tenant, for example, \"a11aaa11-aa11-1aa1-11aa-1aaa11a\".", "type": "string" @@ -3893,6 +3897,10 @@ "description": "Represents a Microsoft Entra tenant.", "id": "GoogleCloudSecuritycenterV2AzureTenant", "properties": { + "displayName": { + "description": "The display name of the Azure tenant.", + "type": "string" + }, "id": { "description": "The ID of the Microsoft Entra tenant, for example, \"a11aaa11-aa11-1aa1-11aa-1aaa11a\".", "type": "string" diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index d4d781c0031..afb7134b686 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -850,18 +850,20 @@ func (s AzureSubscription) MarshalJSON() ([]byte, error) { // AzureTenant: Represents a Microsoft Entra tenant. type AzureTenant struct { + // DisplayName: The display name of the Azure tenant. + DisplayName string `json:"displayName,omitempty"` // Id: The ID of the Microsoft Entra tenant, for example, // "a11aaa11-aa11-1aa1-11aa-1aaa11a". Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -4022,18 +4024,20 @@ func (s GoogleCloudSecuritycenterV2AzureSubscription) MarshalJSON() ([]byte, err // GoogleCloudSecuritycenterV2AzureTenant: Represents a Microsoft Entra tenant. type GoogleCloudSecuritycenterV2AzureTenant struct { + // DisplayName: The display name of the Azure tenant. + DisplayName string `json:"displayName,omitempty"` // Id: The ID of the Microsoft Entra tenant, for example, // "a11aaa11-aa11-1aa1-11aa-1aaa11a". Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index f680dafee77..8e3a60758f8 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1913,7 +1913,7 @@ } } }, - "revision": "20240827", + "revision": "20240916", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2237,6 +2237,10 @@ "description": "Represents a Microsoft Entra tenant.", "id": "AzureTenant", "properties": { + "displayName": { + "description": "The display name of the Azure tenant.", + "type": "string" + }, "id": { "description": "The ID of the Microsoft Entra tenant, for example, \"a11aaa11-aa11-1aa1-11aa-1aaa11a\".", "type": "string" @@ -4806,6 +4810,10 @@ "description": "Represents a Microsoft Entra tenant.", "id": "GoogleCloudSecuritycenterV2AzureTenant", "properties": { + "displayName": { + "description": "The display name of the Azure tenant.", + "type": "string" + }, "id": { "description": "The ID of the Microsoft Entra tenant, for example, \"a11aaa11-aa11-1aa1-11aa-1aaa11a\".", "type": "string" diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 854e2f40a09..4ed3ade9454 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -924,18 +924,20 @@ func (s AzureSubscription) MarshalJSON() ([]byte, error) { // AzureTenant: Represents a Microsoft Entra tenant. type AzureTenant struct { + // DisplayName: The display name of the Azure tenant. + DisplayName string `json:"displayName,omitempty"` // Id: The ID of the Microsoft Entra tenant, for example, // "a11aaa11-aa11-1aa1-11aa-1aaa11a". Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -3973,18 +3975,20 @@ func (s GoogleCloudSecuritycenterV2AzureSubscription) MarshalJSON() ([]byte, err // GoogleCloudSecuritycenterV2AzureTenant: Represents a Microsoft Entra tenant. type GoogleCloudSecuritycenterV2AzureTenant struct { + // DisplayName: The display name of the Azure tenant. + DisplayName string `json:"displayName,omitempty"` // Id: The ID of the Microsoft Entra tenant, for example, // "a11aaa11-aa11-1aa1-11aa-1aaa11a". Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json index e76d022a536..6f372796c52 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json @@ -542,7 +542,7 @@ } } }, - "revision": "20240712", + "revision": "20240912", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "AddTenantProjectRequest": { @@ -1340,6 +1340,17 @@ }, "type": "object" }, + "ExperimentalFeatures": { + "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", + "id": "ExperimentalFeatures", + "properties": { + "restAsyncIoEnabled": { + "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + } + }, + "type": "object" + }, "Field": { "description": "A single field of a message type.", "id": "Field", @@ -1979,6 +1990,25 @@ "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", "format": "google-duration", "type": "string" + }, + "timeSeriesResourceHierarchyLevel": { + "description": "The scope of the timeseries data of the metric.", + "items": { + "enum": [ + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED", + "PROJECT", + "ORGANIZATION", + "FOLDER" + ], + "enumDescriptions": [ + "Do not use this default value.", + "Scopes a metric to a project.", + "Scopes a metric to an organization.", + "Scopes a metric to a folder." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -2324,6 +2354,10 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "experimentalFeatures": { + "$ref": "ExperimentalFeatures", + "description": "Experimental features to be included during client library generation." } }, "type": "object" @@ -3125,7 +3159,7 @@ "id": "V1DefaultIdentity", "properties": { "email": { - "description": "The email address of the default identity.", + "description": "The email address of the default identity. Calling GenerateDefaultIdentity with a deleted or purged default identity should expect does_not_exist@invalid-project.iam.gserviceaccount.com placeholder email.", "type": "string" }, "name": { diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go index 487fe7883d0..903b5772361 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go @@ -1374,6 +1374,33 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExperimentalFeatures: Experimental features to be included during client +// library generation. These fields will be deprecated once the feature +// graduates and is enabled by default. +type ExperimentalFeatures struct { + // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if + // `rest` transport is enabled. By default, asynchronous REST clients will not + // be generated. This feature will be enabled by default 1 month after + // launching the feature in preview packages. + RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RestAsyncIoEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) { + type NoMethod ExperimentalFeatures + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Field: A single field of a message type. type Field struct { // Cardinality: The field cardinality. @@ -2360,6 +2387,16 @@ type MetricDescriptorMetadata struct { // interval, excluding data loss due to errors. Metrics with a higher // granularity have a smaller sampling period. SamplePeriod string `json:"samplePeriod,omitempty"` + // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the + // metric. + // + // Possible values: + // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this + // default value. + // "PROJECT" - Scopes a metric to a project. + // "ORGANIZATION" - Scopes a metric to an organization. + // "FOLDER" - Scopes a metric to a folder. + TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "IngestDelay") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2934,6 +2971,9 @@ func (s Publishing) MarshalJSON() ([]byte, error) { type PythonSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // ExperimentalFeatures: Experimental features to be included during client + // library generation. + ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,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. See @@ -4036,7 +4076,10 @@ func (s V1Beta1ServiceIdentity) MarshalJSON() ([]byte, error) { // V1DefaultIdentity: A default identity in the Identity and Access Management // API. type V1DefaultIdentity struct { - // Email: The email address of the default identity. + // Email: The email address of the default identity. Calling + // GenerateDefaultIdentity with a deleted or purged default identity should + // expect does_not_exist@invalid-project.iam.gserviceaccount.com placeholder + // email. Email string `json:"email,omitempty"` // Name: Default identity resource name. An example name would be: // `services/serviceconsumermanagement.googleapis.com/projects/123/defaultIdenti diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json index 76077c2429b..78f7644075a 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json @@ -715,7 +715,7 @@ } } }, - "revision": "20240712", + "revision": "20240905", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { @@ -1425,6 +1425,17 @@ }, "type": "object" }, + "ExperimentalFeatures": { + "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", + "id": "ExperimentalFeatures", + "properties": { + "restAsyncIoEnabled": { + "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + } + }, + "type": "object" + }, "Field": { "description": "A single field of a message type.", "id": "Field", @@ -2028,6 +2039,25 @@ "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", "format": "google-duration", "type": "string" + }, + "timeSeriesResourceHierarchyLevel": { + "description": "The scope of the timeseries data of the metric.", + "items": { + "enum": [ + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED", + "PROJECT", + "ORGANIZATION", + "FOLDER" + ], + "enumDescriptions": [ + "Do not use this default value.", + "Scopes a metric to a project.", + "Scopes a metric to an organization.", + "Scopes a metric to a folder." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -2355,6 +2385,10 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "experimentalFeatures": { + "$ref": "ExperimentalFeatures", + "description": "Experimental features to be included during client library generation." } }, "type": "object" diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index 2b9982d3552..3227c14c6b3 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -1243,6 +1243,33 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExperimentalFeatures: Experimental features to be included during client +// library generation. These fields will be deprecated once the feature +// graduates and is enabled by default. +type ExperimentalFeatures struct { + // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if + // `rest` transport is enabled. By default, asynchronous REST clients will not + // be generated. This feature will be enabled by default 1 month after + // launching the feature in preview packages. + RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RestAsyncIoEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) { + type NoMethod ExperimentalFeatures + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Field: A single field of a message type. type Field struct { // Cardinality: The field cardinality. @@ -2174,6 +2201,16 @@ type MetricDescriptorMetadata struct { // interval, excluding data loss due to errors. Metrics with a higher // granularity have a smaller sampling period. SamplePeriod string `json:"samplePeriod,omitempty"` + // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the + // metric. + // + // Possible values: + // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this + // default value. + // "PROJECT" - Scopes a metric to a project. + // "ORGANIZATION" - Scopes a metric to an organization. + // "FOLDER" - Scopes a metric to a folder. + TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "IngestDelay") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2720,6 +2757,9 @@ func (s Publishing) MarshalJSON() ([]byte, error) { type PythonSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // ExperimentalFeatures: Experimental features to be included during client + // library generation. + ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,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. See diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index 817b59f7525..fb473f607d9 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -1029,7 +1029,7 @@ } } }, - "revision": "20240901", + "revision": "20240916", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -1614,6 +1614,10 @@ "deprecated": true, "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", "type": "string" + }, + "selectiveGapicGeneration": { + "$ref": "SelectiveGapicGeneration", + "description": "Configuration for which RPCs should be generated in the GAPIC client." } }, "type": "object" @@ -3623,6 +3627,20 @@ }, "type": "object" }, + "SelectiveGapicGeneration": { + "description": "This message is used to configure the generation of a subset of the RPCs in a service for client libraries.", + "id": "SelectiveGapicGeneration", + "properties": { + "methods": { + "description": "An allowlist of the fully qualified names of RPCs that should be included on public client surfaces.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "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", diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index 01c27cb6eec..1269750bf40 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -1137,6 +1137,9 @@ type CommonLanguageSettings struct { // ReferenceDocsUri: Link to automatically generated reference documentation. // Example: https://cloud.google.com/nodejs/docs/reference/asset/latest ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` + // SelectiveGapicGeneration: Configuration for which RPCs should be generated + // in the GAPIC client. + SelectiveGapicGeneration *SelectiveGapicGeneration `json:"selectiveGapicGeneration,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. See @@ -4242,6 +4245,30 @@ func (s SecondaryIpRangeSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SelectiveGapicGeneration: This message is used to configure the generation +// of a subset of the RPCs in a service for client libraries. +type SelectiveGapicGeneration struct { + // Methods: An allowlist of the fully qualified names of RPCs that should be + // included on public client surfaces. + Methods []string `json:"methods,omitempty"` + // ForceSendFields is a list of field names (e.g. "Methods") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Methods") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SelectiveGapicGeneration) MarshalJSON() ([]byte, error) { + type NoMethod SelectiveGapicGeneration + return gensupport.MarshalJSON(NoMethod(s), 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 title, and delegates diff --git a/servicenetworking/v1beta/servicenetworking-api.json b/servicenetworking/v1beta/servicenetworking-api.json index 0c0f132fd17..350570b5953 100644 --- a/servicenetworking/v1beta/servicenetworking-api.json +++ b/servicenetworking/v1beta/servicenetworking-api.json @@ -307,7 +307,7 @@ } } }, - "revision": "20240901", + "revision": "20240916", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -775,6 +775,10 @@ "deprecated": true, "description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", "type": "string" + }, + "selectiveGapicGeneration": { + "$ref": "SelectiveGapicGeneration", + "description": "Configuration for which RPCs should be generated in the GAPIC client." } }, "type": "object" @@ -2552,6 +2556,20 @@ }, "type": "object" }, + "SelectiveGapicGeneration": { + "description": "This message is used to configure the generation of a subset of the RPCs in a service for client libraries.", + "id": "SelectiveGapicGeneration", + "properties": { + "methods": { + "description": "An allowlist of the fully qualified names of RPCs that should be included on public client surfaces.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "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", diff --git a/servicenetworking/v1beta/servicenetworking-gen.go b/servicenetworking/v1beta/servicenetworking-gen.go index 0347f58348e..193df8dc5c0 100644 --- a/servicenetworking/v1beta/servicenetworking-gen.go +++ b/servicenetworking/v1beta/servicenetworking-gen.go @@ -867,6 +867,9 @@ type CommonLanguageSettings struct { // ReferenceDocsUri: Link to automatically generated reference documentation. // Example: https://cloud.google.com/nodejs/docs/reference/asset/latest ReferenceDocsUri string `json:"referenceDocsUri,omitempty"` + // SelectiveGapicGeneration: Configuration for which RPCs should be generated + // in the GAPIC client. + SelectiveGapicGeneration *SelectiveGapicGeneration `json:"selectiveGapicGeneration,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. See @@ -3548,6 +3551,30 @@ func (s SecondaryIpRange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SelectiveGapicGeneration: This message is used to configure the generation +// of a subset of the RPCs in a service for client libraries. +type SelectiveGapicGeneration struct { + // Methods: An allowlist of the fully qualified names of RPCs that should be + // included on public client surfaces. + Methods []string `json:"methods,omitempty"` + // ForceSendFields is a list of field names (e.g. "Methods") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Methods") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SelectiveGapicGeneration) MarshalJSON() ([]byte, error) { + type NoMethod SelectiveGapicGeneration + return gensupport.MarshalJSON(NoMethod(s), 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 title, and delegates diff --git a/serviceusage/v1/serviceusage-api.json b/serviceusage/v1/serviceusage-api.json index e6b34e1bdf7..e3a375d544f 100644 --- a/serviceusage/v1/serviceusage-api.json +++ b/serviceusage/v1/serviceusage-api.json @@ -426,7 +426,7 @@ } } }, - "revision": "20240811", + "revision": "20240905", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -1516,6 +1516,17 @@ }, "type": "object" }, + "ExperimentalFeatures": { + "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", + "id": "ExperimentalFeatures", + "properties": { + "restAsyncIoEnabled": { + "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + } + }, + "type": "object" + }, "Field": { "description": "A single field of a message type.", "id": "Field", @@ -2617,6 +2628,25 @@ "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", "format": "google-duration", "type": "string" + }, + "timeSeriesResourceHierarchyLevel": { + "description": "The scope of the timeseries data of the metric.", + "items": { + "enum": [ + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED", + "PROJECT", + "ORGANIZATION", + "FOLDER" + ], + "enumDescriptions": [ + "Do not use this default value.", + "Scopes a metric to a project.", + "Scopes a metric to an organization.", + "Scopes a metric to a folder." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -2958,6 +2988,10 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "experimentalFeatures": { + "$ref": "ExperimentalFeatures", + "description": "Experimental features to be included during client library generation." } }, "type": "object" diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go index 8c0bdb5b258..c2427353227 100644 --- a/serviceusage/v1/serviceusage-gen.go +++ b/serviceusage/v1/serviceusage-gen.go @@ -1726,6 +1726,33 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExperimentalFeatures: Experimental features to be included during client +// library generation. These fields will be deprecated once the feature +// graduates and is enabled by default. +type ExperimentalFeatures struct { + // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if + // `rest` transport is enabled. By default, asynchronous REST clients will not + // be generated. This feature will be enabled by default 1 month after + // launching the feature in preview packages. + RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RestAsyncIoEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) { + type NoMethod ExperimentalFeatures + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Field: A single field of a message type. type Field struct { // Cardinality: The field cardinality. @@ -3237,6 +3264,16 @@ type MetricDescriptorMetadata struct { // interval, excluding data loss due to errors. Metrics with a higher // granularity have a smaller sampling period. SamplePeriod string `json:"samplePeriod,omitempty"` + // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the + // metric. + // + // Possible values: + // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this + // default value. + // "PROJECT" - Scopes a metric to a project. + // "ORGANIZATION" - Scopes a metric to an organization. + // "FOLDER" - Scopes a metric to a folder. + TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "IngestDelay") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3807,6 +3844,9 @@ func (s Publishing) MarshalJSON() ([]byte, error) { type PythonSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // ExperimentalFeatures: Experimental features to be included during client + // library generation. + ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,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. See diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json index 0d60f34212a..91cfe83077d 100644 --- a/serviceusage/v1beta1/serviceusage-api.json +++ b/serviceusage/v1beta1/serviceusage-api.json @@ -964,7 +964,7 @@ } } }, - "revision": "20240811", + "revision": "20240905", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -2093,6 +2093,17 @@ }, "type": "object" }, + "ExperimentalFeatures": { + "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", + "id": "ExperimentalFeatures", + "properties": { + "restAsyncIoEnabled": { + "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + } + }, + "type": "object" + }, "Field": { "description": "A single field of a message type.", "id": "Field", @@ -3312,6 +3323,25 @@ "description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", "format": "google-duration", "type": "string" + }, + "timeSeriesResourceHierarchyLevel": { + "description": "The scope of the timeseries data of the metric.", + "items": { + "enum": [ + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED", + "PROJECT", + "ORGANIZATION", + "FOLDER" + ], + "enumDescriptions": [ + "Do not use this default value.", + "Scopes a metric to a project.", + "Scopes a metric to an organization.", + "Scopes a metric to a folder." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -3702,6 +3732,10 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "experimentalFeatures": { + "$ref": "ExperimentalFeatures", + "description": "Experimental features to be included during client library generation." } }, "type": "object" diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go index dee89abafd2..6e95959492e 100644 --- a/serviceusage/v1beta1/serviceusage-gen.go +++ b/serviceusage/v1beta1/serviceusage-gen.go @@ -1805,6 +1805,33 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExperimentalFeatures: Experimental features to be included during client +// library generation. These fields will be deprecated once the feature +// graduates and is enabled by default. +type ExperimentalFeatures struct { + // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if + // `rest` transport is enabled. By default, asynchronous REST clients will not + // be generated. This feature will be enabled by default 1 month after + // launching the feature in preview packages. + RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RestAsyncIoEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExperimentalFeatures) MarshalJSON() ([]byte, error) { + type NoMethod ExperimentalFeatures + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Field: A single field of a message type. type Field struct { // Cardinality: The field cardinality. @@ -3486,6 +3513,16 @@ type MetricDescriptorMetadata struct { // interval, excluding data loss due to errors. Metrics with a higher // granularity have a smaller sampling period. SamplePeriod string `json:"samplePeriod,omitempty"` + // TimeSeriesResourceHierarchyLevel: The scope of the timeseries data of the + // metric. + // + // Possible values: + // "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED" - Do not use this + // default value. + // "PROJECT" - Scopes a metric to a project. + // "ORGANIZATION" - Scopes a metric to an organization. + // "FOLDER" - Scopes a metric to a folder. + TimeSeriesResourceHierarchyLevel []string `json:"timeSeriesResourceHierarchyLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "IngestDelay") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -4136,6 +4173,9 @@ func (s Publishing) MarshalJSON() ([]byte, error) { type PythonSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // ExperimentalFeatures: Experimental features to be included during client + // library generation. + ExperimentalFeatures *ExperimentalFeatures `json:"experimentalFeatures,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. See diff --git a/sts/v1/sts-api.json b/sts/v1/sts-api.json index 6f9b3ddd75c..c193f24cae9 100644 --- a/sts/v1/sts-api.json +++ b/sts/v1/sts-api.json @@ -116,7 +116,7 @@ } } }, - "revision": "20240704", + "revision": "20240904", "rootUrl": "https://sts.googleapis.com/", "schemas": { "GoogleIamV1Binding": { @@ -194,7 +194,7 @@ "type": "string" }, "requestedTokenType": { - "description": "Required. An identifier for the type of requested security token. Can be `urn:ietf:params:oauth:token-type:access_token` or `urn:ietf:params:oauth:token-type:access_boundary_intermediate_token`.", + "description": "Required. An identifier for the type of requested security token. Can be `urn:ietf:params:oauth:token-type:access_token` or `urn:ietf:params:oauth:token-type:access_boundary_intermediary_token`.", "type": "string" }, "scope": { @@ -217,7 +217,7 @@ "id": "GoogleIdentityStsV1ExchangeTokenResponse", "properties": { "access_boundary_session_key": { - "description": "The access boundary session key. This key is used along with the access boundary intermediate token to generate Credential Access Boundary tokens at client side. This field is absent when the `requested_token_type` from the request is not `urn:ietf:params:oauth:token-type:access_boundary_intermediate_token`.", + "description": "The access boundary session key. This key is used along with the access boundary intermediary token to generate Credential Access Boundary tokens at client side. This field is absent when the `requested_token_type` from the request is not `urn:ietf:params:oauth:token-type:access_boundary_intermediary_token`.", "format": "byte", "type": "string" }, diff --git a/sts/v1/sts-gen.go b/sts/v1/sts-gen.go index a6412241748..57c33fd47aa 100644 --- a/sts/v1/sts-gen.go +++ b/sts/v1/sts-gen.go @@ -344,7 +344,7 @@ type GoogleIdentityStsV1ExchangeTokenRequest struct { Options string `json:"options,omitempty"` // RequestedTokenType: Required. An identifier for the type of requested // security token. Can be `urn:ietf:params:oauth:token-type:access_token` or - // `urn:ietf:params:oauth:token-type:access_boundary_intermediate_token`. + // `urn:ietf:params:oauth:token-type:access_boundary_intermediary_token`. RequestedTokenType string `json:"requestedTokenType,omitempty"` // Scope: The OAuth 2.0 scopes to include on the resulting access token, // formatted as a list of space-delimited, case-sensitive strings. Required @@ -467,10 +467,10 @@ func (s GoogleIdentityStsV1ExchangeTokenRequest) MarshalJSON() ([]byte, error) { // ExchangeToken. type GoogleIdentityStsV1ExchangeTokenResponse struct { // AccessBoundarySessionKey: The access boundary session key. This key is used - // along with the access boundary intermediate token to generate Credential + // along with the access boundary intermediary token to generate Credential // Access Boundary tokens at client side. This field is absent when the // `requested_token_type` from the request is not - // `urn:ietf:params:oauth:token-type:access_boundary_intermediate_token`. + // `urn:ietf:params:oauth:token-type:access_boundary_intermediary_token`. AccessBoundarySessionKey string `json:"access_boundary_session_key,omitempty"` // AccessToken: An OAuth 2.0 security token, issued by Google, in response to // the token exchange request. Tokens can vary in size, depending in part on diff --git a/translate/v3/translate-api.json b/translate/v3/translate-api.json index ff84ab86a41..fb5f4172702 100644 --- a/translate/v3/translate-api.json +++ b/translate/v3/translate-api.json @@ -1132,7 +1132,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] }, "delete": { @@ -1707,7 +1708,7 @@ } } }, - "revision": "20240821", + "revision": "20240912", "rootUrl": "https://translation.googleapis.com/", "schemas": { "AdaptiveMtDataset": { diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 83dd48ac7d9..b6ff7db6af1 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -520,12 +520,12 @@ ], "parameters": { "filter": { - "description": "Optional. The filter request (according to https://google.aip.dev/160).", + "description": "Optional. The filter request (according to AIP-160).", "location": "query", "type": "string" }, "orderBy": { - "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + "description": "Optional. The order by fields for the result (according to AIP-132). Currently ordering is only possible by \"name\" field.", "location": "query", "type": "string" }, @@ -623,12 +623,12 @@ ], "parameters": { "filter": { - "description": "Optional. The filter request (according to https://google.aip.dev/160).", + "description": "Optional. The filter request (according to AIP-160).", "location": "query", "type": "string" }, "orderBy": { - "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + "description": "Optional. The order by fields for the result (according to AIP-132). Currently ordering is only possible by \"name\" field.", "location": "query", "type": "string" }, @@ -2220,7 +2220,7 @@ } } }, - "revision": "20240822", + "revision": "20240912", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index 00c170d7bb1..c7652f48b59 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -5500,15 +5500,15 @@ func (r *ProjectsLocationsImageImportsService) List(parent string) *ProjectsLoca } // Filter sets the optional parameter "filter": The filter request (according -// to https://google.aip.dev/160). +// to AIP-160). func (c *ProjectsLocationsImageImportsListCall) Filter(filter string) *ProjectsLocationsImageImportsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": The order by fields for the -// result (according to https://google.aip.dev/132#ordering). Currently -// ordering is only possible by "name" field. +// result (according to AIP-132). Currently ordering is only possible by "name" +// field. func (c *ProjectsLocationsImageImportsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -5870,15 +5870,15 @@ func (r *ProjectsLocationsImageImportsImageImportJobsService) List(parent string } // Filter sets the optional parameter "filter": The filter request (according -// to https://google.aip.dev/160). +// to AIP-160). func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Filter(filter string) *ProjectsLocationsImageImportsImageImportJobsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": The order by fields for the -// result (according to https://google.aip.dev/132#ordering). Currently -// ordering is only possible by "name" field. +// result (according to AIP-132). Currently ordering is only possible by "name" +// field. func (c *ProjectsLocationsImageImportsImageImportJobsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsImageImportJobsListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index 61739e36ebd..0614fc4da76 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -520,12 +520,12 @@ ], "parameters": { "filter": { - "description": "Optional. The filter request (according to https://google.aip.dev/160).", + "description": "Optional. The filter request (according to AIP-160).", "location": "query", "type": "string" }, "orderBy": { - "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + "description": "Optional. The order by fields for the result (according to AIP-132). Currently ordering is only possible by \"name\" field.", "location": "query", "type": "string" }, @@ -623,12 +623,12 @@ ], "parameters": { "filter": { - "description": "Optional. The filter request (according to https://google.aip.dev/160).", + "description": "Optional. The filter request (according to AIP-160).", "location": "query", "type": "string" }, "orderBy": { - "description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", + "description": "Optional. The order by fields for the result (according to AIP-132). Currently ordering is only possible by \"name\" field.", "location": "query", "type": "string" }, @@ -2220,7 +2220,7 @@ } } }, - "revision": "20240822", + "revision": "20240912", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 2487e4889bc..114207aa22b 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -5637,15 +5637,15 @@ func (r *ProjectsLocationsImageImportsService) List(parent string) *ProjectsLoca } // Filter sets the optional parameter "filter": The filter request (according -// to https://google.aip.dev/160). +// to AIP-160). func (c *ProjectsLocationsImageImportsListCall) Filter(filter string) *ProjectsLocationsImageImportsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": The order by fields for the -// result (according to https://google.aip.dev/132#ordering). Currently -// ordering is only possible by "name" field. +// result (according to AIP-132). Currently ordering is only possible by "name" +// field. func (c *ProjectsLocationsImageImportsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -6007,15 +6007,15 @@ func (r *ProjectsLocationsImageImportsImageImportJobsService) List(parent string } // Filter sets the optional parameter "filter": The filter request (according -// to https://google.aip.dev/160). +// to AIP-160). func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Filter(filter string) *ProjectsLocationsImageImportsImageImportJobsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": The order by fields for the -// result (according to https://google.aip.dev/132#ordering). Currently -// ordering is only possible by "name" field. +// result (according to AIP-132). Currently ordering is only possible by "name" +// field. func (c *ProjectsLocationsImageImportsImageImportJobsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsImageImportJobsListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/vpcaccess/v1/vpcaccess-api.json b/vpcaccess/v1/vpcaccess-api.json index 385a161375a..041aaa44845 100644 --- a/vpcaccess/v1/vpcaccess-api.json +++ b/vpcaccess/v1/vpcaccess-api.json @@ -384,7 +384,7 @@ } } }, - "revision": "20231110", + "revision": "20240905", "rootUrl": "https://vpcaccess.googleapis.com/", "schemas": { "Connector": { @@ -400,7 +400,7 @@ "type": "array" }, "ipCidrRange": { - "description": "The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.", + "description": "Optional. The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.", "type": "string" }, "machineType": { @@ -413,6 +413,7 @@ "type": "integer" }, "maxThroughput": { + "deprecated": true, "description": "Maximum throughput of the connector in Mbps. Refers to the expected throughput when using an `e2-micro` machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by --min-throughput. If both max-throughput and max-instances are provided, max-instances takes precedence over max-throughput. The use of `max-throughput` is discouraged in favor of `max-instances`.", "format": "int32", "type": "integer" @@ -423,6 +424,7 @@ "type": "integer" }, "minThroughput": { + "deprecated": true, "description": "Minimum throughput of the connector in Mbps. Refers to the expected throughput when using an `e2-micro` machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by --max-throughput. If both min-throughput and min-instances are provided, min-instances takes precedence over min-throughput. The use of `min-throughput` is discouraged in favor of `min-instances`.", "format": "int32", "type": "integer" @@ -432,7 +434,7 @@ "type": "string" }, "network": { - "description": "Name of a VPC network.", + "description": "Optional. Name of a VPC network.", "type": "string" }, "state": { @@ -458,7 +460,7 @@ }, "subnet": { "$ref": "Subnet", - "description": "The subnet in which to house the VPC Access Connector." + "description": "Optional. The subnet in which to house the VPC Access Connector." } }, "type": "object" @@ -705,11 +707,11 @@ "id": "Subnet", "properties": { "name": { - "description": "Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}", + "description": "Optional. Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}", "type": "string" }, "projectId": { - "description": "Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.", + "description": "Optional. Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.", "type": "string" } }, diff --git a/vpcaccess/v1/vpcaccess-gen.go b/vpcaccess/v1/vpcaccess-gen.go index 6bf75c0e786..e6f5aa0237a 100644 --- a/vpcaccess/v1/vpcaccess-gen.go +++ b/vpcaccess/v1/vpcaccess-gen.go @@ -203,8 +203,8 @@ type ProjectsLocationsOperationsService struct { type Connector struct { // ConnectedProjects: Output only. List of projects using the connector. ConnectedProjects []string `json:"connectedProjects,omitempty"` - // IpCidrRange: The range of internal addresses that follows RFC 4632 notation. - // Example: `10.132.0.0/28`. + // IpCidrRange: Optional. The range of internal addresses that follows RFC 4632 + // notation. Example: `10.132.0.0/28`. IpCidrRange string `json:"ipCidrRange,omitempty"` // MachineType: Machine type of VM Instance underlying connector. Default is // e2-micro @@ -231,7 +231,7 @@ type Connector struct { MinThroughput int64 `json:"minThroughput,omitempty"` // Name: The resource name in the format `projects/*/locations/*/connectors/*`. Name string `json:"name,omitempty"` - // Network: Name of a VPC network. + // Network: Optional. Name of a VPC network. Network string `json:"network,omitempty"` // State: Output only. State of the VPC access connector. // @@ -243,7 +243,7 @@ type Connector struct { // "ERROR" - Connector is in a bad state, manual deletion recommended. // "UPDATING" - The connector is being updated. State string `json:"state,omitempty"` - // Subnet: The subnet in which to house the VPC Access Connector. + // Subnet: Optional. The subnet in which to house the VPC Access Connector. Subnet *Subnet `json:"subnet,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -558,13 +558,14 @@ func (s Status) MarshalJSON() ([]byte, error) { // Subnet: The subnet in which to house the connector type Subnet struct { - // Name: Subnet name (relative, not fully qualified). E.g. if the full subnet - // selfLink is + // Name: Optional. Subnet name (relative, not fully qualified). E.g. if the + // full subnet selfLink is // https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} // the correct input for this field would be {subnetName} Name string `json:"name,omitempty"` - // ProjectId: Project in which the subnet exists. If not set, this project is - // assumed to be the project for which the connector create request was issued. + // ProjectId: Optional. Project in which the subnet exists. If not set, this + // project is assumed to be the project for which the connector create request + // was issued. ProjectId string `json:"projectId,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/vpcaccess/v1beta1/vpcaccess-api.json b/vpcaccess/v1beta1/vpcaccess-api.json index ccff6cb9ccf..257ea036fce 100644 --- a/vpcaccess/v1beta1/vpcaccess-api.json +++ b/vpcaccess/v1beta1/vpcaccess-api.json @@ -384,7 +384,7 @@ } } }, - "revision": "20231207", + "revision": "20240905", "rootUrl": "https://vpcaccess.googleapis.com/", "schemas": { "Connector": { @@ -406,7 +406,7 @@ "type": "string" }, "ipCidrRange": { - "description": "The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.", + "description": "Optional. The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.", "type": "string" }, "lastRestartTime": { @@ -425,6 +425,7 @@ "type": "integer" }, "maxThroughput": { + "deprecated": true, "description": "Maximum throughput of the connector in Mbps. Refers to the expected throughput when using an `e2-micro` machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by --min-throughput. If both max-throughput and max-instances are provided, max-instances takes precedence over max-throughput. The use of `max-throughput` is discouraged in favor of `max-instances`.", "format": "int32", "type": "integer" @@ -435,6 +436,7 @@ "type": "integer" }, "minThroughput": { + "deprecated": true, "description": "Minimum throughput of the connector in Mbps. Refers to the expected throughput when using an `e2-micro` machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by --max-throughput. If both min-throughput and min-instances are provided, min-instances takes precedence over min-throughput. The use of `min-throughput` is discouraged in favor of `min-instances`.", "format": "int32", "type": "integer" @@ -444,7 +446,7 @@ "type": "string" }, "network": { - "description": "Name of a VPC network.", + "description": "Optional. Name of a VPC network.", "type": "string" }, "state": { @@ -470,7 +472,7 @@ }, "subnet": { "$ref": "Subnet", - "description": "The subnet in which to house the VPC Access Connector." + "description": "Optional. The subnet in which to house the VPC Access Connector." } }, "type": "object" @@ -717,11 +719,11 @@ "id": "Subnet", "properties": { "name": { - "description": "Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}", + "description": "Optional. Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}", "type": "string" }, "projectId": { - "description": "Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.", + "description": "Optional. Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.", "type": "string" } }, diff --git a/vpcaccess/v1beta1/vpcaccess-gen.go b/vpcaccess/v1beta1/vpcaccess-gen.go index 51f11df91a3..fc9f7373cd0 100644 --- a/vpcaccess/v1beta1/vpcaccess-gen.go +++ b/vpcaccess/v1beta1/vpcaccess-gen.go @@ -205,8 +205,8 @@ type Connector struct { ConnectedProjects []string `json:"connectedProjects,omitempty"` // CreateTime: Output only. The creation time of the connector. CreateTime string `json:"createTime,omitempty"` - // IpCidrRange: The range of internal addresses that follows RFC 4632 notation. - // Example: `10.132.0.0/28`. + // IpCidrRange: Optional. The range of internal addresses that follows RFC 4632 + // notation. Example: `10.132.0.0/28`. IpCidrRange string `json:"ipCidrRange,omitempty"` // LastRestartTime: Output only. The last restart time of the connector. LastRestartTime string `json:"lastRestartTime,omitempty"` @@ -235,7 +235,7 @@ type Connector struct { MinThroughput int64 `json:"minThroughput,omitempty"` // Name: The resource name in the format `projects/*/locations/*/connectors/*`. Name string `json:"name,omitempty"` - // Network: Name of a VPC network. + // Network: Optional. Name of a VPC network. Network string `json:"network,omitempty"` // State: Output only. State of the VPC access connector. // @@ -247,7 +247,7 @@ type Connector struct { // "ERROR" - Connector is in a bad state, manual deletion recommended. // "UPDATING" - The connector is being updated. State string `json:"state,omitempty"` - // Subnet: The subnet in which to house the VPC Access Connector. + // Subnet: Optional. The subnet in which to house the VPC Access Connector. Subnet *Subnet `json:"subnet,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -562,13 +562,14 @@ func (s Status) MarshalJSON() ([]byte, error) { // Subnet: The subnet in which to house the connector type Subnet struct { - // Name: Subnet name (relative, not fully qualified). E.g. if the full subnet - // selfLink is + // Name: Optional. Subnet name (relative, not fully qualified). E.g. if the + // full subnet selfLink is // https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} // the correct input for this field would be {subnetName} Name string `json:"name,omitempty"` - // ProjectId: Project in which the subnet exists. If not set, this project is - // assumed to be the project for which the connector create request was issued. + // ProjectId: Optional. Project in which the subnet exists. If not set, this + // project is assumed to be the project for which the connector create request + // was issued. ProjectId string `json:"projectId,omitempty"` // ForceSendFields is a list of field names (e.g. "Name") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index b9858e9a170..5f4bc0ea1a8 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -2681,7 +2681,7 @@ } } }, - "revision": "20240809", + "revision": "20240913", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -4701,6 +4701,7 @@ "description": "Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens." }, "locations": { + "deprecated": true, "description": "Note: This field is currently not supported to trigger geo notifications.", "items": { "$ref": "LatLongPoint" @@ -5573,6 +5574,7 @@ "description": "Translated strings for the pin_label." }, "locations": { + "deprecated": true, "description": "Note: This field is currently not supported to trigger geo notifications.", "items": { "$ref": "LatLongPoint" @@ -6397,6 +6399,7 @@ "description": "Translated strings for the secondary_rewards_tier_label." }, "locations": { + "deprecated": true, "description": "Note: This field is currently not supported to trigger geo notifications.", "items": { "$ref": "LatLongPoint" @@ -7324,6 +7327,7 @@ "description": "Translated strings for the title. Recommended maximum length is 60 characters to ensure full string is displayed on smaller screens." }, "locations": { + "deprecated": true, "description": "Note: This field is currently not supported to trigger geo notifications.", "items": { "$ref": "LatLongPoint" @@ -8696,6 +8700,7 @@ "description": "Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens." }, "locations": { + "deprecated": true, "description": "Note: This field is currently not supported to trigger geo notifications.", "items": { "$ref": "LatLongPoint" diff --git a/workstations/v1/workstations-api.json b/workstations/v1/workstations-api.json index cbbb6d77837..2b32c16d6ff 100644 --- a/workstations/v1/workstations-api.json +++ b/workstations/v1/workstations-api.json @@ -1195,7 +1195,7 @@ } } }, - "revision": "20240820", + "revision": "20240904", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -2356,7 +2356,7 @@ "type": "string" }, "enableAuditAgent": { - "description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service_account must also be specified that has `roles/logging.logWriter` and `roles/monitoring.metricWriter` on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging) and [Container output logging](http://cloud/workstations/docs/container-output-logging#overview). Operating system audit logs are available in the [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: resource.type=\"gce_instance\" log_name:\"/logs/linux-auditd\"", + "description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service_account must also be specified that has `roles/logging.logWriter` and `roles/monitoring.metricWriter` on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging) and [Container output logging](https://cloud.google.com/workstations/docs/container-output-logging#overview). Operating system audit logs are available in the [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: resource.type=\"gce_instance\" log_name:\"/logs/linux-auditd\"", "type": "boolean" }, "encryptionKey": { @@ -2395,7 +2395,7 @@ "type": "object" }, "maxUsableWorkstations": { - "description": "Optional. Maximum number of workstations under this config a user can have `workstations.workstation.use` permission on. Only enforced on CreateWorkstation API calls on the user issuing the API request. Can be overridden by: - granting a user workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, or - having a user with that permission create a workstation and granting another user `workstations.workstation.use` permission on that workstation. If not specified defaults to 0 which indicates unlimited.", + "description": "Optional. Maximum number of workstations under this configuration a user can have `workstations.workstation.use` permission on. Only enforced on CreateWorkstation API calls on the user issuing the API request. Can be overridden by: - granting a user workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, or - having a user with that permission create a workstation and granting another user `workstations.workstation.use` permission on that workstation. If not specified, defaults to `0`, which indicates unlimited.", "format": "int32", "type": "integer" }, diff --git a/workstations/v1/workstations-gen.go b/workstations/v1/workstations-gen.go index e884f50b230..d22e8732ffa 100644 --- a/workstations/v1/workstations-gen.go +++ b/workstations/v1/workstations-gen.go @@ -1851,7 +1851,7 @@ type WorkstationConfig struct { // project. Operating system audit logging is distinct from Cloud Audit Logs // (https://cloud.google.com/workstations/docs/audit-logging) and Container // output logging - // (http://cloud/workstations/docs/container-output-logging#overview). + // (https://cloud.google.com/workstations/docs/container-output-logging#overview). // Operating system audit logs are available in the Cloud Logging // (https://cloud.google.com/logging/docs) console by querying: // resource.type="gce_instance" log_name:"/logs/linux-auditd" @@ -1898,13 +1898,13 @@ type WorkstationConfig struct { // underlying Compute Engine resources. Labels map[string]string `json:"labels,omitempty"` // MaxUsableWorkstations: Optional. Maximum number of workstations under this - // config a user can have `workstations.workstation.use` permission on. Only - // enforced on CreateWorkstation API calls on the user issuing the API request. - // Can be overridden by: - granting a user + // configuration a user can have `workstations.workstation.use` permission on. + // Only enforced on CreateWorkstation API calls on the user issuing the API + // request. Can be overridden by: - granting a user // workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, // or - having a user with that permission create a workstation and granting // another user `workstations.workstation.use` permission on that workstation. - // If not specified defaults to 0 which indicates unlimited. + // If not specified, defaults to `0`, which indicates unlimited. MaxUsableWorkstations int64 `json:"maxUsableWorkstations,omitempty"` // Name: Identifier. Full name of this workstation configuration. Name string `json:"name,omitempty"` diff --git a/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json index 9396cd533a3..122c840b002 100644 --- a/workstations/v1beta/workstations-api.json +++ b/workstations/v1beta/workstations-api.json @@ -1127,7 +1127,7 @@ } } }, - "revision": "20240820", + "revision": "20240904", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1237,7 +1237,7 @@ "type": "boolean" }, "id": { - "description": "Optional. Required. The id to be used for the boost config.", + "description": "Optional. Required. The id to be used for the boost configuration.", "type": "string" }, "machineType": { @@ -2052,7 +2052,7 @@ "type": "object" }, "boostConfigs": { - "description": "Output only. List of available boost configuration ids that this workstation can be boosted up to", + "description": "Output only. List of available boost configuration IDs that this workstation can be boosted up to.", "items": { "$ref": "WorkstationBoostConfig" }, @@ -2166,11 +2166,11 @@ "type": "object" }, "WorkstationBoostConfig": { - "description": "Boost config for this workstation. This object is populated from the parent workstation config.", + "description": "Boost configuration for this workstation. This object is populated from the parent workstation configuration.", "id": "WorkstationBoostConfig", "properties": { "id": { - "description": "Output only. Boost config id.", + "description": "Output only. Boost configuration ID.", "readOnly": true, "type": "string" } @@ -2338,7 +2338,7 @@ "type": "string" }, "enableAuditAgent": { - "description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service_account must also be specified that has `roles/logging.logWriter` and `roles/monitoring.metricWriter` on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging) and [Container output logging](http://cloud/workstations/docs/container-output-logging#overview). Operating system audit logs are available in the [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: resource.type=\"gce_instance\" log_name:\"/logs/linux-auditd\"", + "description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service_account must also be specified that has `roles/logging.logWriter` and `roles/monitoring.metricWriter` on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging) and [Container output logging](https://cloud.google.com/workstations/docs/container-output-logging#overview). Operating system audit logs are available in the [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: resource.type=\"gce_instance\" log_name:\"/logs/linux-auditd\"", "type": "boolean" }, "encryptionKey": { @@ -2381,7 +2381,7 @@ "type": "object" }, "maxUsableWorkstations": { - "description": "Optional. Maximum number of workstations under this config a user can have `workstations.workstation.use` permission on. Only enforced on CreateWorkstation API calls on the user issuing the API request. Can be overridden by: - granting a user workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, or - having a user with that permission create a workstation and granting another user `workstations.workstation.use` permission on that workstation. If not specified defaults to 0 which indicates unlimited.", + "description": "Optional. Maximum number of workstations under this configuration a user can have `workstations.workstation.use` permission on. Only enforced on CreateWorkstation API calls on the user issuing the API request. Can be overridden by: - granting a user workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, or - having a user with that permission create a workstation and granting another user `workstations.workstation.use` permission on that workstation. If not specified, defaults to `0`, which indicates unlimited.", "format": "int32", "type": "integer" }, diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index 63e98651639..1063ec4aaa8 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -451,7 +451,7 @@ type BoostConfig struct { // nested virtualization can only be enabled on boost configurations that // specify a machine_type in the N1 or N2 machine series. EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` - // Id: Optional. Required. The id to be used for the boost config. + // Id: Optional. Required. The id to be used for the boost configuration. Id string `json:"id,omitempty"` // MachineType: Optional. The type of machine that boosted VM instances will // use—for example, `e2-standard-4`. For more information about machine types @@ -1681,8 +1681,8 @@ func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { type Workstation struct { // Annotations: Optional. Client-specified annotations. Annotations map[string]string `json:"annotations,omitempty"` - // BoostConfigs: Output only. List of available boost configuration ids that - // this workstation can be boosted up to + // BoostConfigs: Output only. List of available boost configuration IDs that + // this workstation can be boosted up to. BoostConfigs []*WorkstationBoostConfig `json:"boostConfigs,omitempty"` // CreateTime: Output only. Time when this workstation was created. CreateTime string `json:"createTime,omitempty"` @@ -1764,10 +1764,10 @@ func (s Workstation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// WorkstationBoostConfig: Boost config for this workstation. This object is -// populated from the parent workstation config. +// WorkstationBoostConfig: Boost configuration for this workstation. This +// object is populated from the parent workstation configuration. type WorkstationBoostConfig struct { - // Id: Output only. Boost config id. + // Id: Output only. Boost configuration ID. Id string `json:"id,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -1916,7 +1916,7 @@ type WorkstationConfig struct { // project. Operating system audit logging is distinct from Cloud Audit Logs // (https://cloud.google.com/workstations/docs/audit-logging) and Container // output logging - // (http://cloud/workstations/docs/container-output-logging#overview). + // (https://cloud.google.com/workstations/docs/container-output-logging#overview). // Operating system audit logs are available in the Cloud Logging // (https://cloud.google.com/logging/docs) console by querying: // resource.type="gce_instance" log_name:"/logs/linux-auditd" @@ -1966,13 +1966,13 @@ type WorkstationConfig struct { // underlying Compute Engine resources. Labels map[string]string `json:"labels,omitempty"` // MaxUsableWorkstations: Optional. Maximum number of workstations under this - // config a user can have `workstations.workstation.use` permission on. Only - // enforced on CreateWorkstation API calls on the user issuing the API request. - // Can be overridden by: - granting a user + // configuration a user can have `workstations.workstation.use` permission on. + // Only enforced on CreateWorkstation API calls on the user issuing the API + // request. Can be overridden by: - granting a user // workstations.workstationConfigs.exemptMaxUsableWorkstationLimit permission, // or - having a user with that permission create a workstation and granting // another user `workstations.workstation.use` permission on that workstation. - // If not specified defaults to 0 which indicates unlimited. + // If not specified, defaults to `0`, which indicates unlimited. MaxUsableWorkstations int64 `json:"maxUsableWorkstations,omitempty"` // Name: Identifier. Full name of this workstation configuration. Name string `json:"name,omitempty"` diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index 57933503ba4..a5a0be17ca9 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -4072,7 +4072,7 @@ } } }, - "revision": "20240814", + "revision": "20240916", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -11016,6 +11016,9 @@ "$ref": "VideoMonetizationDetails", "description": "The monetizationDetails object encapsulates information about the monetization status of the video." }, + "paidProductPlacementDetails": { + "$ref": "VideoPaidProductPlacementDetails" + }, "player": { "$ref": "VideoPlayer", "description": "The player object contains information that you would use to play the video in an embedded player." @@ -11678,6 +11681,17 @@ }, "type": "object" }, + "VideoPaidProductPlacementDetails": { + "description": "Details about paid content, such as paid product placement, sponsorships or endorsement, contained in a YouTube video and a method to inform viewers of paid promotion. This data can only be retrieved by the video owner.", + "id": "VideoPaidProductPlacementDetails", + "properties": { + "hasPaidProductPlacement": { + "description": "This boolean represents whether the video contains Paid Product Placement, Studio equivalent: https://screenshot.googleplex.com/4Me79DE6AfT2ktp.png", + "type": "boolean" + } + }, + "type": "object" + }, "VideoPlayer": { "description": "Player to be used for a video playback.", "id": "VideoPlayer", @@ -11939,7 +11953,7 @@ "type": "object" }, "VideoStatus": { - "description": "Basic details about a video category, such as its localized title. Next Id: 18", + "description": "Basic details about a video category, such as its localized title. Next Id: 19", "id": "VideoStatus", "properties": { "embeddable": { diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 90ba46f5453..1d02a53f4fa 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -7223,7 +7223,8 @@ type Video struct { Localizations map[string]VideoLocalization `json:"localizations,omitempty"` // MonetizationDetails: The monetizationDetails object encapsulates information // about the monetization status of the video. - MonetizationDetails *VideoMonetizationDetails `json:"monetizationDetails,omitempty"` + MonetizationDetails *VideoMonetizationDetails `json:"monetizationDetails,omitempty"` + PaidProductPlacementDetails *VideoPaidProductPlacementDetails `json:"paidProductPlacementDetails,omitempty"` // Player: The player object contains information that you would use to play // the video in an embedded player. Player *VideoPlayer `json:"player,omitempty"` @@ -7992,6 +7993,33 @@ func (s VideoMonetizationDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// VideoPaidProductPlacementDetails: Details about paid content, such as paid +// product placement, sponsorships or endorsement, contained in a YouTube video +// and a method to inform viewers of paid promotion. This data can only be +// retrieved by the video owner. +type VideoPaidProductPlacementDetails struct { + // HasPaidProductPlacement: This boolean represents whether the video contains + // Paid Product Placement, Studio equivalent: + // https://screenshot.googleplex.com/4Me79DE6AfT2ktp.png + HasPaidProductPlacement bool `json:"hasPaidProductPlacement,omitempty"` + // ForceSendFields is a list of field names (e.g. "HasPaidProductPlacement") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HasPaidProductPlacement") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s VideoPaidProductPlacementDetails) MarshalJSON() ([]byte, error) { + type NoMethod VideoPaidProductPlacementDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VideoPlayer: Player to be used for a video playback. type VideoPlayer struct { EmbedHeight int64 `json:"embedHeight,omitempty,string"` @@ -8287,7 +8315,7 @@ func (s VideoStatistics) MarshalJSON() ([]byte, error) { } // VideoStatus: Basic details about a video category, such as its localized -// title. Next Id: 18 +// title. Next Id: 19 type VideoStatus struct { // Embeddable: This value indicates if the video can be embedded on another // website. @mutable youtube.videos.insert youtube.videos.update