From d39390cdbca7345786eff25eb217be4acf1a75c3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 13 Jul 2022 09:13:49 -0700 Subject: [PATCH 1/6] feat(all): auto-regenerate discovery clients (#1616) --- .../v1/androidmanagement-api.json | 30 +- androidmanagement/v1/androidmanagement-gen.go | 63 ++- api-list.json | 4 +- apigee/v1/apigee-api.json | 7 +- apigee/v1/apigee-gen.go | 42 +- apigeeregistry/v1/apigeeregistry-api.json | 12 +- apigeeregistry/v1/apigeeregistry-gen.go | 26 + assuredworkloads/v1/assuredworkloads-api.json | 4 +- assuredworkloads/v1/assuredworkloads-gen.go | 3 +- chat/v1/chat-api.json | 4 +- chat/v1/chat-gen.go | 4 +- chromemanagement/v1/chromemanagement-api.json | 183 +++++- chromemanagement/v1/chromemanagement-gen.go | 523 ++++++++++++++++++ cloudsearch/v1/cloudsearch-api.json | 9 +- cloudsearch/v1/cloudsearch-gen.go | 12 + connectors/v1/connectors-api.json | 44 +- connectors/v1/connectors-gen.go | 88 ++- .../v1/containeranalysis-api.json | 29 +- containeranalysis/v1/containeranalysis-gen.go | 43 +- .../v1alpha1/containeranalysis-api.json | 6 +- .../v1alpha1/containeranalysis-gen.go | 21 +- .../v1beta1/containeranalysis-api.json | 27 +- .../v1beta1/containeranalysis-gen.go | 41 +- documentai/v1/documentai-api.json | 189 ++++++- documentai/v1/documentai-gen.go | 504 ++++++++++++++++- documentai/v1beta2/documentai-api.json | 86 ++- documentai/v1beta2/documentai-gen.go | 173 +++++- documentai/v1beta3/documentai-api.json | 189 ++++++- documentai/v1beta3/documentai-gen.go | 505 ++++++++++++++++- .../v2/doubleclickbidmanager-api.json | 156 +++--- .../v2/doubleclickbidmanager-gen.go | 198 ++++--- .../v1/mybusinessaccountmanagement-api.json | 6 +- .../v1/mybusinessaccountmanagement-gen.go | 14 +- .../v1/servicenetworking-api.json | 29 +- servicenetworking/v1/servicenetworking-gen.go | 64 ++- .../v1beta/servicenetworking-api.json | 29 +- .../v1beta/servicenetworking-gen.go | 64 ++- youtube/v3/youtube-api.json | 9 +- youtube/v3/youtube-gen.go | 7 +- 39 files changed, 3099 insertions(+), 348 deletions(-) diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index b43c51d2824..e8079647fe7 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1065,7 +1065,7 @@ } } }, - "revision": "20220613", + "revision": "20220704", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -1193,7 +1193,7 @@ "type": "string" }, "packageNames": { - "description": "Package names of all packages that are associated with the particular user id. In most cases, this will be a single package name, the package that has been assigned that user id. If multiple application share a uid then all packages sharing uid will be included.", + "description": "Package names of all packages that are associated with the particular user ID. In most cases, this will be a single package name, the package that has been assigned that user ID. If multiple application share a UID then all packages sharing UID will be included.", "items": { "type": "string" }, @@ -1583,7 +1583,9 @@ "BLOCK_UNINSTALL", "PERMISSION_GRANT", "PACKAGE_ACCESS", - "ENABLE_SYSTEM_APP" + "ENABLE_SYSTEM_APP", + "NETWORK_ACTIVITY_LOGS", + "SECURITY_LOGS" ], "enumDescriptions": [ "No delegation scope specified.", @@ -1592,7 +1594,9 @@ "Grants access to blocking uninstallation.", "Grants access to permission policy and permission grant state.", "Grants access to package access state.", - "Grants access for enabling system apps." + "Grants access for enabling system apps.", + "Grants access to network activity logs. Allows the delegated application to call setNetworkLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setNetworkLoggingEnabled%28android.content.ComponentName,%20boolean%29), isNetworkLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isNetworkLoggingEnabled%28android.content.ComponentName%29) and retrieveNetworkLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveNetworkLogs%28android.content.ComponentName,%20long%29) methods. This scope can be delegated to at most one application. Supported for fully managed devices on Android 10 and above. Supported for a work profile on Android 12 and above. When delegation is supported and set, NETWORK_ACTIVITY_LOGS is ignored.", + "Grants access to security logs. Allows the delegated application to call setSecurityLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setSecurityLoggingEnabled%28android.content.ComponentName,%20boolean%29), isSecurityLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isSecurityLoggingEnabled%28android.content.ComponentName%29), retrieveSecurityLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveSecurityLogs%28android.content.ComponentName%29) and retrievePreRebootSecurityLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrievePreRebootSecurityLogs%28android.content.ComponentName%29) methods. This scope can be delegated to at most one application. Supported for fully managed devices and company-owned devices with a work profile on Android 12 and above. When delegation is supported and set, SECURITY_LOGS is ignored." ], "type": "string" }, @@ -2603,7 +2607,7 @@ "type": "string" }, "duration": { - "description": "The length of time the enrollment token is valid, ranging from 1 minute to 90 days. If not specified, the default duration is 1 hour.", + "description": "The length of time the enrollment token is valid, ranging from 1 minute to Durations.MAX_VALUE (https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Durations.html#MAX_VALUE), approximately 10,000 years. If not specified, the default duration is 1 hour. Please note that if requested duration causes the resulting expiration_timestamp to exceed Timestamps.MAX_VALUE (https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Timestamps.html#MAX_VALUE), then expiration_timestamp is coerced to Timestamps.MAX_VALUE.", "format": "google-duration", "type": "string" }, @@ -5158,8 +5162,8 @@ ], "enumDescriptions": [ "This value is not used.", - "Enable logging of on-device security events, like when the device password is incorrectly entered or removable storage is mounted. See UsageLogEvent for a complete description of the logged security events. Supported for fully managed devices on Android 7 and above. Supported for company-owned devices with a work profile on Android 12 and above, on which only security events from the work profile are logged.", - "Enable logging of on-device network events, like DNS lookups and TCP connections. See UsageLogEvent for a complete description of the logged network events. Supported for fully managed devices on Android 8 and above. Supported for company-owned devices with a work profile on Android 12 and above, on which only network events from the work profile are logged." + "Enable logging of on-device security events, like when the device password is incorrectly entered or removable storage is mounted. See UsageLogEvent for a complete description of the logged security events. Supported for fully managed devices on Android 7 and above. Supported for company-owned devices with a work profile on Android 12 and above, on which only security events from the work profile are logged. Can be overridden by the application delegated scope SECURITY_LOGS", + "Enable logging of on-device network events, like DNS lookups and TCP connections. See UsageLogEvent for a complete description of the logged network events. Supported for fully managed devices on Android 8 and above. Supported for company-owned devices with a work profile on Android 12 and above, on which only network events from the work profile are logged. Can be overridden by the application delegated scope NETWORK_ACTIVITY_LOGS" ], "type": "string" }, @@ -5175,8 +5179,8 @@ ], "enumDescriptions": [ "This value is not used.", - "Enable logging of on-device security events, like when the device password is incorrectly entered or removable storage is mounted. See UsageLogEvent for a complete description of the logged security events. Supported for fully managed devices on Android 7 and above. Supported for company-owned devices with a work profile on Android 12 and above, on which only security events from the work profile are logged.", - "Enable logging of on-device network events, like DNS lookups and TCP connections. See UsageLogEvent for a complete description of the logged network events. Supported for fully managed devices on Android 8 and above. Supported for company-owned devices with a work profile on Android 12 and above, on which only network events from the work profile are logged." + "Enable logging of on-device security events, like when the device password is incorrectly entered or removable storage is mounted. See UsageLogEvent for a complete description of the logged security events. Supported for fully managed devices on Android 7 and above. Supported for company-owned devices with a work profile on Android 12 and above, on which only security events from the work profile are logged. Can be overridden by the application delegated scope SECURITY_LOGS", + "Enable logging of on-device network events, like DNS lookups and TCP connections. See UsageLogEvent for a complete description of the logged network events. Supported for fully managed devices on Android 8 and above. Supported for company-owned devices with a work profile on Android 12 and above, on which only network events from the work profile are logged. Can be overridden by the application delegated scope NETWORK_ACTIVITY_LOGS" ], "type": "string" }, @@ -5215,7 +5219,7 @@ }, "connectEvent": { "$ref": "ConnectEvent", - "description": "A TCP connect event was initiated through the standard network stack. Part of NETWORK_LOGS." + "description": "A TCP connect event was initiated through the standard network stack. Part of NETWORK_ACTIVITY_LOGS." }, "cryptoSelfTestCompletedEvent": { "$ref": "CryptoSelfTestCompletedEvent", @@ -5223,7 +5227,7 @@ }, "dnsEvent": { "$ref": "DnsEvent", - "description": "A DNS lookup event was initiated through the standard network stack. Part of NETWORK_LOGS." + "description": "A DNS lookup event was initiated through the standard network stack. Part of NETWORK_ACTIVITY_LOGS." }, "eventId": { "description": "Unique id of the event.", @@ -5369,7 +5373,7 @@ }, "wipeFailureEvent": { "$ref": "WipeFailureEvent", - "description": "The work profile or company-owned device failed to wipe when when requested. This could be user initiated or admin initiated e.g. delete was received. Part of SECURITY_LOGS." + "description": "The work profile or company-owned device failed to wipe when requested. This could be user initiated or admin initiated e.g. delete was received. Part of SECURITY_LOGS." } }, "type": "object" @@ -5537,7 +5541,7 @@ "type": "object" }, "WipeFailureEvent": { - "description": "The work profile or company-owned device failed to wipe when when requested. This could be user initiated or admin initiated e.g. delete was received. Intentionally empty.", + "description": "The work profile or company-owned device failed to wipe when requested. This could be user initiated or admin initiated e.g. delete was received. Intentionally empty.", "id": "WipeFailureEvent", "properties": {}, "type": "object" diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 6e28fd5f311..6c8cb3bdbce 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -444,9 +444,9 @@ type AppProcessInfo struct { ApkSha256Hash string `json:"apkSha256Hash,omitempty"` // PackageNames: Package names of all packages that are associated with - // the particular user id. In most cases, this will be a single package - // name, the package that has been assigned that user id. If multiple - // application share a uid then all packages sharing uid will be + // the particular user ID. In most cases, this will be a single package + // name, the package that has been assigned that user ID. If multiple + // application share a UID then all packages sharing UID will be // included. PackageNames []string `json:"packageNames,omitempty"` @@ -909,6 +909,30 @@ type ApplicationPolicy struct { // permission grant state. // "PACKAGE_ACCESS" - Grants access to package access state. // "ENABLE_SYSTEM_APP" - Grants access for enabling system apps. + // "NETWORK_ACTIVITY_LOGS" - Grants access to network activity logs. + // Allows the delegated application to call setNetworkLoggingEnabled + // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setNetworkLoggingEnabled%28android.content.ComponentName,%20boolean%29), + // isNetworkLoggingEnabled + // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isNetworkLoggingEnabled%28android.content.ComponentName%29) + // and retrieveNetworkLogs + // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveNetworkLogs%28android.content.ComponentName,%20long%29) + // methods. This scope can be delegated to at most one application. + // Supported for fully managed devices on Android 10 and above. + // Supported for a work profile on Android 12 and above. When delegation + // is supported and set, NETWORK_ACTIVITY_LOGS is ignored. + // "SECURITY_LOGS" - Grants access to security logs. Allows the + // delegated application to call setSecurityLoggingEnabled + // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setSecurityLoggingEnabled%28android.content.ComponentName,%20boolean%29), + // isSecurityLoggingEnabled + // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isSecurityLoggingEnabled%28android.content.ComponentName%29), + // retrieveSecurityLogs + // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveSecurityLogs%28android.content.ComponentName%29) + // and retrievePreRebootSecurityLogs + // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrievePreRebootSecurityLogs%28android.content.ComponentName%29) + // methods. This scope can be delegated to at most one application. + // Supported for fully managed devices and company-owned devices with a + // work profile on Android 12 and above. When delegation is supported + // and set, SECURITY_LOGS is ignored. DelegatedScopes []string `json:"delegatedScopes,omitempty"` // Disabled: Whether the app is disabled. When disabled, the app data is @@ -2332,8 +2356,13 @@ type EnrollmentToken struct { AllowPersonalUsage string `json:"allowPersonalUsage,omitempty"` // Duration: The length of time the enrollment token is valid, ranging - // from 1 minute to 90 days. If not specified, the default duration is 1 - // hour. + // from 1 minute to Durations.MAX_VALUE + // (https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Durations.html#MAX_VALUE), + // approximately 10,000 years. If not specified, the default duration is + // 1 hour. Please note that if requested duration causes the resulting + // expiration_timestamp to exceed Timestamps.MAX_VALUE + // (https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Timestamps.html#MAX_VALUE), + // then expiration_timestamp is coerced to Timestamps.MAX_VALUE. Duration string `json:"duration,omitempty"` // ExpirationTimestamp: The expiration time of the token. This is a @@ -6023,13 +6052,15 @@ type UsageLog struct { // logged security events. Supported for fully managed devices on // Android 7 and above. Supported for company-owned devices with a work // profile on Android 12 and above, on which only security events from - // the work profile are logged. + // the work profile are logged. Can be overridden by the application + // delegated scope SECURITY_LOGS // "NETWORK_ACTIVITY_LOGS" - Enable logging of on-device network // events, like DNS lookups and TCP connections. See UsageLogEvent for a // complete description of the logged network events. Supported for // fully managed devices on Android 8 and above. Supported for // company-owned devices with a work profile on Android 12 and above, on - // which only network events from the work profile are logged. + // which only network events from the work profile are logged. Can be + // overridden by the application delegated scope NETWORK_ACTIVITY_LOGS EnabledLogTypes []string `json:"enabledLogTypes,omitempty"` // UploadOnCellularAllowed: Specifies which of the enabled log types can @@ -6044,13 +6075,15 @@ type UsageLog struct { // logged security events. Supported for fully managed devices on // Android 7 and above. Supported for company-owned devices with a work // profile on Android 12 and above, on which only security events from - // the work profile are logged. + // the work profile are logged. Can be overridden by the application + // delegated scope SECURITY_LOGS // "NETWORK_ACTIVITY_LOGS" - Enable logging of on-device network // events, like DNS lookups and TCP connections. See UsageLogEvent for a // complete description of the logged network events. Supported for // fully managed devices on Android 8 and above. Supported for // company-owned devices with a work profile on Android 12 and above, on - // which only network events from the work profile are logged. + // which only network events from the work profile are logged. Can be + // overridden by the application delegated scope NETWORK_ACTIVITY_LOGS UploadOnCellularAllowed []string `json:"uploadOnCellularAllowed,omitempty"` // ForceSendFields is a list of field names (e.g. "EnabledLogTypes") to @@ -6107,7 +6140,7 @@ type UsageLogEvent struct { CertValidationFailureEvent *CertValidationFailureEvent `json:"certValidationFailureEvent,omitempty"` // ConnectEvent: A TCP connect event was initiated through the standard - // network stack. Part of NETWORK_LOGS. + // network stack. Part of NETWORK_ACTIVITY_LOGS. ConnectEvent *ConnectEvent `json:"connectEvent,omitempty"` // CryptoSelfTestCompletedEvent: Validates whether Android’s built-in @@ -6117,7 +6150,7 @@ type UsageLogEvent struct { CryptoSelfTestCompletedEvent *CryptoSelfTestCompletedEvent `json:"cryptoSelfTestCompletedEvent,omitempty"` // DnsEvent: A DNS lookup event was initiated through the standard - // network stack. Part of NETWORK_LOGS. + // network stack. Part of NETWORK_ACTIVITY_LOGS. DnsEvent *DnsEvent `json:"dnsEvent,omitempty"` // EventId: Unique id of the event. @@ -6243,8 +6276,8 @@ type UsageLogEvent struct { RemoteLockEvent *RemoteLockEvent `json:"remoteLockEvent,omitempty"` // WipeFailureEvent: The work profile or company-owned device failed to - // wipe when when requested. This could be user initiated or admin - // initiated e.g. delete was received. Part of SECURITY_LOGS. + // wipe when requested. This could be user initiated or admin initiated + // e.g. delete was received. Part of SECURITY_LOGS. WipeFailureEvent *WipeFailureEvent `json:"wipeFailureEvent,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -6557,8 +6590,8 @@ func (s *WipeAction) MarshalJSON() ([]byte, error) { } // WipeFailureEvent: The work profile or company-owned device failed to -// wipe when when requested. This could be user initiated or admin -// initiated e.g. delete was received. Intentionally empty. +// wipe when requested. This could be user initiated or admin initiated +// e.g. delete was received. Intentionally empty. type WipeFailureEvent struct { } diff --git a/api-list.json b/api-list.json index a3402545c61..c82666d5afe 100644 --- a/api-list.json +++ b/api-list.json @@ -622,7 +622,7 @@ "name": "beyondcorp", "version": "v1alpha", "title": "BeyondCorp API", - "description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution.", + "description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity solutions.", "discoveryRestUrl": "https://beyondcorp.googleapis.com/$discovery/rest?version=v1alpha", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -637,7 +637,7 @@ "name": "beyondcorp", "version": "v1", "title": "BeyondCorp API", - "description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution.", + "description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity solutions.", "discoveryRestUrl": "https://beyondcorp.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/apigee/v1/apigee-api.json b/apigee/v1/apigee-api.json index 40941af1595..3926711fbc8 100644 --- a/apigee/v1/apigee-api.json +++ b/apigee/v1/apigee-api.json @@ -3490,7 +3490,7 @@ ] }, "delete": { - "description": "Deletes an environment from an organization. **Note**: You must delete all key value maps and key value entries before you can delete an environment.", + "description": "Deletes an environment from an organization. **Warning: You must delete all key value maps and key value entries before you delete an environment.** Otherwise, if you re-create the environment the key value map entry operations will encounter encryption/decryption discrepancies.", "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", "httpMethod": "DELETE", "id": "apigee.organizations.environments.delete", @@ -8515,7 +8515,7 @@ } } }, - "revision": "20220623", + "revision": "20220707", "rootUrl": "https://apigee.googleapis.com/", "schemas": { "EdgeConfigstoreBundleBadBundle": { @@ -8797,6 +8797,7 @@ "id": "GoogleCloudApigeeV1ApiProduct", "properties": { "apiResources": { + "description": "Comma-separated list of API resources to be bundled in the API product. By default, the resource paths are mapped from the `proxy.pathsuffix` variable. The proxy path suffix is defined as the URI fragment following the ProxyEndpoint base path. For example, if the `apiResources` element is defined to be `/forecastrss` and the base path defined for the API proxy is `/weather`, then only requests to `/weather/forecastrss` are permitted by the API product. You can select a specific path, or you can select all subpaths with the following wildcard: - `/**`: Indicates that all sub-URIs are included. - `/*` : Indicates that only URIs one level down are included. By default, / supports the same resources as /** as well as the base path defined by the API proxy. For example, if the base path of the API proxy is `/v1/weatherapikey`, then the API product supports requests to `/v1/weatherapikey` and to any sub-URIs, such as `/v1/weatherapikey/forecastrss`, `/v1/weatherapikey/region/CA`, and so on. For more information, see Managing API products.", "items": { "type": "string" }, @@ -8819,7 +8820,7 @@ "type": "string" }, "description": { - "description": "Description of the API product. Include key information about the API product that is not captured by other fields. Comma-separated list of API resources to be bundled in the API product. By default, the resource paths are mapped from the `proxy.pathsuffix` variable. The proxy path suffix is defined as the URI fragment following the ProxyEndpoint base path. For example, if the `apiResources` element is defined to be `/forecastrss` and the base path defined for the API proxy is `/weather`, then only requests to `/weather/forecastrss` are permitted by the API product. You can select a specific path, or you can select all subpaths with the following wildcard: - `/**`: Indicates that all sub-URIs are included. - `/*` : Indicates that only URIs one level down are included. By default, / supports the same resources as /** as well as the base path defined by the API proxy. For example, if the base path of the API proxy is `/v1/weatherapikey`, then the API product supports requests to `/v1/weatherapikey` and to any sub-URIs, such as `/v1/weatherapikey/forecastrss`, `/v1/weatherapikey/region/CA`, and so on. For more information, see Managing API products.", + "description": "Description of the API product. Include key information about the API product that is not captured by other fields.", "type": "string" }, "displayName": { diff --git a/apigee/v1/apigee-gen.go b/apigee/v1/apigee-gen.go index ddb24ad5269..40bdaa6e9ce 100644 --- a/apigee/v1/apigee-gen.go +++ b/apigee/v1/apigee-gen.go @@ -1619,6 +1619,22 @@ func (s *GoogleCloudApigeeV1ApiCategoryData) MarshalJSON() ([]byte, error) { } type GoogleCloudApigeeV1ApiProduct struct { + // ApiResources: Comma-separated list of API resources to be bundled in + // the API product. By default, the resource paths are mapped from the + // `proxy.pathsuffix` variable. The proxy path suffix is defined as the + // URI fragment following the ProxyEndpoint base path. For example, if + // the `apiResources` element is defined to be `/forecastrss` and the + // base path defined for the API proxy is `/weather`, then only requests + // to `/weather/forecastrss` are permitted by the API product. You can + // select a specific path, or you can select all subpaths with the + // following wildcard: - `/**`: Indicates that all sub-URIs are + // included. - `/*` : Indicates that only URIs one level down are + // included. By default, / supports the same resources as /** as well as + // the base path defined by the API proxy. For example, if the base path + // of the API proxy is `/v1/weatherapikey`, then the API product + // supports requests to `/v1/weatherapikey` and to any sub-URIs, such as + // `/v1/weatherapikey/forecastrss`, `/v1/weatherapikey/region/CA`, and + // so on. For more information, see Managing API products. ApiResources []string `json:"apiResources,omitempty"` // ApprovalType: Flag that specifies how API keys are approved to access @@ -1649,22 +1665,6 @@ type GoogleCloudApigeeV1ApiProduct struct { // Description: Description of the API product. Include key information // about the API product that is not captured by other fields. - // Comma-separated list of API resources to be bundled in the API - // product. By default, the resource paths are mapped from the - // `proxy.pathsuffix` variable. The proxy path suffix is defined as the - // URI fragment following the ProxyEndpoint base path. For example, if - // the `apiResources` element is defined to be `/forecastrss` and the - // base path defined for the API proxy is `/weather`, then only requests - // to `/weather/forecastrss` are permitted by the API product. You can - // select a specific path, or you can select all subpaths with the - // following wildcard: - `/**`: Indicates that all sub-URIs are - // included. - `/*` : Indicates that only URIs one level down are - // included. By default, / supports the same resources as /** as well as - // the base path defined by the API proxy. For example, if the base path - // of the API proxy is `/v1/weatherapikey`, then the API product - // supports requests to `/v1/weatherapikey` and to any sub-URIs, such as - // `/v1/weatherapikey/forecastrss`, `/v1/weatherapikey/region/CA`, and - // so on. For more information, see Managing API products. Description string `json:"description,omitempty"` // DisplayName: Name displayed in the UI or developer portal to @@ -28687,9 +28687,11 @@ type OrganizationsEnvironmentsDeleteCall struct { header_ http.Header } -// Delete: Deletes an environment from an organization. **Note**: You -// must delete all key value maps and key value entries before you can -// delete an environment. +// Delete: Deletes an environment from an organization. **Warning: You +// must delete all key value maps and key value entries before you +// delete an environment.** Otherwise, if you re-create the environment +// the key value map entry operations will encounter +// encryption/decryption discrepancies. // // - name: Name of the environment. Use the following structure in your // request: `organizations/{org}/environments/{env}`. @@ -28785,7 +28787,7 @@ func (c *OrganizationsEnvironmentsDeleteCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Deletes an environment from an organization. **Note**: You must delete all key value maps and key value entries before you can delete an environment.", + // "description": "Deletes an environment from an organization. **Warning: You must delete all key value maps and key value entries before you delete an environment.** Otherwise, if you re-create the environment the key value map entry operations will encounter encryption/decryption discrepancies.", // "flatPath": "v1/organizations/{organizationsId}/environments/{environmentsId}", // "httpMethod": "DELETE", // "id": "apigee.organizations.environments.delete", diff --git a/apigeeregistry/v1/apigeeregistry-api.json b/apigeeregistry/v1/apigeeregistry-api.json index 0763ea83ac1..751eca8c744 100644 --- a/apigeeregistry/v1/apigeeregistry-api.json +++ b/apigeeregistry/v1/apigeeregistry-api.json @@ -221,6 +221,11 @@ "name" ], "parameters": { + "force": { + "description": "If set to true, any child resources will also be deleted. (Otherwise, the request will only work if there are no child resources.)", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The name of the API to delete. Format: projects/*/locations/*/apis/*", "location": "path", @@ -1302,6 +1307,11 @@ "name" ], "parameters": { + "force": { + "description": "If set to true, any child resources will also be deleted. (Otherwise, the request will only work if there are no child resources.)", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The name of the version to delete. Format: projects/*/locations/*/apis/*/versions/*", "location": "path", @@ -3116,7 +3126,7 @@ } } }, - "revision": "20220509", + "revision": "20220706", "rootUrl": "https://apigeeregistry.googleapis.com/", "schemas": { "Api": { diff --git a/apigeeregistry/v1/apigeeregistry-gen.go b/apigeeregistry/v1/apigeeregistry-gen.go index f68ad765b78..94d4e621dbc 100644 --- a/apigeeregistry/v1/apigeeregistry-gen.go +++ b/apigeeregistry/v1/apigeeregistry-gen.go @@ -2427,6 +2427,14 @@ func (r *ProjectsLocationsApisService) Delete(name string) *ProjectsLocationsApi return c } +// Force sets the optional parameter "force": If set to true, any child +// resources will also be deleted. (Otherwise, the request will only +// work if there are no child resources.) +func (c *ProjectsLocationsApisDeleteCall) Force(force bool) *ProjectsLocationsApisDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -2521,6 +2529,11 @@ func (c *ProjectsLocationsApisDeleteCall) Do(opts ...googleapi.CallOption) (*Emp // "name" // ], // "parameters": { + // "force": { + // "description": "If set to true, any child resources will also be deleted. (Otherwise, the request will only work if there are no child resources.)", + // "location": "query", + // "type": "boolean" + // }, // "name": { // "description": "Required. The name of the API to delete. Format: projects/*/locations/*/apis/*", // "location": "path", @@ -8002,6 +8015,14 @@ func (r *ProjectsLocationsApisVersionsService) Delete(name string) *ProjectsLoca return c } +// Force sets the optional parameter "force": If set to true, any child +// resources will also be deleted. (Otherwise, the request will only +// work if there are no child resources.) +func (c *ProjectsLocationsApisVersionsDeleteCall) Force(force bool) *ProjectsLocationsApisVersionsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -8096,6 +8117,11 @@ func (c *ProjectsLocationsApisVersionsDeleteCall) Do(opts ...googleapi.CallOptio // "name" // ], // "parameters": { + // "force": { + // "description": "If set to true, any child resources will also be deleted. (Otherwise, the request will only work if there are no child resources.)", + // "location": "query", + // "type": "boolean" + // }, // "name": { // "description": "Required. The name of the version to delete. Format: projects/*/locations/*/apis/*/versions/*", // "location": "path", diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index a047962da0f..ae42be414d8 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -379,7 +379,7 @@ } } }, - "revision": "20220623", + "revision": "20220707", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { @@ -1271,7 +1271,7 @@ "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus", "properties": { "activeViolationCount": { - "description": "Optional. Count of active Violations in the Workload.", + "description": "Count of active Violations in the Workload.", "format": "int32", "type": "integer" } diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 0d1c45a7495..459c343485f 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -1391,8 +1391,7 @@ func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings) Marsha // GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus: // Represents the Compliance Status of this workload type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus struct { - // ActiveViolationCount: Optional. Count of active Violations in the - // Workload. + // ActiveViolationCount: Count of active Violations in the Workload. ActiveViolationCount int64 `json:"activeViolationCount,omitempty"` // ForceSendFields is a list of field names (e.g. diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 1325da03e29..dd85da76913 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -642,7 +642,7 @@ } } }, - "revision": "20220701", + "revision": "20220706", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -2518,7 +2518,7 @@ "type": "string" }, "lastUpdateTime": { - "description": "Output only. The time at which the message was last updated. If the message was never updated, this field matches `create_time`.", + "description": "Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty.", "format": "google-datetime", "readOnly": true, "type": "string" diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 60a398d53ad..c4609ad13e9 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -3217,8 +3217,8 @@ type Message struct { FallbackText string `json:"fallbackText,omitempty"` // LastUpdateTime: Output only. The time at which the message was last - // updated. If the message was never updated, this field matches - // `create_time`. + // edited by a user. If the message has never been edited, this field is + // empty. LastUpdateTime string `json:"lastUpdateTime,omitempty"` // MatchedUrl: Output only. A URL in `spaces.messages.text` that matches diff --git a/chromemanagement/v1/chromemanagement-api.json b/chromemanagement/v1/chromemanagement-api.json index 4e03c664131..caf72c389c2 100644 --- a/chromemanagement/v1/chromemanagement-api.json +++ b/chromemanagement/v1/chromemanagement-api.json @@ -254,6 +254,82 @@ }, "reports": { "methods": { + "countChromeDevicesReachingAutoExpirationDate": { + "description": "Generate report of the number of devices expiring in each month of the selected time frame. Devices are grouped by auto update expiration date and model. Further information can be found [here](https://support.google.com/chrome/a/answer/10564947).", + "flatPath": "v1/customers/{customersId}/reports:countChromeDevicesReachingAutoExpirationDate", + "httpMethod": "GET", + "id": "chromemanagement.customers.reports.countChromeDevicesReachingAutoExpirationDate", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Required. The customer ID or \"my_customer\" prefixed with \"customers/\".", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + }, + "maxAueDate": { + "description": "Optional. Maximum expiration date in format yyyy-mm-dd in UTC timezone. If included returns all devices that have already expired and devices with auto expiration date equal to or earlier than the maximum date.", + "location": "query", + "type": "string" + }, + "minAueDate": { + "description": "Optional. Maximum expiration date in format yyyy-mm-dd in UTC timezone. If included returns all devices that have already expired and devices with auto expiration date equal to or later than the minimum date.", + "location": "query", + "type": "string" + }, + "orgUnitId": { + "description": "Optional. The organizational unit ID, if omitted, will return data for all organizational units.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+customer}/reports:countChromeDevicesReachingAutoExpirationDate", + "response": { + "$ref": "GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.reports.readonly" + ] + }, + "countChromeDevicesThatNeedAttention": { + "description": "Counts of ChromeOS devices that have not synced policies or have lacked user activity in the past 28 days, are out of date, or are not complaint. Further information can be found here https://support.google.com/chrome/a/answer/10564947", + "flatPath": "v1/customers/{customersId}/reports:countChromeDevicesThatNeedAttention", + "httpMethod": "GET", + "id": "chromemanagement.customers.reports.countChromeDevicesThatNeedAttention", + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Required. The customer ID or \"my_customer\" prefixed with \"customers/\".", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + }, + "orgUnitId": { + "description": "Optional. The ID of the organizational unit. If omitted, all data will be returned.", + "location": "query", + "type": "string" + }, + "readMask": { + "description": "Required. Mask of the fields that should be populated in the returned report.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+customer}/reports:countChromeDevicesThatNeedAttention", + "response": { + "$ref": "GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.reports.readonly" + ] + }, "countChromeVersions": { "description": "Generate report of installed Chrome versions.", "flatPath": "v1/customers/{customersId}/reports:countChromeVersions", @@ -519,7 +595,7 @@ } } }, - "revision": "20220708", + "revision": "20220711", "rootUrl": "https://chromemanagement.googleapis.com/", "schemas": { "GoogleChromeManagementV1AndroidAppInfo": { @@ -1087,6 +1163,52 @@ }, "type": "object" }, + "GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateResponse": { + "description": "Response containing a list of devices expiring in each month of a selected time frame. Counts are grouped by model and Auto Update Expiration date.", + "id": "GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateResponse", + "properties": { + "deviceAueCountReports": { + "description": "The list of reports sorted by auto update expiration date in ascending order.", + "items": { + "$ref": "GoogleChromeManagementV1DeviceAueCountReport" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse": { + "description": "Response containing counts for devices that need attention.", + "id": "GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse", + "properties": { + "noRecentPolicySyncCount": { + "description": "Number of ChromeOS devices have not synced policies in the past 28 days.", + "format": "int64", + "type": "string" + }, + "noRecentUserActivityCount": { + "description": "Number of ChromeOS devices that have not seen any user activity in the past 28 days.", + "format": "int64", + "type": "string" + }, + "osVersionNotCompliantCount": { + "description": "Number of devices whose OS version is not compliant.", + "format": "int64", + "type": "string" + }, + "pendingUpdate": { + "description": "Number of devices that are pending an OS update.", + "format": "int64", + "type": "string" + }, + "unsupportedPolicyCount": { + "description": "Number of devices that are unable to apply a policy due to an OS version mismatch.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleChromeManagementV1CountChromeVersionsResponse": { "description": "Response containing requested browser versions details and counts.", "id": "GoogleChromeManagementV1CountChromeVersionsResponse", @@ -1242,6 +1364,65 @@ }, "type": "object" }, + "GoogleChromeManagementV1DeviceAueCountReport": { + "description": "Report for CountChromeDevicesPerAueDateResponse, contains the count of devices of a specific model and auto update expiration range.", + "id": "GoogleChromeManagementV1DeviceAueCountReport", + "properties": { + "aueMonth": { + "description": "Enum value of month corresponding to the auto update expiration date in UTC time zone. If the device is already expired, this field is empty.", + "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" + }, + "aueYear": { + "description": "Int value of year corresponding to the Auto Update Expiration date in UTC time zone. If the device is already expired, this field is empty.", + "format": "int64", + "type": "string" + }, + "count": { + "description": "Count of devices of this model.", + "format": "int64", + "type": "string" + }, + "expired": { + "description": "Boolean value for whether or not the device has already expired.", + "type": "boolean" + }, + "model": { + "description": "Public model name of the devices.", + "type": "string" + } + }, + "type": "object" + }, "GoogleChromeManagementV1DiskInfo": { "description": "Status of the single storage device.", "id": "GoogleChromeManagementV1DiskInfo", diff --git a/chromemanagement/v1/chromemanagement-gen.go b/chromemanagement/v1/chromemanagement-gen.go index c81fdff7a57..3c1ccf9966c 100644 --- a/chromemanagement/v1/chromemanagement-gen.go +++ b/chromemanagement/v1/chromemanagement-gen.go @@ -909,6 +909,95 @@ func (s *GoogleChromeManagementV1CountChromeAppRequestsResponse) MarshalJSON() ( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateRe +// sponse: Response containing a list of devices expiring in each month +// of a selected time frame. Counts are grouped by model and Auto Update +// Expiration date. +type GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateResponse struct { + // DeviceAueCountReports: The list of reports sorted by auto update + // expiration date in ascending order. + DeviceAueCountReports []*GoogleChromeManagementV1DeviceAueCountReport `json:"deviceAueCountReports,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "DeviceAueCountReports") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceAueCountReports") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse: +// Response containing counts for devices that need attention. +type GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse struct { + // NoRecentPolicySyncCount: Number of ChromeOS devices have not synced + // policies in the past 28 days. + NoRecentPolicySyncCount int64 `json:"noRecentPolicySyncCount,omitempty,string"` + + // NoRecentUserActivityCount: Number of ChromeOS devices that have not + // seen any user activity in the past 28 days. + NoRecentUserActivityCount int64 `json:"noRecentUserActivityCount,omitempty,string"` + + // OsVersionNotCompliantCount: Number of devices whose OS version is not + // compliant. + OsVersionNotCompliantCount int64 `json:"osVersionNotCompliantCount,omitempty,string"` + + // PendingUpdate: Number of devices that are pending an OS update. + PendingUpdate int64 `json:"pendingUpdate,omitempty,string"` + + // UnsupportedPolicyCount: Number of devices that are unable to apply a + // policy due to an OS version mismatch. + UnsupportedPolicyCount int64 `json:"unsupportedPolicyCount,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "NoRecentPolicySyncCount") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NoRecentPolicySyncCount") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1CountChromeVersionsResponse: Response // containing requested browser versions details and counts. type GoogleChromeManagementV1CountChromeVersionsResponse struct { @@ -1144,6 +1233,68 @@ func (s *GoogleChromeManagementV1Device) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromeManagementV1DeviceAueCountReport: Report for +// CountChromeDevicesPerAueDateResponse, contains the count of devices +// of a specific model and auto update expiration range. +type GoogleChromeManagementV1DeviceAueCountReport struct { + // AueMonth: Enum value of month corresponding to the auto update + // expiration date in UTC time zone. If the device is already expired, + // this field is empty. + // + // 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. + AueMonth string `json:"aueMonth,omitempty"` + + // AueYear: Int value of year corresponding to the Auto Update + // Expiration date in UTC time zone. If the device is already expired, + // this field is empty. + AueYear int64 `json:"aueYear,omitempty,string"` + + // Count: Count of devices of this model. + Count int64 `json:"count,omitempty,string"` + + // Expired: Boolean value for whether or not the device has already + // expired. + Expired bool `json:"expired,omitempty"` + + // Model: Public model name of the devices. + Model string `json:"model,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AueMonth") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AueMonth") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromeManagementV1DeviceAueCountReport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromeManagementV1DeviceAueCountReport + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromeManagementV1DiskInfo: Status of the single storage // device. type GoogleChromeManagementV1DiskInfo struct { @@ -3007,6 +3158,378 @@ func (c *CustomersAppsWebGetCall) Do(opts ...googleapi.CallOption) (*GoogleChrom } +// method id "chromemanagement.customers.reports.countChromeDevicesReachingAutoExpirationDate": + +type CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CountChromeDevicesReachingAutoExpirationDate: Generate report of the +// number of devices expiring in each month of the selected time frame. +// Devices are grouped by auto update expiration date and model. Further +// information can be found here +// (https://support.google.com/chrome/a/answer/10564947). +// +// - customer: The customer ID or "my_customer" prefixed with +// "customers/". +func (r *CustomersReportsService) CountChromeDevicesReachingAutoExpirationDate(customer string) *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall { + c := &CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// MaxAueDate sets the optional parameter "maxAueDate": Maximum +// expiration date in format yyyy-mm-dd in UTC timezone. If included +// returns all devices that have already expired and devices with auto +// expiration date equal to or earlier than the maximum date. +func (c *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall) MaxAueDate(maxAueDate string) *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall { + c.urlParams_.Set("maxAueDate", maxAueDate) + return c +} + +// MinAueDate sets the optional parameter "minAueDate": Maximum +// expiration date in format yyyy-mm-dd in UTC timezone. If included +// returns all devices that have already expired and devices with auto +// expiration date equal to or later than the minimum date. +func (c *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall) MinAueDate(minAueDate string) *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall { + c.urlParams_.Set("minAueDate", minAueDate) + return c +} + +// OrgUnitId sets the optional parameter "orgUnitId": The organizational +// unit ID, if omitted, will return data for all organizational units. +func (c *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall) OrgUnitId(orgUnitId string) *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall { + c.urlParams_.Set("orgUnitId", orgUnitId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall) Fields(s ...googleapi.Field) *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall) IfNoneMatch(entityTag string) *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall) Context(ctx context.Context) *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/reports:countChromeDevicesReachingAutoExpirationDate") + 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{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromemanagement.customers.reports.countChromeDevicesReachingAutoExpirationDate" call. +// Exactly one of +// *GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateR +// esponse or error will be non-nil. Any non-2xx status code is an +// error. Response headers are in either +// *GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateR +// esponse.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *CustomersReportsCountChromeDevicesReachingAutoExpirationDateCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Generate report of the number of devices expiring in each month of the selected time frame. Devices are grouped by auto update expiration date and model. Further information can be found [here](https://support.google.com/chrome/a/answer/10564947).", + // "flatPath": "v1/customers/{customersId}/reports:countChromeDevicesReachingAutoExpirationDate", + // "httpMethod": "GET", + // "id": "chromemanagement.customers.reports.countChromeDevicesReachingAutoExpirationDate", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Required. The customer ID or \"my_customer\" prefixed with \"customers/\".", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "maxAueDate": { + // "description": "Optional. Maximum expiration date in format yyyy-mm-dd in UTC timezone. If included returns all devices that have already expired and devices with auto expiration date equal to or earlier than the maximum date.", + // "location": "query", + // "type": "string" + // }, + // "minAueDate": { + // "description": "Optional. Maximum expiration date in format yyyy-mm-dd in UTC timezone. If included returns all devices that have already expired and devices with auto expiration date equal to or later than the minimum date.", + // "location": "query", + // "type": "string" + // }, + // "orgUnitId": { + // "description": "Optional. The organizational unit ID, if omitted, will return data for all organizational units.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+customer}/reports:countChromeDevicesReachingAutoExpirationDate", + // "response": { + // "$ref": "GoogleChromeManagementV1CountChromeDevicesReachingAutoExpirationDateResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chrome.management.reports.readonly" + // ] + // } + +} + +// method id "chromemanagement.customers.reports.countChromeDevicesThatNeedAttention": + +type CustomersReportsCountChromeDevicesThatNeedAttentionCall struct { + s *Service + customer string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CountChromeDevicesThatNeedAttention: Counts of ChromeOS devices that +// have not synced policies or have lacked user activity in the past 28 +// days, are out of date, or are not complaint. Further information can +// be found here https://support.google.com/chrome/a/answer/10564947 +// +// - customer: The customer ID or "my_customer" prefixed with +// "customers/". +func (r *CustomersReportsService) CountChromeDevicesThatNeedAttention(customer string) *CustomersReportsCountChromeDevicesThatNeedAttentionCall { + c := &CustomersReportsCountChromeDevicesThatNeedAttentionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + return c +} + +// OrgUnitId sets the optional parameter "orgUnitId": The ID of the +// organizational unit. If omitted, all data will be returned. +func (c *CustomersReportsCountChromeDevicesThatNeedAttentionCall) OrgUnitId(orgUnitId string) *CustomersReportsCountChromeDevicesThatNeedAttentionCall { + c.urlParams_.Set("orgUnitId", orgUnitId) + return c +} + +// ReadMask sets the optional parameter "readMask": Required. Mask of +// the fields that should be populated in the returned report. +func (c *CustomersReportsCountChromeDevicesThatNeedAttentionCall) ReadMask(readMask string) *CustomersReportsCountChromeDevicesThatNeedAttentionCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CustomersReportsCountChromeDevicesThatNeedAttentionCall) Fields(s ...googleapi.Field) *CustomersReportsCountChromeDevicesThatNeedAttentionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CustomersReportsCountChromeDevicesThatNeedAttentionCall) IfNoneMatch(entityTag string) *CustomersReportsCountChromeDevicesThatNeedAttentionCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CustomersReportsCountChromeDevicesThatNeedAttentionCall) Context(ctx context.Context) *CustomersReportsCountChromeDevicesThatNeedAttentionCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CustomersReportsCountChromeDevicesThatNeedAttentionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CustomersReportsCountChromeDevicesThatNeedAttentionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/reports:countChromeDevicesThatNeedAttention") + 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{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromemanagement.customers.reports.countChromeDevicesThatNeedAttention" call. +// Exactly one of +// *GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse.S +// erverResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *CustomersReportsCountChromeDevicesThatNeedAttentionCall) Do(opts ...googleapi.CallOption) (*GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Counts of ChromeOS devices that have not synced policies or have lacked user activity in the past 28 days, are out of date, or are not complaint. Further information can be found here https://support.google.com/chrome/a/answer/10564947", + // "flatPath": "v1/customers/{customersId}/reports:countChromeDevicesThatNeedAttention", + // "httpMethod": "GET", + // "id": "chromemanagement.customers.reports.countChromeDevicesThatNeedAttention", + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Required. The customer ID or \"my_customer\" prefixed with \"customers/\".", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "orgUnitId": { + // "description": "Optional. The ID of the organizational unit. If omitted, all data will be returned.", + // "location": "query", + // "type": "string" + // }, + // "readMask": { + // "description": "Required. Mask of the fields that should be populated in the returned report.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+customer}/reports:countChromeDevicesThatNeedAttention", + // "response": { + // "$ref": "GoogleChromeManagementV1CountChromeDevicesThatNeedAttentionResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chrome.management.reports.readonly" + // ] + // } + +} + // method id "chromemanagement.customers.reports.countChromeVersions": type CustomersReportsCountChromeVersionsCall struct { diff --git a/cloudsearch/v1/cloudsearch-api.json b/cloudsearch/v1/cloudsearch-api.json index 50e341e13a0..e6222dcba80 100644 --- a/cloudsearch/v1/cloudsearch-api.json +++ b/cloudsearch/v1/cloudsearch-api.json @@ -1994,7 +1994,7 @@ } } }, - "revision": "20220613", + "revision": "20220703", "rootUrl": "https://cloudsearch.googleapis.com/", "schemas": { "AclInfo": { @@ -4149,6 +4149,13 @@ "freshnessOptions": { "$ref": "FreshnessOptions", "description": "The freshness options for an object." + }, + "suggestionFilteringOperators": { + "description": "Operators that can be used to filter suggestions. For Suggest API, only operators mentioned here will be honored in the FilterOptions. Only TEXT and ENUM operators are supported. NOTE: \"objecttype\", \"type\" and \"mimetype\" are already supported. This property is to configure schema specific operators. Even though this is an array, only one operator can be specified. This is an array for future extensibility. Operators mapping to multiple properties within the same object are not supported. If the operator spans across different object types, this option has to be set once for each object definition.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/cloudsearch/v1/cloudsearch-gen.go b/cloudsearch/v1/cloudsearch-gen.go index a94be26fd1b..6a9fefcd46a 100644 --- a/cloudsearch/v1/cloudsearch-gen.go +++ b/cloudsearch/v1/cloudsearch-gen.go @@ -4439,6 +4439,18 @@ type ObjectOptions struct { // FreshnessOptions: The freshness options for an object. FreshnessOptions *FreshnessOptions `json:"freshnessOptions,omitempty"` + // SuggestionFilteringOperators: Operators that can be used to filter + // suggestions. For Suggest API, only operators mentioned here will be + // honored in the FilterOptions. Only TEXT and ENUM operators are + // supported. NOTE: "objecttype", "type" and "mimetype" are already + // supported. This property is to configure schema specific operators. + // Even though this is an array, only one operator can be specified. + // This is an array for future extensibility. Operators mapping to + // multiple properties within the same object are not supported. If the + // operator spans across different object types, this option has to be + // set once for each object definition. + SuggestionFilteringOperators []string `json:"suggestionFilteringOperators,omitempty"` + // ForceSendFields is a list of field names (e.g. "DisplayOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 11f12610392..3e55121240b 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -436,7 +436,7 @@ "type": "string" }, "updateMask": { - "description": "Field mask is used to specify the fields to be overwritten in the Connection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the Connection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1055,7 +1055,7 @@ } } }, - "revision": "20220616", + "revision": "20220707", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -1186,6 +1186,24 @@ }, "type": "object" }, + "AuthorizationCodeLink": { + "description": "This configuration captures the details required to render an authorization link for the OAuth Authorization Code Flow.", + "id": "AuthorizationCodeLink", + "properties": { + "scopes": { + "description": "The scopes for which the user will authorize GCP Connectors on the connector data source.", + "items": { + "type": "string" + }, + "type": "array" + }, + "uri": { + "description": "The base URI the user must click to trigger the authorization code login flow.", + "type": "string" + } + }, + "type": "object" + }, "Binding": { "description": "Associates `members`, or principals, with a `role`.", "id": "Binding", @@ -1246,6 +1264,10 @@ "description": "ConfigVariableTemplate provides metadata about a `ConfigVariable` that is used in a Connection.", "id": "ConfigVariableTemplate", "properties": { + "authorizationCodeLink": { + "$ref": "AuthorizationCodeLink", + "description": "Authorization code link options. To be populated if `ValueType` is `AUTHORIZATION_CODE`" + }, "description": { "description": "Description.", "type": "string" @@ -1285,7 +1307,8 @@ "INT", "BOOL", "SECRET", - "ENUM" + "ENUM", + "AUTHORIZATION_CODE" ], "enumDescriptions": [ "Value type is not specified.", @@ -1293,7 +1316,8 @@ "Value type is integer.", "Value type is boolean.", "Value type is secret.", - "Value type is enum." + "Value type is enum.", + "Value type is authorization code." ], "type": "string" } @@ -1329,14 +1353,6 @@ "description": "Optional. Description of the resource.", "type": "string" }, - "egressBackends": { - "description": "Output only. Outbound domains/hosts needs to be allowlisted.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, "envoyImageLocation": { "description": "Output only. GCR location where the envoy image is stored. formatted like: gcr.io/{bucketName}/{imageName}", "readOnly": true, @@ -2782,6 +2798,10 @@ "$ref": "Secret", "description": "SSH Client Cert. It should contain both public and private key." }, + "sshClientCertPass": { + "$ref": "Secret", + "description": "Password (passphrase) for ssh client certificate if it has one." + }, "username": { "description": "The user account used to authenticate.", "type": "string" diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 6029fa5c72e..1869a97b316 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -458,6 +458,41 @@ func (s *AuthConfigTemplate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AuthorizationCodeLink: This configuration captures the details +// required to render an authorization link for the OAuth Authorization +// Code Flow. +type AuthorizationCodeLink struct { + // Scopes: The scopes for which the user will authorize GCP Connectors + // on the connector data source. + Scopes []string `json:"scopes,omitempty"` + + // Uri: The base URI the user must click to trigger the authorization + // code login flow. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Scopes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Scopes") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AuthorizationCodeLink) MarshalJSON() ([]byte, error) { + type NoMethod AuthorizationCodeLink + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members`, or principals, with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. If the @@ -580,6 +615,10 @@ func (s *ConfigVariable) MarshalJSON() ([]byte, error) { // ConfigVariableTemplate: ConfigVariableTemplate provides metadata // about a `ConfigVariable` that is used in a Connection. type ConfigVariableTemplate struct { + // AuthorizationCodeLink: Authorization code link options. To be + // populated if `ValueType` is `AUTHORIZATION_CODE` + AuthorizationCodeLink *AuthorizationCodeLink `json:"authorizationCodeLink,omitempty"` + // Description: Description. Description string `json:"description,omitempty"` @@ -613,22 +652,25 @@ type ConfigVariableTemplate struct { // "BOOL" - Value type is boolean. // "SECRET" - Value type is secret. // "ENUM" - Value type is enum. + // "AUTHORIZATION_CODE" - Value type is authorization code. ValueType string `json:"valueType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AuthorizationCodeLink") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AuthorizationCodeLink") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -659,10 +701,6 @@ type Connection struct { // Description: Optional. Description of the resource. Description string `json:"description,omitempty"` - // EgressBackends: Output only. Outbound domains/hosts needs to be - // allowlisted. - EgressBackends []string `json:"egressBackends,omitempty"` - // EnvoyImageLocation: Output only. GCR location where the envoy image // is stored. formatted like: gcr.io/{bucketName}/{imageName} EnvoyImageLocation string `json:"envoyImageLocation,omitempty"` @@ -2590,6 +2628,10 @@ type SshPublicKey struct { // private key. SshClientCert *Secret `json:"sshClientCert,omitempty"` + // SshClientCertPass: Password (passphrase) for ssh client certificate + // if it has one. + SshClientCertPass *Secret `json:"sshClientCertPass,omitempty"` + // Username: The user account used to authenticate. Username string `json:"username,omitempty"` @@ -4353,12 +4395,12 @@ func (r *ProjectsLocationsConnectionsService) Patch(name string, connection *Con return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is -// used to specify the fields to be overwritten in the Connection -// resource by the update. The fields specified in the update_mask are -// relative to the resource, not the full request. A field will be -// overwritten if it is in the mask. If the user does not provide a mask -// then all fields will be overwritten. +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// Connection resource by the update. The fields specified in the +// update_mask are relative to the resource, not the full request. A +// field will be overwritten if it is in the mask. If the user does not +// provide a mask then all fields will be overwritten. func (c *ProjectsLocationsConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -4471,7 +4513,7 @@ func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "updateMask": { - // "description": "Field mask is used to specify the fields to be overwritten in the Connection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", + // "description": "Required. Field mask is used to specify the fields to be overwritten in the Connection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/containeranalysis/v1/containeranalysis-api.json b/containeranalysis/v1/containeranalysis-api.json index 503e17cda74..bd1b806425e 100644 --- a/containeranalysis/v1/containeranalysis-api.json +++ b/containeranalysis/v1/containeranalysis-api.json @@ -755,7 +755,7 @@ } } }, - "revision": "20220602", + "revision": "20220707", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { @@ -785,6 +785,19 @@ }, "type": "object" }, + "AnalysisCompleted": { + "description": "Indicates which analysis completed successfully. Multiple types of analysis can be performed on a single resource.", + "id": "AnalysisCompleted", + "properties": { + "analysisType": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Artifact": { "description": "Artifact describes a build product.", "id": "Artifact", @@ -2710,6 +2723,16 @@ "description": "Provides information about the analysis status of a discovered resource.", "id": "DiscoveryOccurrence", "properties": { + "analysisCompleted": { + "$ref": "AnalysisCompleted" + }, + "analysisError": { + "description": "Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.", + "items": { + "$ref": "Status" + }, + "type": "array" + }, "analysisStatus": { "description": "The status of discovery for the resource.", "enum": [ @@ -2717,6 +2740,7 @@ "PENDING", "SCANNING", "FINISHED_SUCCESS", + "COMPLETE", "FINISHED_FAILED", "FINISHED_UNSUPPORTED" ], @@ -2725,8 +2749,9 @@ "Resource is known but no action has been taken yet.", "Resource is being analyzed.", "Analysis has finished successfully.", + "Analysis has completed", "Analysis has finished unsuccessfully, the analysis itself is in a bad state.", - "The resource is known not to be supported" + "The resource is known not to be supported." ], "type": "string" }, diff --git a/containeranalysis/v1/containeranalysis-gen.go b/containeranalysis/v1/containeranalysis-gen.go index d2131d449fe..a17f02d24f0 100644 --- a/containeranalysis/v1/containeranalysis-gen.go +++ b/containeranalysis/v1/containeranalysis-gen.go @@ -220,6 +220,34 @@ func (s *AliasContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AnalysisCompleted: Indicates which analysis completed successfully. +// Multiple types of analysis can be performed on a single resource. +type AnalysisCompleted struct { + AnalysisType []string `json:"analysisType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnalysisType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnalysisType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AnalysisCompleted) MarshalJSON() ([]byte, error) { + type NoMethod AnalysisCompleted + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Artifact: Artifact describes a build product. type Artifact struct { // Checksum: Hash or checksum value of a binary, or Docker Registry 2.0 @@ -2998,6 +3026,12 @@ func (s *DiscoveryNote) MarshalJSON() ([]byte, error) { // DiscoveryOccurrence: Provides information about the analysis status // of a discovered resource. type DiscoveryOccurrence struct { + AnalysisCompleted *AnalysisCompleted `json:"analysisCompleted,omitempty"` + + // AnalysisError: Indicates any errors encountered during analysis of a + // resource. There could be 0 or more of these errors. + AnalysisError []*Status `json:"analysisError,omitempty"` + // AnalysisStatus: The status of discovery for the resource. // // Possible values: @@ -3005,9 +3039,10 @@ type DiscoveryOccurrence struct { // "PENDING" - Resource is known but no action has been taken yet. // "SCANNING" - Resource is being analyzed. // "FINISHED_SUCCESS" - Analysis has finished successfully. + // "COMPLETE" - Analysis has completed // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the // analysis itself is in a bad state. - // "FINISHED_UNSUPPORTED" - The resource is known not to be supported + // "FINISHED_UNSUPPORTED" - The resource is known not to be supported. AnalysisStatus string `json:"analysisStatus,omitempty"` // AnalysisStatusError: When an error is encountered this will contain a @@ -3033,15 +3068,15 @@ type DiscoveryOccurrence struct { // LastScanTime: The last time this resource was scanned. LastScanTime string `json:"lastScanTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnalysisStatus") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AnalysisCompleted") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnalysisStatus") to + // NullFields is a list of field names (e.g. "AnalysisCompleted") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/containeranalysis/v1alpha1/containeranalysis-api.json b/containeranalysis/v1alpha1/containeranalysis-api.json index 9c1fc545c1e..055c16efaee 100644 --- a/containeranalysis/v1alpha1/containeranalysis-api.json +++ b/containeranalysis/v1alpha1/containeranalysis-api.json @@ -1229,7 +1229,7 @@ } } }, - "revision": "20220602", + "revision": "20220707", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "Artifact": { @@ -1803,6 +1803,10 @@ "description": "Describes the CIS benchmark version that is applicable to a given OS and os version.", "id": "ComplianceVersion", "properties": { + "benchmarkDocument": { + "description": "The name of the document that defines this benchmark, e.g. \"CIS Container-Optimized OS\".", + "type": "string" + }, "cpeUri": { "description": "The CPE URI (https://cpe.mitre.org/specification/) this benchmark is applicable to.", "type": "string" diff --git a/containeranalysis/v1alpha1/containeranalysis-gen.go b/containeranalysis/v1alpha1/containeranalysis-gen.go index 96a3716d670..be4ebba4914 100644 --- a/containeranalysis/v1alpha1/containeranalysis-gen.go +++ b/containeranalysis/v1alpha1/containeranalysis-gen.go @@ -1109,6 +1109,10 @@ func (s *ComplianceOccurrence) MarshalJSON() ([]byte, error) { // ComplianceVersion: Describes the CIS benchmark version that is // applicable to a given OS and os version. type ComplianceVersion struct { + // BenchmarkDocument: The name of the document that defines this + // benchmark, e.g. "CIS Container-Optimized OS". + BenchmarkDocument string `json:"benchmarkDocument,omitempty"` + // CpeUri: The CPE URI (https://cpe.mitre.org/specification/) this // benchmark is applicable to. CpeUri string `json:"cpeUri,omitempty"` @@ -1117,20 +1121,21 @@ type ComplianceVersion struct { // the OS-specific CIS document the benchmark is defined in. Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "CpeUri") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "BenchmarkDocument") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CpeUri") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BenchmarkDocument") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/containeranalysis/v1beta1/containeranalysis-api.json b/containeranalysis/v1beta1/containeranalysis-api.json index 58c8b488c95..28a541d8c8f 100644 --- a/containeranalysis/v1beta1/containeranalysis-api.json +++ b/containeranalysis/v1beta1/containeranalysis-api.json @@ -853,7 +853,7 @@ } } }, - "revision": "20220602", + "revision": "20220707", "rootUrl": "https://containeranalysis.googleapis.com/", "schemas": { "AliasContext": { @@ -883,6 +883,19 @@ }, "type": "object" }, + "AnalysisCompleted": { + "description": "Indicates which analysis completed successfully. Multiple types of analysis can be performed on a single resource.", + "id": "AnalysisCompleted", + "properties": { + "analysisType": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "Artifact": { "description": "Artifact describes a build product.", "id": "Artifact", @@ -2697,6 +2710,16 @@ "description": "Provides information about the analysis status of a discovered resource.", "id": "Discovered", "properties": { + "analysisCompleted": { + "$ref": "AnalysisCompleted" + }, + "analysisError": { + "description": "Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.", + "items": { + "$ref": "Status" + }, + "type": "array" + }, "analysisStatus": { "description": "The status of discovery for the resource.", "enum": [ @@ -2704,6 +2727,7 @@ "PENDING", "SCANNING", "FINISHED_SUCCESS", + "COMPLETE", "FINISHED_FAILED", "FINISHED_UNSUPPORTED" ], @@ -2712,6 +2736,7 @@ "Resource is known but no action has been taken yet.", "Resource is being analyzed.", "Analysis has finished successfully.", + "Analysis has completed.", "Analysis has finished unsuccessfully, the analysis itself is in a bad state.", "The resource is known not to be supported" ], diff --git a/containeranalysis/v1beta1/containeranalysis-gen.go b/containeranalysis/v1beta1/containeranalysis-gen.go index 25ae9107938..b58dea898b5 100644 --- a/containeranalysis/v1beta1/containeranalysis-gen.go +++ b/containeranalysis/v1beta1/containeranalysis-gen.go @@ -232,6 +232,34 @@ func (s *AliasContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AnalysisCompleted: Indicates which analysis completed successfully. +// Multiple types of analysis can be performed on a single resource. +type AnalysisCompleted struct { + AnalysisType []string `json:"analysisType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnalysisType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnalysisType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AnalysisCompleted) MarshalJSON() ([]byte, error) { + type NoMethod AnalysisCompleted + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Artifact: Artifact describes a build product. type Artifact struct { // Checksum: Hash or checksum value of a binary, or Docker Registry 2.0 @@ -2808,6 +2836,12 @@ func (s *Digest) MarshalJSON() ([]byte, error) { // Discovered: Provides information about the analysis status of a // discovered resource. type Discovered struct { + AnalysisCompleted *AnalysisCompleted `json:"analysisCompleted,omitempty"` + + // AnalysisError: Indicates any errors encountered during analysis of a + // resource. There could be 0 or more of these errors. + AnalysisError []*Status `json:"analysisError,omitempty"` + // AnalysisStatus: The status of discovery for the resource. // // Possible values: @@ -2815,6 +2849,7 @@ type Discovered struct { // "PENDING" - Resource is known but no action has been taken yet. // "SCANNING" - Resource is being analyzed. // "FINISHED_SUCCESS" - Analysis has finished successfully. + // "COMPLETE" - Analysis has completed. // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the // analysis itself is in a bad state. // "FINISHED_UNSUPPORTED" - The resource is known not to be supported @@ -2837,15 +2872,15 @@ type Discovered struct { // resource. Deprecated, do not use. LastAnalysisTime string `json:"lastAnalysisTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnalysisStatus") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AnalysisCompleted") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnalysisStatus") to + // NullFields is a list of field names (e.g. "AnalysisCompleted") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index ef6d1b0bf93..fb4d7d234ad 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -326,6 +326,46 @@ } } }, + "processorTypes": { + "methods": { + "list": { + "description": "Lists the processor types that exist.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/processorTypes", + "httpMethod": "GET", + "id": "documentai.projects.locations.processorTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of processor types to return. If unspecified, at most 100 processor types will be returned. The maximum value is 500; values above 500 will be coerced to 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Used to retrieve the next page of results, empty if at the end of the list.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location of processor type to list. The available processor types may depend on the allow-listing on projects. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/processorTypes", + "response": { + "$ref": "GoogleCloudDocumentaiV1ListProcessorTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "processors": { "methods": { "batchProcess": { @@ -1029,7 +1069,7 @@ } } }, - "revision": "20220610", + "revision": "20220711", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1606,6 +1646,25 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1Barcode": { + "description": "Encodes the detailed information of a barcode.", + "id": "GoogleCloudDocumentaiV1Barcode", + "properties": { + "format": { + "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "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" + }, "GoogleCloudDocumentaiV1BatchDocumentsInputConfig": { "description": "The common config to specify a set of documents used as input.", "id": "GoogleCloudDocumentaiV1BatchDocumentsInputConfig", @@ -2079,6 +2138,13 @@ }, "type": "array" }, + "detectedBarcodes": { + "description": "A list of detected barcodes.", + "items": { + "$ref": "GoogleCloudDocumentaiV1DocumentPageDetectedBarcode" + }, + "type": "array" + }, "detectedLanguages": { "description": "A list of detected languages together with confidence.", "items": { @@ -2251,6 +2317,21 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1DocumentPageDetectedBarcode": { + "description": "A detected barcode.", + "id": "GoogleCloudDocumentaiV1DocumentPageDetectedBarcode", + "properties": { + "barcode": { + "$ref": "GoogleCloudDocumentaiV1Barcode", + "description": "Detailed barcode information of the DetectedBarcode." + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1DocumentPageLayout", + "description": "Layout for DetectedBarcode." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1DocumentPageDetectedLanguage": { "description": "Detected language for a structural component.", "id": "GoogleCloudDocumentaiV1DocumentPageDetectedLanguage", @@ -2874,6 +2955,10 @@ "documentSplitter": { "description": "If true, a `document` entity type can be applied to subdocument ( splitting). Otherwise, it can only be applied to the entire document (classification).", "type": "boolean" + }, + "prefixedNamingOnProperties": { + "description": "If set, all the nested entities must be prefixed with the parents.", + "type": "boolean" } }, "type": "object" @@ -3118,6 +3203,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1ListProcessorTypesResponse": { + "description": "Response message for list processor types.", + "id": "GoogleCloudDocumentaiV1ListProcessorTypesResponse", + "properties": { + "nextPageToken": { + "description": "Points to the next page, otherwise empty.", + "type": "string" + }, + "processorTypes": { + "description": "The processor types.", + "items": { + "$ref": "GoogleCloudDocumentaiV1ProcessorType" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1ListProcessorVersionsResponse": { "description": "Response message for list processors.", "id": "GoogleCloudDocumentaiV1ListProcessorVersionsResponse", @@ -3629,6 +3732,25 @@ }, "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", @@ -3868,6 +3990,13 @@ }, "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": { @@ -4040,6 +4169,21 @@ }, "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", @@ -4819,6 +4963,25 @@ }, "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", @@ -5085,6 +5248,13 @@ }, "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": { @@ -5257,6 +5427,21 @@ }, "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", @@ -6647,7 +6832,7 @@ "type": "object" }, "GoogleTypePostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "GoogleTypePostalAddress", "properties": { "addressLines": { diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index 5083c7599b4..a1d29f00d4a 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -170,6 +170,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Operations = NewProjectsLocationsOperationsService(s) + rs.ProcessorTypes = NewProjectsLocationsProcessorTypesService(s) rs.Processors = NewProjectsLocationsProcessorsService(s) return rs } @@ -179,6 +180,8 @@ type ProjectsLocationsService struct { Operations *ProjectsLocationsOperationsService + ProcessorTypes *ProjectsLocationsProcessorTypesService + Processors *ProjectsLocationsProcessorsService } @@ -191,6 +194,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsProcessorTypesService(s *Service) *ProjectsLocationsProcessorTypesService { + rs := &ProjectsLocationsProcessorTypesService{s: s} + return rs +} + +type ProjectsLocationsProcessorTypesService struct { + s *Service +} + func NewProjectsLocationsProcessorsService(s *Service) *ProjectsLocationsProcessorsService { rs := &ProjectsLocationsProcessorsService{s: s} rs.HumanReviewConfig = NewProjectsLocationsProcessorsHumanReviewConfigService(s) @@ -1405,6 +1417,52 @@ func (s *GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata) Marsh return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1Barcode: Encodes the detailed information of a +// barcode. +type GoogleCloudDocumentaiV1Barcode struct { + // Format: Format of a barcode. The supported formats are: CODE_128: + // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: + // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. + // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. + // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D + // Aztec code type. DATABAR: GS1 DataBar code type. + Format 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1Barcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1Barcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1BatchDocumentsInputConfig: The common config // to specify a set of documents used as input. type GoogleCloudDocumentaiV1BatchDocumentsInputConfig struct { @@ -2155,6 +2213,9 @@ type GoogleCloudDocumentaiV1DocumentPage struct { // line-spacing and orientation. Blocks []*GoogleCloudDocumentaiV1DocumentPageBlock `json:"blocks,omitempty"` + // DetectedBarcodes: A list of detected barcodes. + DetectedBarcodes []*GoogleCloudDocumentaiV1DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` + // DetectedLanguages: A list of detected languages together with // confidence. DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` @@ -2369,6 +2430,38 @@ func (s *GoogleCloudDocumentaiV1DocumentPageBlock) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1DocumentPageDetectedBarcode: A detected +// barcode. +type GoogleCloudDocumentaiV1DocumentPageDetectedBarcode struct { + // Barcode: Detailed barcode information of the DetectedBarcode. + Barcode *GoogleCloudDocumentaiV1Barcode `json:"barcode,omitempty"` + + // Layout: Layout for DetectedBarcode. + Layout *GoogleCloudDocumentaiV1DocumentPageLayout `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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1DocumentPageDetectedBarcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1DocumentPageDetectedLanguage struct { @@ -3359,6 +3452,10 @@ type GoogleCloudDocumentaiV1DocumentSchemaMetadata struct { // entire document (classification). DocumentSplitter bool `json:"documentSplitter,omitempty"` + // PrefixedNamingOnProperties: If set, all the nested entities must be + // prefixed with the parents. + PrefixedNamingOnProperties bool `json:"prefixedNamingOnProperties,omitempty"` + // ForceSendFields is a list of field names (e.g. // "DocumentAllowMultipleLabels") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -3847,6 +3944,42 @@ func (s *GoogleCloudDocumentaiV1HumanReviewStatus) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1ListProcessorTypesResponse: Response message +// for list processor types. +type GoogleCloudDocumentaiV1ListProcessorTypesResponse struct { + // NextPageToken: Points to the next page, otherwise empty. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ProcessorTypes: The processor types. + ProcessorTypes []*GoogleCloudDocumentaiV1ProcessorType `json:"processorTypes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1ListProcessorTypesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1ListProcessorTypesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1ListProcessorVersionsResponse: Response // message for list processors. type GoogleCloudDocumentaiV1ListProcessorVersionsResponse struct { @@ -4729,6 +4862,52 @@ func (s *GoogleCloudDocumentaiV1alpha1CommonOperationMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1Barcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1Barcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse: Response // to an batch document processing request. This is returned in the LRO // Operation after the operation is complete. @@ -5083,6 +5262,9 @@ type GoogleCloudDocumentaiV1beta1DocumentPage struct { // 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"` @@ -5297,6 +5479,38 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageBlock) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { @@ -6650,6 +6864,52 @@ func (s *GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2Barcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2Barcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse: Response // to an batch document processing request. This is returned in the LRO // Operation after the operation is complete. @@ -7062,6 +7322,9 @@ type GoogleCloudDocumentaiV1beta2DocumentPage struct { // 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"` @@ -7276,6 +7539,38 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageBlock) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { @@ -9722,11 +10017,12 @@ func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { // not intended to model geographical locations (roads, towns, // mountains). In typical usage an address would be created via user // input or from importing existing data, depending on the type of -// process. Advice on address input / editing: - Use an i18n-ready -// address widget such as https://github.com/google/libaddressinput) - -// Users should not be presented with UI elements for input or editing -// of fields outside countries where that field is used. For more -// guidance on how to use this schema, please see: +// process. Advice on address input / editing: - Use an +// internationalization-ready address widget such as +// https://github.com/google/libaddressinput) - Users should not be +// presented with UI elements for input or editing of fields outside +// countries where that field is used. For more guidance on how to use +// this schema, please see: // https://support.google.com/business/answer/6397478 type GoogleTypePostalAddress struct { // AddressLines: Unstructured address lines describing the lower levels @@ -11016,6 +11312,204 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } +// method id "documentai.projects.locations.processorTypes.list": + +type ProjectsLocationsProcessorTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the processor types that exist. +// +// - parent: The location of processor type to list. The available +// processor types may depend on the allow-listing on projects. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsProcessorTypesService) List(parent string) *ProjectsLocationsProcessorTypesListCall { + c := &ProjectsLocationsProcessorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of processor types to return. If unspecified, at most 100 processor +// types will be returned. The maximum value is 500; values above 500 +// will be coerced to 500. +func (c *ProjectsLocationsProcessorTypesListCall) PageSize(pageSize int64) *ProjectsLocationsProcessorTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Used to retrieve +// the next page of results, empty if at the end of the list. +func (c *ProjectsLocationsProcessorTypesListCall) PageToken(pageToken string) *ProjectsLocationsProcessorTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsProcessorTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorTypesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsProcessorTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsProcessorTypesListCall) Context(ctx context.Context) *ProjectsLocationsProcessorTypesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsProcessorTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsProcessorTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/processorTypes") + 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 "documentai.projects.locations.processorTypes.list" call. +// Exactly one of *GoogleCloudDocumentaiV1ListProcessorTypesResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDocumentaiV1ListProcessorTypesResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsProcessorTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1ListProcessorTypesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudDocumentaiV1ListProcessorTypesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the processor types that exist.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/processorTypes", + // "httpMethod": "GET", + // "id": "documentai.projects.locations.processorTypes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of processor types to return. If unspecified, at most 100 processor types will be returned. The maximum value is 500; values above 500 will be coerced to 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Used to retrieve the next page of results, empty if at the end of the list.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The location of processor type to list. The available processor types may depend on the allow-listing on projects. Format: `projects/{project}/locations/{location}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/processorTypes", + // "response": { + // "$ref": "GoogleCloudDocumentaiV1ListProcessorTypesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsProcessorTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDocumentaiV1ListProcessorTypesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "documentai.projects.locations.processors.batchProcess": type ProjectsLocationsProcessorsBatchProcessCall struct { diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index f32b5471b8a..da82b627b25 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20220610", + "revision": "20220711", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1233,6 +1233,25 @@ }, "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", @@ -1472,6 +1491,13 @@ }, "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": { @@ -1644,6 +1670,21 @@ }, "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", @@ -2434,6 +2475,25 @@ }, "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" + }, "GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest": { "description": "Request to batch process documents as an asynchronous operation. The output is written to Cloud Storage as JSON in the [Document] format.", "id": "GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest", @@ -2714,6 +2774,13 @@ }, "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": { @@ -2886,6 +2953,21 @@ }, "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", @@ -4363,7 +4445,7 @@ "type": "object" }, "GoogleTypePostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "GoogleTypePostalAddress", "properties": { "addressLines": { diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 9aa51ec6d7d..11a45e9b970 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -1936,6 +1936,52 @@ func (s *GoogleCloudDocumentaiV1alpha1CommonOperationMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1Barcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1Barcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse: Response // to an batch document processing request. This is returned in the LRO // Operation after the operation is complete. @@ -2290,6 +2336,9 @@ type GoogleCloudDocumentaiV1beta1DocumentPage struct { // 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"` @@ -2504,6 +2553,38 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageBlock) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { @@ -3887,6 +3968,52 @@ func (s *GoogleCloudDocumentaiV1beta2AutoMlParams) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2Barcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2Barcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest: Request to // batch process documents as an asynchronous operation. The output is // written to Cloud Storage as JSON in the [Document] format. @@ -4333,6 +4460,9 @@ type GoogleCloudDocumentaiV1beta2DocumentPage struct { // 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"` @@ -4547,6 +4677,38 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageBlock) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { @@ -7152,11 +7314,12 @@ func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { // not intended to model geographical locations (roads, towns, // mountains). In typical usage an address would be created via user // input or from importing existing data, depending on the type of -// process. Advice on address input / editing: - Use an i18n-ready -// address widget such as https://github.com/google/libaddressinput) - -// Users should not be presented with UI elements for input or editing -// of fields outside countries where that field is used. For more -// guidance on how to use this schema, please see: +// process. Advice on address input / editing: - Use an +// internationalization-ready address widget such as +// https://github.com/google/libaddressinput) - Users should not be +// presented with UI elements for input or editing of fields outside +// countries where that field is used. For more guidance on how to use +// this schema, please see: // https://support.google.com/business/answer/6397478 type GoogleTypePostalAddress struct { // AddressLines: Unstructured address lines describing the lower levels diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index b009136a8db..2c846a664b2 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -297,6 +297,46 @@ } } }, + "processorTypes": { + "methods": { + "list": { + "description": "Lists the processor types that exist.", + "flatPath": "v1beta3/projects/{projectsId}/locations/{locationsId}/processorTypes", + "httpMethod": "GET", + "id": "documentai.projects.locations.processorTypes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of processor types to return. If unspecified, at most 100 processor types will be returned. The maximum value is 500; values above 500 will be coerced to 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Used to retrieve the next page of results, empty if at the end of the list.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The location of processor type to list. The available processor types may depend on the allow-listing on projects. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta3/{+parent}/processorTypes", + "response": { + "$ref": "GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "processors": { "methods": { "batchProcess": { @@ -796,7 +836,7 @@ } } }, - "revision": "20220610", + "revision": "20220711", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1737,6 +1777,25 @@ }, "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", @@ -1976,6 +2035,13 @@ }, "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": { @@ -2148,6 +2214,21 @@ }, "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", @@ -2927,6 +3008,25 @@ }, "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", @@ -3193,6 +3293,13 @@ }, "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": { @@ -3365,6 +3472,21 @@ }, "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", @@ -4149,6 +4271,25 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3Barcode": { + "description": "Encodes the detailed information of a barcode.", + "id": "GoogleCloudDocumentaiV1beta3Barcode", + "properties": { + "format": { + "description": "Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1 DataBar code type.", + "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" + }, "GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig": { "description": "The common config to specify a set of documents used as input.", "id": "GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig", @@ -4663,6 +4804,13 @@ }, "type": "array" }, + "detectedBarcodes": { + "description": "A list of detected barcodes.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentPageDetectedBarcode" + }, + "type": "array" + }, "detectedLanguages": { "description": "A list of detected languages together with confidence.", "items": { @@ -4835,6 +4983,21 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3DocumentPageDetectedBarcode": { + "description": "A detected barcode.", + "id": "GoogleCloudDocumentaiV1beta3DocumentPageDetectedBarcode", + "properties": { + "barcode": { + "$ref": "GoogleCloudDocumentaiV1beta3Barcode", + "description": "Detailed barcode information of the DetectedBarcode." + }, + "layout": { + "$ref": "GoogleCloudDocumentaiV1beta3DocumentPageLayout", + "description": "Layout for DetectedBarcode." + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage": { "description": "Detected language for a structural component.", "id": "GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage", @@ -5458,6 +5621,10 @@ "documentSplitter": { "description": "If true, a `document` entity type can be applied to subdocument ( splitting). Otherwise, it can only be applied to the entire document (classification).", "type": "boolean" + }, + "prefixedNamingOnProperties": { + "description": "If set, all the nested entities must be prefixed with the parents.", + "type": "boolean" } }, "type": "object" @@ -5702,6 +5869,24 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse": { + "description": "Response message for list processor types.", + "id": "GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse", + "properties": { + "nextPageToken": { + "description": "Points to the next page, otherwise empty.", + "type": "string" + }, + "processorTypes": { + "description": "The processor types.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta3ProcessorType" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3ListProcessorVersionsResponse": { "description": "Response message for list processors.", "id": "GoogleCloudDocumentaiV1beta3ListProcessorVersionsResponse", @@ -6463,7 +6648,7 @@ "type": "object" }, "GoogleTypePostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "GoogleTypePostalAddress", "properties": { "addressLines": { diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 120547f1b4f..e82254b2d1d 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -152,6 +152,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Operations = NewProjectsLocationsOperationsService(s) + rs.ProcessorTypes = NewProjectsLocationsProcessorTypesService(s) rs.Processors = NewProjectsLocationsProcessorsService(s) return rs } @@ -161,6 +162,8 @@ type ProjectsLocationsService struct { Operations *ProjectsLocationsOperationsService + ProcessorTypes *ProjectsLocationsProcessorTypesService + Processors *ProjectsLocationsProcessorsService } @@ -173,6 +176,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsProcessorTypesService(s *Service) *ProjectsLocationsProcessorTypesService { + rs := &ProjectsLocationsProcessorTypesService{s: s} + return rs +} + +type ProjectsLocationsProcessorTypesService struct { + s *Service +} + func NewProjectsLocationsProcessorsService(s *Service) *ProjectsLocationsProcessorsService { rs := &ProjectsLocationsProcessorsService{s: s} rs.HumanReviewConfig = NewProjectsLocationsProcessorsHumanReviewConfigService(s) @@ -1936,6 +1948,52 @@ func (s *GoogleCloudDocumentaiV1alpha1CommonOperationMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1Barcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1Barcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse: Response // to an batch document processing request. This is returned in the LRO // Operation after the operation is complete. @@ -2290,6 +2348,9 @@ type GoogleCloudDocumentaiV1beta1DocumentPage struct { // 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"` @@ -2504,6 +2565,38 @@ func (s *GoogleCloudDocumentaiV1beta1DocumentPageBlock) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { @@ -3857,6 +3950,52 @@ func (s *GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2Barcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2Barcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse: Response // to an batch document processing request. This is returned in the LRO // Operation after the operation is complete. @@ -4269,6 +4408,9 @@ type GoogleCloudDocumentaiV1beta2DocumentPage struct { // 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"` @@ -4483,6 +4625,38 @@ func (s *GoogleCloudDocumentaiV1beta2DocumentPageBlock) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { @@ -5842,6 +6016,52 @@ func (s *GoogleCloudDocumentaiV1beta2Vertex) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3Barcode: Encodes the detailed information +// of a barcode. +type GoogleCloudDocumentaiV1beta3Barcode struct { + // Format: Format of a barcode. The supported formats are: CODE_128: + // Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: + // Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF: ITF type. + // EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. + // UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D + // Aztec code type. DATABAR: GS1 DataBar code type. + Format 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3Barcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3Barcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig: The common // config to specify a set of documents used as input. type GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig struct { @@ -6674,6 +6894,9 @@ type GoogleCloudDocumentaiV1beta3DocumentPage struct { // line-spacing and orientation. Blocks []*GoogleCloudDocumentaiV1beta3DocumentPageBlock `json:"blocks,omitempty"` + // DetectedBarcodes: A list of detected barcodes. + DetectedBarcodes []*GoogleCloudDocumentaiV1beta3DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` + // DetectedLanguages: A list of detected languages together with // confidence. DetectedLanguages []*GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` @@ -6888,6 +7111,38 @@ func (s *GoogleCloudDocumentaiV1beta3DocumentPageBlock) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3DocumentPageDetectedBarcode: A detected +// barcode. +type GoogleCloudDocumentaiV1beta3DocumentPageDetectedBarcode struct { + // Barcode: Detailed barcode information of the DetectedBarcode. + Barcode *GoogleCloudDocumentaiV1beta3Barcode `json:"barcode,omitempty"` + + // Layout: Layout for DetectedBarcode. + Layout *GoogleCloudDocumentaiV1beta3DocumentPageLayout `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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3DocumentPageDetectedBarcode + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage: Detected // language for a structural component. type GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage struct { @@ -7879,6 +8134,10 @@ type GoogleCloudDocumentaiV1beta3DocumentSchemaMetadata struct { // entire document (classification). DocumentSplitter bool `json:"documentSplitter,omitempty"` + // PrefixedNamingOnProperties: If set, all the nested entities must be + // prefixed with the parents. + PrefixedNamingOnProperties bool `json:"prefixedNamingOnProperties,omitempty"` + // ForceSendFields is a list of field names (e.g. // "DocumentAllowMultipleLabels") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -8368,6 +8627,42 @@ func (s *GoogleCloudDocumentaiV1beta3HumanReviewStatus) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse: Response +// message for list processor types. +type GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse struct { + // NextPageToken: Points to the next page, otherwise empty. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ProcessorTypes: The processor types. + ProcessorTypes []*GoogleCloudDocumentaiV1beta3ProcessorType `json:"processorTypes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3ListProcessorVersionsResponse: Response // message for list processors. type GoogleCloudDocumentaiV1beta3ListProcessorVersionsResponse struct { @@ -9739,11 +10034,12 @@ func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { // not intended to model geographical locations (roads, towns, // mountains). In typical usage an address would be created via user // input or from importing existing data, depending on the type of -// process. Advice on address input / editing: - Use an i18n-ready -// address widget such as https://github.com/google/libaddressinput) - -// Users should not be presented with UI elements for input or editing -// of fields outside countries where that field is used. For more -// guidance on how to use this schema, please see: +// process. Advice on address input / editing: - Use an +// internationalization-ready address widget such as +// https://github.com/google/libaddressinput) - Users should not be +// presented with UI elements for input or editing of fields outside +// countries where that field is used. For more guidance on how to use +// this schema, please see: // https://support.google.com/business/answer/6397478 type GoogleTypePostalAddress struct { // AddressLines: Unstructured address lines describing the lower levels @@ -10899,6 +11195,205 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } +// method id "documentai.projects.locations.processorTypes.list": + +type ProjectsLocationsProcessorTypesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the processor types that exist. +// +// - parent: The location of processor type to list. The available +// processor types may depend on the allow-listing on projects. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsProcessorTypesService) List(parent string) *ProjectsLocationsProcessorTypesListCall { + c := &ProjectsLocationsProcessorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of processor types to return. If unspecified, at most 100 processor +// types will be returned. The maximum value is 500; values above 500 +// will be coerced to 500. +func (c *ProjectsLocationsProcessorTypesListCall) PageSize(pageSize int64) *ProjectsLocationsProcessorTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Used to retrieve +// the next page of results, empty if at the end of the list. +func (c *ProjectsLocationsProcessorTypesListCall) PageToken(pageToken string) *ProjectsLocationsProcessorTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsProcessorTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorTypesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsProcessorTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsProcessorTypesListCall) Context(ctx context.Context) *ProjectsLocationsProcessorTypesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsProcessorTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsProcessorTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta3/{+parent}/processorTypes") + 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 "documentai.projects.locations.processorTypes.list" call. +// Exactly one of +// *GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsProcessorTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the processor types that exist.", + // "flatPath": "v1beta3/projects/{projectsId}/locations/{locationsId}/processorTypes", + // "httpMethod": "GET", + // "id": "documentai.projects.locations.processorTypes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of processor types to return. If unspecified, at most 100 processor types will be returned. The maximum value is 500; values above 500 will be coerced to 500.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Used to retrieve the next page of results, empty if at the end of the list.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The location of processor type to list. The available processor types may depend on the allow-listing on projects. Format: `projects/{project}/locations/{location}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta3/{+parent}/processorTypes", + // "response": { + // "$ref": "GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsProcessorTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDocumentaiV1beta3ListProcessorTypesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "documentai.projects.locations.processors.batchProcess": type ProjectsLocationsProcessorsBatchProcessCall struct { diff --git a/doubleclickbidmanager/v2/doubleclickbidmanager-api.json b/doubleclickbidmanager/v2/doubleclickbidmanager-api.json index da85157ea1e..b0b5df42484 100644 --- a/doubleclickbidmanager/v2/doubleclickbidmanager-api.json +++ b/doubleclickbidmanager/v2/doubleclickbidmanager-api.json @@ -126,7 +126,7 @@ ] }, "delete": { - "description": "Deletes a stored query as well as the associated stored reports.", + "description": "Deletes a query as well as the associated reports.", "flatPath": "queries/{queryId}", "httpMethod": "DELETE", "id": "doubleclickbidmanager.queries.delete", @@ -135,7 +135,7 @@ ], "parameters": { "queryId": { - "description": "Required. Query ID to delete.", + "description": "Required. ID of query to delete.", "format": "int64", "location": "path", "required": true, @@ -148,7 +148,7 @@ ] }, "get": { - "description": "Retrieves a stored query.", + "description": "Retrieves a query.", "flatPath": "queries/{queryId}", "httpMethod": "GET", "id": "doubleclickbidmanager.queries.get", @@ -157,7 +157,7 @@ ], "parameters": { "queryId": { - "description": "Required. Query ID to retrieve.", + "description": "Required. ID of query to retrieve.", "format": "int64", "location": "path", "required": true, @@ -173,14 +173,14 @@ ] }, "list": { - "description": "Retrieves stored queries.", + "description": "Lists queries created by the current user.", "flatPath": "queries", "httpMethod": "GET", "id": "doubleclickbidmanager.queries.list", "parameterOrder": [], "parameters": { "orderBy": { - "description": "Name of a field used to order results. The default sorting order is ascending. To specify descending order for a field, append a \" desc\" suffix. For example \"metadata.title desc\". Sorting is only supported for the following fields: * queryId * metadata.title", + "description": "Name of a field used to order results. The default sorting order is ascending. To specify descending order for a field, append a \" desc\" suffix. For example \"metadata.title desc\". Sorting is only supported for the following fields: * `queryId` * `metadata.title`", "location": "query", "type": "string" }, @@ -214,7 +214,7 @@ ], "parameters": { "queryId": { - "description": "Required. Query ID to run.", + "description": "Required. ID of query to run.", "format": "int64", "location": "path", "required": true, @@ -242,7 +242,7 @@ "reports": { "methods": { "get": { - "description": "Retrieves a stored report.", + "description": "Retrieves a report.", "flatPath": "queries/{queryId}/reports/{reportId}", "httpMethod": "GET", "id": "doubleclickbidmanager.queries.reports.get", @@ -275,7 +275,7 @@ ] }, "list": { - "description": "Lists reports.", + "description": "Lists reports associated with a query.", "flatPath": "queries/{queryId}/reports", "httpMethod": "GET", "id": "doubleclickbidmanager.queries.reports.list", @@ -284,7 +284,7 @@ ], "parameters": { "orderBy": { - "description": "Name of a field used to order results. The default sorting order is ascending. To specify descending order for a field, append a \" desc\" suffix. For example \"key.reportId desc\". Sorting is only supported for the following fields: * key.reportId", + "description": "Name of a field used to order results. The default sorting order is ascending. To specify descending order for a field, append a \" desc\" suffix. For example \"key.reportId desc\". Sorting is only supported for the following fields: * `key.reportId`", "location": "query", "type": "string" }, @@ -300,7 +300,7 @@ "type": "string" }, "queryId": { - "description": "Required. Query ID with which the reports are associated.", + "description": "Required. ID of the query with which the reports are associated.", "format": "int64", "location": "path", "required": true, @@ -320,7 +320,7 @@ } } }, - "revision": "20220524", + "revision": "20220707", "rootUrl": "https://doubleclickbidmanager.googleapis.com/", "schemas": { "ChannelGrouping": { @@ -381,25 +381,25 @@ "LAST_60_DAYS" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" + "Default value when range is not specified or is unknown in this version.", + "Custom range specified by custom_start_date and custom_end_date fields.", + "Current day.", + "Previous day.", + "All days, including the current day, since the most recent Sunday.", + "All days, including the current day, since the start of the current month.", + "All days, including the current day, since the start of the current quarter.", + "All days, including the current day, since the start of the current calendar year.", + "The previous completed week, beginning from Sunday.", + "The previous completed calendar month.", + "The previous completed quarter.", + "The previous completed calendar year.", + "The previous 7 days, excluding the current day.", + "The previous 30 days, excluding the current day.", + "The previous 90 days, excluding the current day.", + "The previous 365 days, excluding the current day.", + "All time for which data is available, excluding the current day.", + "The previous 14 days, excluding the current day.", + "The previous 60 days, excluding the current day." ], "type": "string" } @@ -469,15 +469,14 @@ "type": "object" }, "ListQueriesResponse": { - "description": "Represents a list of queries.", "id": "ListQueriesResponse", "properties": { "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page of queries. If this field is omitted, there are no subsequent pages.", + "description": "A token, which can be sent as page_token to retrieve the next page of queries. If this field is omitted, there are no subsequent pages.", "type": "string" }, "queries": { - "description": "Retrieved queries.", + "description": "The list of queries.", "items": { "$ref": "Query" }, @@ -487,11 +486,10 @@ "type": "object" }, "ListReportsResponse": { - "description": "Represents a list of reports.", "id": "ListReportsResponse", "properties": { "nextPageToken": { - "description": "A token, which can be sent as `page_token` to retrieve the next page of reports. If this field is omitted, there are no subsequent pages.", + "description": "A token, which can be sent as page_token to retrieve the next page of reports. If this field is omitted, there are no subsequent pages.", "type": "string" }, "reports": { @@ -549,7 +547,7 @@ "description": "Additional query options." }, "type": { - "description": "Report type.", + "description": "The type of the report. The type of the report will dictate what dimesions, filters, and metrics can be used.", "enum": [ "REPORT_TYPE_UNSPECIFIED", "STANDARD", @@ -565,18 +563,18 @@ "PATH_ATTRIBUTION" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" + "Default value when report type is not specified or is unknown in this version.", + "Standard report.", + "Inventory Availability report.", + "Audience Composition report.", + "Floodlight report.", + "YouTube report.", + "GRP report.", + "YouTube Programmatic Guaranteed report.", + "Reach report.", + "Unique Reach Audience report.", + "Full Path report.", + "Path Attribution report." ], "type": "string" } @@ -595,7 +593,7 @@ "type": "array" }, "pathMatchPosition": { - "description": "Indicates the position of the path the filter should match to (first, last, or any event in path).", + "description": "The position of the path the filter should match to (first, last, or any event in path).", "enum": [ "PATH_MATCH_POSITION_UNSPECIFIED", "ANY", @@ -603,10 +601,10 @@ "LAST" ], "enumDescriptions": [ - "", - "", - "", - "" + "Default value when path match position is not specified or is unknown in this version.", + "Any position in the path.", + "The first position in the path.", + "The last position in the path." ], "type": "string" } @@ -632,7 +630,7 @@ "type": "object" }, "PathQueryOptionsFilter": { - "description": "Dimension Filter on path events.", + "description": "Dimension filter on path events.", "id": "PathQueryOptionsFilter", "properties": { "filter": { @@ -640,7 +638,7 @@ "type": "string" }, "match": { - "description": "Indicates how the filter should be matched to the value.", + "description": "Match logic of the filter.", "enum": [ "UNKNOWN", "EXACT", @@ -649,16 +647,16 @@ "WILDCARD_EXPRESSION" ], "enumDescriptions": [ - "", - "", - "", - "", - "" + "Default value when match is not specified or is unknown in this version.", + "Matches a value exactly.", + "Matches a value partially.", + "Begins with a value.", + "Matches a value, utilizing wildcard character logic in the value." ], "type": "string" }, "values": { - "description": "Value to filter on.", + "description": "Values to filter on.", "items": { "type": "string" }, @@ -687,7 +685,7 @@ }, "schedule": { "$ref": "QuerySchedule", - "description": "Information on how often and when to run a query." + "description": "Information on how often and when to run a query. If `ONE_TIME` is set to the frequency field, the query will only be run at the time of creation." } }, "type": "object" @@ -698,7 +696,7 @@ "properties": { "dataRange": { "$ref": "DataRange", - "description": "Range of report data." + "description": "Range of report data. All reports will be based on the same time zone as used by the advertiser." }, "format": { "description": "Format of the generated report.", @@ -719,7 +717,7 @@ "type": "boolean" }, "shareEmailAddress": { - "description": "List of email addresses which are sent email notifications when the report is finished. Separate from `sendNotification`.", + "description": "List of email addresses which are sent email notifications when the report is finished. Separate from send_notification.", "items": { "type": "string" }, @@ -733,7 +731,7 @@ "type": "object" }, "QuerySchedule": { - "description": "Information on how frequently and when to run a query.", + "description": "Information on when and how frequently to run a query.", "id": "QuerySchedule", "properties": { "endDate": { @@ -753,14 +751,14 @@ "YEARLY" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" + "Default value when frequency is not specified or is unknown in this version.", + "Only once.", + "Once a day.", + "Once a week.", + "Twice a month.", + "Once a month.", + "Once a quarter", + "Once a year." ], "type": "string" }, @@ -871,11 +869,11 @@ "FAILED" ], "enumDescriptions": [ - "", - "", - "", - "", - "" + "Default value when state is not specified or is unknown in this version.", + "The report is queued to run.", + "The report is currently running.", + "The report has finished running successfully.", + "The report has finished running in failure." ], "readOnly": true, "type": "string" diff --git a/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go b/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go index 2678d5b4492..64b20aacdd6 100644 --- a/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go +++ b/doubleclickbidmanager/v2/doubleclickbidmanager-gen.go @@ -209,25 +209,33 @@ type DataRange struct { // Range: Report data range used to generate the report. // // Possible values: - // "RANGE_UNSPECIFIED" - // "CUSTOM_DATES" - // "CURRENT_DAY" - // "PREVIOUS_DAY" - // "WEEK_TO_DATE" - // "MONTH_TO_DATE" - // "QUARTER_TO_DATE" - // "YEAR_TO_DATE" - // "PREVIOUS_WEEK" - // "PREVIOUS_MONTH" - // "PREVIOUS_QUARTER" - // "PREVIOUS_YEAR" - // "LAST_7_DAYS" - // "LAST_30_DAYS" - // "LAST_90_DAYS" - // "LAST_365_DAYS" - // "ALL_TIME" - // "LAST_14_DAYS" - // "LAST_60_DAYS" + // "RANGE_UNSPECIFIED" - Default value when range is not specified or + // is unknown in this version. + // "CUSTOM_DATES" - Custom range specified by custom_start_date and + // custom_end_date fields. + // "CURRENT_DAY" - Current day. + // "PREVIOUS_DAY" - Previous day. + // "WEEK_TO_DATE" - All days, including the current day, since the + // most recent Sunday. + // "MONTH_TO_DATE" - All days, including the current day, since the + // start of the current month. + // "QUARTER_TO_DATE" - All days, including the current day, since the + // start of the current quarter. + // "YEAR_TO_DATE" - All days, including the current day, since the + // start of the current calendar year. + // "PREVIOUS_WEEK" - The previous completed week, beginning from + // Sunday. + // "PREVIOUS_MONTH" - The previous completed calendar month. + // "PREVIOUS_QUARTER" - The previous completed quarter. + // "PREVIOUS_YEAR" - The previous completed calendar year. + // "LAST_7_DAYS" - The previous 7 days, excluding the current day. + // "LAST_30_DAYS" - The previous 30 days, excluding the current day. + // "LAST_90_DAYS" - The previous 90 days, excluding the current day. + // "LAST_365_DAYS" - The previous 365 days, excluding the current day. + // "ALL_TIME" - All time for which data is available, excluding the + // current day. + // "LAST_14_DAYS" - The previous 14 days, excluding the current day. + // "LAST_60_DAYS" - The previous 60 days, excluding the current day. Range string `json:"range,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomEndDate") to @@ -391,14 +399,13 @@ func (s *FilterPair) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListQueriesResponse: Represents a list of queries. type ListQueriesResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve + // NextPageToken: A token, which can be sent as page_token to retrieve // the next page of queries. If this field is omitted, there are no // subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` - // Queries: Retrieved queries. + // Queries: The list of queries. Queries []*Query `json:"queries,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -428,9 +435,8 @@ func (s *ListQueriesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListReportsResponse: Represents a list of reports. type ListReportsResponse struct { - // NextPageToken: A token, which can be sent as `page_token` to retrieve + // NextPageToken: A token, which can be sent as page_token to retrieve // the next page of reports. If this field is omitted, there are no // subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` @@ -515,21 +521,24 @@ type Parameters struct { // Options: Additional query options. Options *Options `json:"options,omitempty"` - // Type: Report type. + // Type: The type of the report. The type of the report will dictate + // what dimesions, filters, and metrics can be used. // // Possible values: - // "REPORT_TYPE_UNSPECIFIED" - // "STANDARD" - // "INVENTORY_AVAILABILITY" - // "AUDIENCE_COMPOSITION" - // "FLOODLIGHT" - // "YOUTUBE" - // "GRP" - // "YOUTUBE_PROGRAMMATIC_GUARANTEED" - // "REACH" - // "UNIQUE_REACH_AUDIENCE" - // "FULL_PATH" - // "PATH_ATTRIBUTION" + // "REPORT_TYPE_UNSPECIFIED" - Default value when report type is not + // specified or is unknown in this version. + // "STANDARD" - Standard report. + // "INVENTORY_AVAILABILITY" - Inventory Availability report. + // "AUDIENCE_COMPOSITION" - Audience Composition report. + // "FLOODLIGHT" - Floodlight report. + // "YOUTUBE" - YouTube report. + // "GRP" - GRP report. + // "YOUTUBE_PROGRAMMATIC_GUARANTEED" - YouTube Programmatic Guaranteed + // report. + // "REACH" - Reach report. + // "UNIQUE_REACH_AUDIENCE" - Unique Reach Audience report. + // "FULL_PATH" - Full Path report. + // "PATH_ATTRIBUTION" - Path Attribution report. Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Filters") to @@ -565,14 +574,15 @@ type PathFilter struct { // path. EventFilters []*EventFilter `json:"eventFilters,omitempty"` - // PathMatchPosition: Indicates the position of the path the filter - // should match to (first, last, or any event in path). + // PathMatchPosition: The position of the path the filter should match + // to (first, last, or any event in path). // // Possible values: - // "PATH_MATCH_POSITION_UNSPECIFIED" - // "ANY" - // "FIRST" - // "LAST" + // "PATH_MATCH_POSITION_UNSPECIFIED" - Default value when path match + // position is not specified or is unknown in this version. + // "ANY" - Any position in the path. + // "FIRST" - The first position in the path. + // "LAST" - The last position in the path. PathMatchPosition string `json:"pathMatchPosition,omitempty"` // ForceSendFields is a list of field names (e.g. "EventFilters") to @@ -631,22 +641,24 @@ func (s *PathQueryOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// PathQueryOptionsFilter: Dimension Filter on path events. +// PathQueryOptionsFilter: Dimension filter on path events. type PathQueryOptionsFilter struct { // Filter: Dimension the filter is applied to. Filter string `json:"filter,omitempty"` - // Match: Indicates how the filter should be matched to the value. + // Match: Match logic of the filter. // // Possible values: - // "UNKNOWN" - // "EXACT" - // "PARTIAL" - // "BEGINS_WITH" - // "WILDCARD_EXPRESSION" + // "UNKNOWN" - Default value when match is not specified or is unknown + // in this version. + // "EXACT" - Matches a value exactly. + // "PARTIAL" - Matches a value partially. + // "BEGINS_WITH" - Begins with a value. + // "WILDCARD_EXPRESSION" - Matches a value, utilizing wildcard + // character logic in the value. Match string `json:"match,omitempty"` - // Values: Value to filter on. + // Values: Values to filter on. Values []string `json:"values,omitempty"` // ForceSendFields is a list of field names (e.g. "Filter") to @@ -683,7 +695,9 @@ type Query struct { // QueryId: Output only. Query ID. QueryId int64 `json:"queryId,omitempty,string"` - // Schedule: Information on how often and when to run a query. + // Schedule: Information on how often and when to run a query. If + // `ONE_TIME` is set to the frequency field, the query will only be run + // at the time of creation. Schedule *QuerySchedule `json:"schedule,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -715,7 +729,8 @@ func (s *Query) MarshalJSON() ([]byte, error) { // QueryMetadata: Query metadata. type QueryMetadata struct { - // DataRange: Range of report data. + // DataRange: Range of report data. All reports will be based on the + // same time zone as used by the advertiser. DataRange *DataRange `json:"dataRange,omitempty"` // Format: Format of the generated report. @@ -733,7 +748,7 @@ type QueryMetadata struct { // ShareEmailAddress: List of email addresses which are sent email // notifications when the report is finished. Separate from - // `sendNotification`. + // send_notification. ShareEmailAddress []string `json:"shareEmailAddress,omitempty"` // Title: Query title. It is used to name the reports generated from @@ -763,7 +778,7 @@ func (s *QueryMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// QuerySchedule: Information on how frequently and when to run a query. +// QuerySchedule: Information on when and how frequently to run a query. type QuerySchedule struct { // EndDate: Date to periodically run the query until. Not applicable to // `ONE_TIME` frequency. @@ -772,14 +787,15 @@ type QuerySchedule struct { // Frequency: How often the query is run. // // Possible values: - // "FREQUENCY_UNSPECIFIED" - // "ONE_TIME" - // "DAILY" - // "WEEKLY" - // "SEMI_MONTHLY" - // "MONTHLY" - // "QUARTERLY" - // "YEARLY" + // "FREQUENCY_UNSPECIFIED" - Default value when frequency is not + // specified or is unknown in this version. + // "ONE_TIME" - Only once. + // "DAILY" - Once a day. + // "WEEKLY" - Once a week. + // "SEMI_MONTHLY" - Twice a month. + // "MONTHLY" - Once a month. + // "QUARTERLY" - Once a quarter + // "YEARLY" - Once a year. Frequency string `json:"frequency,omitempty"` // NextRunTimezoneCode: Canonical timezone code for report generation @@ -942,11 +958,12 @@ type ReportStatus struct { // State: Output only. The state of the report. // // Possible values: - // "STATE_UNSPECIFIED" - // "QUEUED" - // "RUNNING" - // "DONE" - // "FAILED" + // "STATE_UNSPECIFIED" - Default value when state is not specified or + // is unknown in this version. + // "QUEUED" - The report is queued to run. + // "RUNNING" - The report is currently running. + // "DONE" - The report has finished running successfully. + // "FAILED" - The report has finished running in failure. State string `json:"state,omitempty"` // ForceSendFields is a list of field names (e.g. "FinishTime") to @@ -1174,10 +1191,9 @@ type QueriesDeleteCall struct { header_ http.Header } -// Delete: Deletes a stored query as well as the associated stored -// reports. +// Delete: Deletes a query as well as the associated reports. // -// - queryId: Query ID to delete. +// - queryId: ID of query to delete. func (r *QueriesService) Delete(queryId int64) *QueriesDeleteCall { c := &QueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.queryId = queryId @@ -1245,7 +1261,7 @@ func (c *QueriesDeleteCall) Do(opts ...googleapi.CallOption) error { } return nil // { - // "description": "Deletes a stored query as well as the associated stored reports.", + // "description": "Deletes a query as well as the associated reports.", // "flatPath": "queries/{queryId}", // "httpMethod": "DELETE", // "id": "doubleclickbidmanager.queries.delete", @@ -1254,7 +1270,7 @@ func (c *QueriesDeleteCall) Do(opts ...googleapi.CallOption) error { // ], // "parameters": { // "queryId": { - // "description": "Required. Query ID to delete.", + // "description": "Required. ID of query to delete.", // "format": "int64", // "location": "path", // "required": true, @@ -1280,9 +1296,9 @@ type QueriesGetCall struct { header_ http.Header } -// Get: Retrieves a stored query. +// Get: Retrieves a query. // -// - queryId: Query ID to retrieve. +// - queryId: ID of query to retrieve. func (r *QueriesService) Get(queryId int64) *QueriesGetCall { c := &QueriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.queryId = queryId @@ -1388,7 +1404,7 @@ func (c *QueriesGetCall) Do(opts ...googleapi.CallOption) (*Query, error) { } return ret, nil // { - // "description": "Retrieves a stored query.", + // "description": "Retrieves a query.", // "flatPath": "queries/{queryId}", // "httpMethod": "GET", // "id": "doubleclickbidmanager.queries.get", @@ -1397,7 +1413,7 @@ func (c *QueriesGetCall) Do(opts ...googleapi.CallOption) (*Query, error) { // ], // "parameters": { // "queryId": { - // "description": "Required. Query ID to retrieve.", + // "description": "Required. ID of query to retrieve.", // "format": "int64", // "location": "path", // "required": true, @@ -1425,7 +1441,7 @@ type QueriesListCall struct { header_ http.Header } -// List: Retrieves stored queries. +// List: Lists queries created by the current user. func (r *QueriesService) List() *QueriesListCall { c := &QueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -1435,7 +1451,7 @@ func (r *QueriesService) List() *QueriesListCall { // to order results. The default sorting order is ascending. To specify // descending order for a field, append a " desc" suffix. For example // "metadata.title desc". Sorting is only supported for the following -// fields: * queryId * metadata.title +// fields: * `queryId` * `metadata.title` func (c *QueriesListCall) OrderBy(orderBy string) *QueriesListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -1553,14 +1569,14 @@ func (c *QueriesListCall) Do(opts ...googleapi.CallOption) (*ListQueriesResponse } return ret, nil // { - // "description": "Retrieves stored queries.", + // "description": "Lists queries created by the current user.", // "flatPath": "queries", // "httpMethod": "GET", // "id": "doubleclickbidmanager.queries.list", // "parameterOrder": [], // "parameters": { // "orderBy": { - // "description": "Name of a field used to order results. The default sorting order is ascending. To specify descending order for a field, append a \" desc\" suffix. For example \"metadata.title desc\". Sorting is only supported for the following fields: * queryId * metadata.title", + // "description": "Name of a field used to order results. The default sorting order is ascending. To specify descending order for a field, append a \" desc\" suffix. For example \"metadata.title desc\". Sorting is only supported for the following fields: * `queryId` * `metadata.title`", // "location": "query", // "type": "string" // }, @@ -1621,7 +1637,7 @@ type QueriesRunCall struct { // Run: Runs a stored query to generate a report. // -// - queryId: Query ID to run. +// - queryId: ID of query to run. func (r *QueriesService) Run(queryId int64, runqueryrequest *RunQueryRequest) *QueriesRunCall { c := &QueriesRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.queryId = queryId @@ -1738,7 +1754,7 @@ func (c *QueriesRunCall) Do(opts ...googleapi.CallOption) (*Report, error) { // ], // "parameters": { // "queryId": { - // "description": "Required. Query ID to run.", + // "description": "Required. ID of query to run.", // "format": "int64", // "location": "path", // "required": true, @@ -1776,7 +1792,7 @@ type QueriesReportsGetCall struct { header_ http.Header } -// Get: Retrieves a stored report. +// Get: Retrieves a report. // // - queryId: ID of the query the report is associated with. // - reportId: ID of the report to retrieve. @@ -1887,7 +1903,7 @@ func (c *QueriesReportsGetCall) Do(opts ...googleapi.CallOption) (*Report, error } return ret, nil // { - // "description": "Retrieves a stored report.", + // "description": "Retrieves a report.", // "flatPath": "queries/{queryId}/reports/{reportId}", // "httpMethod": "GET", // "id": "doubleclickbidmanager.queries.reports.get", @@ -1933,9 +1949,9 @@ type QueriesReportsListCall struct { header_ http.Header } -// List: Lists reports. +// List: Lists reports associated with a query. // -// - queryId: Query ID with which the reports are associated. +// - queryId: ID of the query with which the reports are associated. func (r *QueriesReportsService) List(queryId int64) *QueriesReportsListCall { c := &QueriesReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.queryId = queryId @@ -1946,7 +1962,7 @@ func (r *QueriesReportsService) List(queryId int64) *QueriesReportsListCall { // to order results. The default sorting order is ascending. To specify // descending order for a field, append a " desc" suffix. For example // "key.reportId desc". Sorting is only supported for the following -// fields: * key.reportId +// fields: * `key.reportId` func (c *QueriesReportsListCall) OrderBy(orderBy string) *QueriesReportsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -2067,7 +2083,7 @@ func (c *QueriesReportsListCall) Do(opts ...googleapi.CallOption) (*ListReportsR } return ret, nil // { - // "description": "Lists reports.", + // "description": "Lists reports associated with a query.", // "flatPath": "queries/{queryId}/reports", // "httpMethod": "GET", // "id": "doubleclickbidmanager.queries.reports.list", @@ -2076,7 +2092,7 @@ func (c *QueriesReportsListCall) Do(opts ...googleapi.CallOption) (*ListReportsR // ], // "parameters": { // "orderBy": { - // "description": "Name of a field used to order results. The default sorting order is ascending. To specify descending order for a field, append a \" desc\" suffix. For example \"key.reportId desc\". Sorting is only supported for the following fields: * key.reportId", + // "description": "Name of a field used to order results. The default sorting order is ascending. To specify descending order for a field, append a \" desc\" suffix. For example \"key.reportId desc\". Sorting is only supported for the following fields: * `key.reportId`", // "location": "query", // "type": "string" // }, @@ -2092,7 +2108,7 @@ func (c *QueriesReportsListCall) Do(opts ...googleapi.CallOption) (*ListReportsR // "type": "string" // }, // "queryId": { - // "description": "Required. Query ID with which the reports are associated.", + // "description": "Required. ID of the query with which the reports are associated.", // "format": "int64", // "location": "path", // "required": true, diff --git a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json index 0ac21b0f9c0..f454f531e3c 100644 --- a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json +++ b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-api.json @@ -530,7 +530,7 @@ } } }, - "revision": "20220625", + "revision": "20220712", "rootUrl": "https://mybusinessaccountmanagement.googleapis.com/", "schemas": { "AcceptInvitationRequest": { @@ -658,6 +658,10 @@ "description": "An administrator of an Account or a location.", "id": "Admin", "properties": { + "account": { + "description": "Immutable. The name of the Account resource that this Admin refers to. Used when calling CreateAccountAdmin or CreateLocationAdmin to invite UserGroups or LocationGroups as admins, respectively. If both this field and `admin` are set on `CREATE` requests, this field takes precedence and the email address in `admin` will be ignored. Format: `accounts/{account}`.", + "type": "string" + }, "admin": { "description": "Optional. The name of the admin. When making the initial invitation, this is the invitee's email address. On `GET` calls, the user's email address is returned if the invitation is still pending. Otherwise, it contains the user's first and last names. This field is only needed to be set during admin creation.", "type": "string" diff --git a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go index 8bf35bff840..6714cbd97f4 100644 --- a/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go +++ b/mybusinessaccountmanagement/v1/mybusinessaccountmanagement-gen.go @@ -306,6 +306,14 @@ func (s *Account) MarshalJSON() ([]byte, error) { // Admin: An administrator of an Account or a location. type Admin struct { + // Account: Immutable. The name of the Account resource that this Admin + // refers to. Used when calling CreateAccountAdmin or + // CreateLocationAdmin to invite UserGroups or LocationGroups as admins, + // respectively. If both this field and `admin` are set on `CREATE` + // requests, this field takes precedence and the email address in + // `admin` will be ignored. Format: `accounts/{account}`. + Account string `json:"account,omitempty"` + // Admin: Optional. The name of the admin. When making the initial // invitation, this is the invitee's email address. On `GET` calls, the // user's email address is returned if the invitation is still pending. @@ -343,7 +351,7 @@ type Admin struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Admin") to + // ForceSendFields is a list of field names (e.g. "Account") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -351,8 +359,8 @@ type Admin struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Admin") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Account") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index fe028795511..c4bc62a6d52 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -865,7 +865,7 @@ } } }, - "revision": "20220620", + "revision": "20220711", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -1303,6 +1303,26 @@ "properties": {}, "type": "object" }, + "CloudSQLConfig": { + "description": "Cloud SQL configuration.", + "id": "CloudSQLConfig", + "properties": { + "service": { + "description": "Peering service used for peering with the Cloud SQL project.", + "type": "string" + }, + "umbrellaNetwork": { + "description": "The name of network in Cloud SQL umbrella project.", + "type": "string" + }, + "umbrellaProject": { + "description": "The project number of Cloud SQL umbrella project.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Connection": { "description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", "id": "Connection", @@ -1335,6 +1355,13 @@ "description": "Configuration information for a private service access connection.", "id": "ConsumerConfig", "properties": { + "cloudsqlConfigs": { + "description": "Represents one or multiple Cloud SQL configurations.", + "items": { + "$ref": "CloudSQLConfig" + }, + "type": "array" + }, "consumerExportCustomRoutes": { "description": "Export custom routes flag value for peering from consumer to producer.", "type": "boolean" diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index f3ed41e4ddc..9f0027ed859 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -1124,6 +1124,40 @@ func (s *BillingDestination) MarshalJSON() ([]byte, error) { type CancelOperationRequest struct { } +// CloudSQLConfig: Cloud SQL configuration. +type CloudSQLConfig struct { + // Service: Peering service used for peering with the Cloud SQL project. + Service string `json:"service,omitempty"` + + // UmbrellaNetwork: The name of network in Cloud SQL umbrella project. + UmbrellaNetwork string `json:"umbrellaNetwork,omitempty"` + + // UmbrellaProject: The project number of Cloud SQL umbrella project. + UmbrellaProject int64 `json:"umbrellaProject,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Service") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudSQLConfig) MarshalJSON() ([]byte, error) { + type NoMethod CloudSQLConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Connection: Represents a private connection resource. A private // connection is implemented as a VPC Network Peering connection between // a service producer's VPC network and a service consumer's VPC @@ -1182,6 +1216,9 @@ func (s *Connection) MarshalJSON() ([]byte, error) { // ConsumerConfig: Configuration information for a private service // access connection. type ConsumerConfig struct { + // CloudsqlConfigs: Represents one or multiple Cloud SQL configurations. + CloudsqlConfigs []*CloudSQLConfig `json:"cloudsqlConfigs,omitempty"` + // ConsumerExportCustomRoutes: Export custom routes flag value for // peering from consumer to producer. ConsumerExportCustomRoutes bool `json:"consumerExportCustomRoutes,omitempty"` @@ -1237,22 +1274,21 @@ type ConsumerConfig struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "ConsumerExportCustomRoutes") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "CloudsqlConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "ConsumerExportCustomRoutes") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "CloudsqlConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/servicenetworking/v1beta/servicenetworking-api.json b/servicenetworking/v1beta/servicenetworking-api.json index f545ba998a3..39f5cec8364 100644 --- a/servicenetworking/v1beta/servicenetworking-api.json +++ b/servicenetworking/v1beta/servicenetworking-api.json @@ -307,7 +307,7 @@ } } }, - "revision": "20220620", + "revision": "20220711", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -644,6 +644,26 @@ }, "type": "object" }, + "CloudSQLConfig": { + "description": "Cloud SQL configuration.", + "id": "CloudSQLConfig", + "properties": { + "service": { + "description": "Peering service used for peering with the Cloud SQL project.", + "type": "string" + }, + "umbrellaNetwork": { + "description": "The name of network in Cloud SQL umbrella project.", + "type": "string" + }, + "umbrellaProject": { + "description": "The project number of Cloud SQL umbrella project.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Connection": { "description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", "id": "Connection", @@ -676,6 +696,13 @@ "description": "Configuration information for a private service access connection.", "id": "ConsumerConfig", "properties": { + "cloudsqlConfigs": { + "description": "Represents one or multiple Cloud SQL configurations.", + "items": { + "$ref": "CloudSQLConfig" + }, + "type": "array" + }, "consumerExportCustomRoutes": { "description": "Export custom routes flag value for peering from consumer to producer.", "type": "boolean" diff --git a/servicenetworking/v1beta/servicenetworking-gen.go b/servicenetworking/v1beta/servicenetworking-gen.go index a8efbc24ea2..86d34c7cf9c 100644 --- a/servicenetworking/v1beta/servicenetworking-gen.go +++ b/servicenetworking/v1beta/servicenetworking-gen.go @@ -852,6 +852,40 @@ func (s *BillingDestination) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CloudSQLConfig: Cloud SQL configuration. +type CloudSQLConfig struct { + // Service: Peering service used for peering with the Cloud SQL project. + Service string `json:"service,omitempty"` + + // UmbrellaNetwork: The name of network in Cloud SQL umbrella project. + UmbrellaNetwork string `json:"umbrellaNetwork,omitempty"` + + // UmbrellaProject: The project number of Cloud SQL umbrella project. + UmbrellaProject int64 `json:"umbrellaProject,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Service") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Service") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudSQLConfig) MarshalJSON() ([]byte, error) { + type NoMethod CloudSQLConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Connection: Represents a private connection resource. A private // connection is implemented as a VPC Network Peering connection between // a service producer's VPC network and a service consumer's VPC @@ -910,6 +944,9 @@ func (s *Connection) MarshalJSON() ([]byte, error) { // ConsumerConfig: Configuration information for a private service // access connection. type ConsumerConfig struct { + // CloudsqlConfigs: Represents one or multiple Cloud SQL configurations. + CloudsqlConfigs []*CloudSQLConfig `json:"cloudsqlConfigs,omitempty"` + // ConsumerExportCustomRoutes: Export custom routes flag value for // peering from consumer to producer. ConsumerExportCustomRoutes bool `json:"consumerExportCustomRoutes,omitempty"` @@ -961,22 +998,21 @@ type ConsumerConfig struct { // producer VPC host network. VpcScReferenceArchitectureEnabled bool `json:"vpcScReferenceArchitectureEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "ConsumerExportCustomRoutes") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "CloudsqlConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "ConsumerExportCustomRoutes") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. + // NullFields is a list of field names (e.g. "CloudsqlConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index 61e4ef47d5e..ab3b0a80835 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -1450,7 +1450,10 @@ "path": "youtube/v3/liveBroadcasts/cuepoint", "response": { "$ref": "Cuepoint" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/youtubepartner" + ] }, "list": { "description": "Retrieve the list of broadcasts associated with the given channel.", @@ -3862,7 +3865,7 @@ } } }, - "revision": "20220628", + "revision": "20220711", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { @@ -11377,7 +11380,7 @@ "type": "object" }, "VideoStatus": { - "description": "Basic details about a video category, such as its localized title. Next Id: 17", + "description": "Basic details about a video category, such as its localized title. Next Id: 18", "id": "VideoStatus", "properties": { "embeddable": { diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 63190cf4bc7..56fb3e8519a 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -10069,7 +10069,7 @@ func (s *VideoStatistics) MarshalJSON() ([]byte, error) { } // VideoStatus: Basic details about a video category, such as its -// localized title. Next Id: 17 +// localized title. Next Id: 18 type VideoStatus struct { // Embeddable: This value indicates if the video can be embedded on // another website. @mutable youtube.videos.insert youtube.videos.update @@ -15858,7 +15858,10 @@ func (c *LiveBroadcastsInsertCuepointCall) Do(opts ...googleapi.CallOption) (*Cu // "path": "youtube/v3/liveBroadcasts/cuepoint", // "response": { // "$ref": "Cuepoint" - // } + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/youtubepartner" + // ] // } } From 6fde9e84b13e64b4398894db538e51a568eae2ba Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 14 Jul 2022 08:47:30 -0700 Subject: [PATCH 2/6] feat(all): auto-regenerate discovery clients (#1619) --- beyondcorp/v1alpha/beyondcorp-api.json | 262 +- beyondcorp/v1alpha/beyondcorp-gen.go | 318 +- cloudfunctions/v1/cloudfunctions-api.json | 149 +- cloudfunctions/v1/cloudfunctions-gen.go | 155 + cloudfunctions/v2/cloudfunctions-api.json | 1071 ++++++- cloudfunctions/v2/cloudfunctions-gen.go | 2761 +++++++++++++++-- .../v2alpha/cloudfunctions-api.json | 149 +- cloudfunctions/v2alpha/cloudfunctions-gen.go | 155 + cloudfunctions/v2beta/cloudfunctions-api.json | 149 +- cloudfunctions/v2beta/cloudfunctions-gen.go | 155 + cloudtasks/v2beta2/cloudtasks-api.json | 278 +- cloudtasks/v2beta2/cloudtasks-gen.go | 638 ++++ compute/v1/compute-api.json | 22 +- compute/v1/compute-gen.go | 25 +- datacatalog/v1/datacatalog-api.json | 33 +- datacatalog/v1/datacatalog-gen.go | 40 + domains/v1/domains-api.json | 4 +- domains/v1/domains-gen.go | 6 +- domains/v1beta1/domains-api.json | 4 +- domains/v1beta1/domains-gen.go | 6 +- drive/v2/drive-api.json | 388 ++- drive/v2/drive-gen.go | 840 ++++- drive/v3/drive-api.json | 368 ++- drive/v3/drive-gen.go | 788 ++++- memcache/v1beta2/memcache-api.json | 6 +- memcache/v1beta2/memcache-gen.go | 10 +- ondemandscanning/v1/ondemandscanning-api.json | 29 +- ondemandscanning/v1/ondemandscanning-gen.go | 43 +- .../v1beta1/ondemandscanning-api.json | 29 +- .../v1beta1/ondemandscanning-gen.go | 43 +- retail/v2/retail-api.json | 4 +- retail/v2/retail-gen.go | 2 +- retail/v2alpha/retail-api.json | 6 +- retail/v2alpha/retail-gen.go | 9 +- retail/v2beta/retail-api.json | 6 +- retail/v2beta/retail-gen.go | 9 +- run/v1/run-api.json | 4 +- run/v1/run-gen.go | 2 +- run/v2/run-api.json | 14 +- run/v2/run-gen.go | 8 +- 40 files changed, 8660 insertions(+), 328 deletions(-) diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index 76b9a055478..1ad1f097d4b 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -12,7 +12,7 @@ "baseUrl": "https://beyondcorp.googleapis.com/", "batchPath": "batch", "canonicalName": "BeyondCorp", - "description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity using the App Connector hybrid connectivity solution.", + "description": "Beyondcorp Enterprise provides identity and context aware access controls for enterprise resources and enables zero-trust access. Using the Beyondcorp Enterprise APIs, enterprises can set up multi-cloud and on-prem connectivity solutions.", "discoveryVersion": "v1", "documentationLink": "https://cloud.google.com/", "fullyEncodeReservedExpansion": true, @@ -1384,7 +1384,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the ClientConnectorService resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. Mutable fields: display_name.", + "description": "Required. Field mask is used to specify the fields to be overwritten in the ClientConnectorService resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. Mutable fields: display_name, ingress.config.destination_routes.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2499,7 +2499,7 @@ } } }, - "revision": "20220616", + "revision": "20220712", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -3375,6 +3375,50 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpAppconnectionsV1AppConnectionOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpAppconnectionsV1AppConnectionOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection": { "description": "A BeyondCorp AppConnection resource represents a BeyondCorp protected AppConnection to a remote application. It creates all the necessary GCP components needed for creating a BeyondCorp protected AppConnection. Multiple connectors can be authorised for a single AppConnection.", "id": "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection", @@ -3483,7 +3527,7 @@ "id": "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnectionGateway", "properties": { "appGateway": { - "description": "Required. AppGateway name in following format: projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}", + "description": "Required. AppGateway name in following format: `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id}`", "type": "string" }, "ingressPort": { @@ -3615,7 +3659,7 @@ "description": "A BeyondCorp AppConnection in the project." }, "recentMigVms": { - "description": "If type=GCP_REGIONAL_MIG, contains most recent VM instances, like \"https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}\".", + "description": "If type=GCP_REGIONAL_MIG, contains most recent VM instances, like `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zone_id}/instances/{instance_id}`.", "items": { "type": "string" }, @@ -3624,6 +3668,82 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpAppconnectorsV1AppConnectorOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpAppconnectorsV1AppConnectorOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpAppconnectorsV1ContainerHealthDetails": { + "description": "ContainerHealthDetails reflects the health details of a container.", + "id": "GoogleCloudBeyondcorpAppconnectorsV1ContainerHealthDetails", + "properties": { + "currentConfigVersion": { + "description": "The version of the current config.", + "type": "string" + }, + "errorMsg": { + "description": "The latest error message.", + "type": "string" + }, + "expectedConfigVersion": { + "description": "The version of the expected config.", + "type": "string" + }, + "extendedStatus": { + "additionalProperties": { + "type": "string" + }, + "description": "The extended status. Such as ExitCode, StartedAt, FinishedAt, etc.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpAppconnectorsV1RemoteAgentDetails": { + "description": "RemoteAgentDetails reflects the details of a remote agent.", + "id": "GoogleCloudBeyondcorpAppconnectorsV1RemoteAgentDetails", + "properties": {}, + "type": "object" + }, "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector": { "description": "A BeyondCorp connector resource that represents an application facing component deployed proximal to and with direct access to the application instances. It is used to establish connectivity between the remote enterprise environment and GCP. It initiates connections to the applications and can proxy the data from users over the connection.", "id": "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector", @@ -3959,6 +4079,50 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpAppgatewaysV1AppGatewayOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpAppgatewaysV1AppGatewayOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata", @@ -3998,6 +4162,94 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpClientconnectorservicesV1ClientConnectorServiceOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpClientconnectorservicesV1ClientConnectorServiceOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpClientgatewaysV1ClientGatewayOperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "GoogleCloudBeyondcorpClientgatewaysV1ClientGatewayOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "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 2e565faef43..c967dc284c5 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -1414,6 +1414,58 @@ func (s *Gateway) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpAppconnectionsV1AppConnectionOperationMetadata: +// Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpAppconnectionsV1AppConnectionOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpAppconnectionsV1AppConnectionOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpAppconnectionsV1AppConnectionOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection: A BeyondCorp // AppConnection resource represents a BeyondCorp protected // AppConnection to a remote application. It creates all the necessary @@ -1543,7 +1595,8 @@ func (s *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnectionApplicationEndpo // to enable connectivity. type GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnectionGateway struct { // AppGateway: Required. AppGateway name in following format: - // projects/{project_id}/locations/{location_id}/appgateways/{gateway_id} + // `projects/{project_id}/locations/{location_id}/appgateways/{gateway_id + // }` AppGateway string `json:"appGateway,omitempty"` // IngressPort: Output only. Ingress port reserved on the gateways for @@ -1729,8 +1782,8 @@ type GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponseAppC // RecentMigVms: If type=GCP_REGIONAL_MIG, contains most recent VM // instances, like - // "https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zo - // ne_id}/instances/{instance_id}". + // `https://www.googleapis.com/compute/v1/projects/{project_id}/zones/{zo + // ne_id}/instances/{instance_id}`. RecentMigVms []string `json:"recentMigVms,omitempty"` // ForceSendFields is a list of field names (e.g. "AppConnection") to @@ -1756,6 +1809,104 @@ func (s *GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponse return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpAppconnectorsV1AppConnectorOperationMetadata: +// Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpAppconnectorsV1AppConnectorOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpAppconnectorsV1AppConnectorOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpAppconnectorsV1AppConnectorOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpAppconnectorsV1ContainerHealthDetails: +// ContainerHealthDetails reflects the health details of a container. +type GoogleCloudBeyondcorpAppconnectorsV1ContainerHealthDetails struct { + // CurrentConfigVersion: The version of the current config. + CurrentConfigVersion string `json:"currentConfigVersion,omitempty"` + + // ErrorMsg: The latest error message. + ErrorMsg string `json:"errorMsg,omitempty"` + + // ExpectedConfigVersion: The version of the expected config. + ExpectedConfigVersion string `json:"expectedConfigVersion,omitempty"` + + // ExtendedStatus: The extended status. Such as ExitCode, StartedAt, + // FinishedAt, etc. + ExtendedStatus map[string]string `json:"extendedStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CurrentConfigVersion") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrentConfigVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpAppconnectorsV1ContainerHealthDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpAppconnectorsV1ContainerHealthDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpAppconnectorsV1RemoteAgentDetails: +// RemoteAgentDetails reflects the details of a remote agent. +type GoogleCloudBeyondcorpAppconnectorsV1RemoteAgentDetails struct { +} + // GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector: A BeyondCorp // connector resource that represents an application facing component // deployed proximal to and with direct access to the application @@ -2308,6 +2459,58 @@ func (s *GoogleCloudBeyondcorpAppconnectorsV1alphaResourceInfo) MarshalJSON() ([ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpAppgatewaysV1AppGatewayOperationMetadata: +// Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpAppgatewaysV1AppGatewayOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpAppgatewaysV1AppGatewayOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpAppgatewaysV1AppGatewayOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata: // Represents the metadata of the long-running operation. type GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata struct { @@ -2357,6 +2560,111 @@ func (s *GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata) M return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudBeyondcorpClientconnectorservicesV1ClientConnectorServiceOp +// erationMetadata: Represents the metadata of the long-running +// operation. +type GoogleCloudBeyondcorpClientconnectorservicesV1ClientConnectorServiceOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpClientconnectorservicesV1ClientConnectorServiceOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpClientconnectorservicesV1ClientConnectorServiceOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudBeyondcorpClientgatewaysV1ClientGatewayOperationMetadata: +// Represents the metadata of the long-running operation. +type GoogleCloudBeyondcorpClientgatewaysV1ClientGatewayOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been + // cancelled successfully have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpClientgatewaysV1ClientGatewayOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpClientgatewaysV1ClientGatewayOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { @@ -10014,7 +10322,7 @@ func (c *ProjectsLocationsClientConnectorServicesPatchCall) RequestId(requestId // in the update_mask are relative to the resource, not the full // request. A field will be overwritten if it is in the mask. If the // user does not provide a mask then all fields will be overwritten. -// Mutable fields: display_name. +// Mutable fields: display_name, ingress.config.destination_routes. func (c *ProjectsLocationsClientConnectorServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClientConnectorServicesPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -10145,7 +10453,7 @@ func (c *ProjectsLocationsClientConnectorServicesPatchCall) Do(opts ...googleapi // "type": "string" // }, // "updateMask": { - // "description": "Required. Field mask is used to specify the fields to be overwritten in the ClientConnectorService resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. Mutable fields: display_name.", + // "description": "Required. Field mask is used to specify the fields to be overwritten in the ClientConnectorService resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. Mutable fields: display_name, ingress.config.destination_routes.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index f539696b217..ca5f819ea20 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -546,7 +546,7 @@ } } }, - "revision": "20220509", + "revision": "20220707", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -964,6 +964,153 @@ }, "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" + }, + "cancelRequested": { + "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "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" + }, + "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" + }, + "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" + }, "GoogleCloudFunctionsV2alphaOperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "GoogleCloudFunctionsV2alphaOperationMetadata", diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index cc712257262..efa666b5a9c 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -986,6 +986,161 @@ func (s *GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, 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"` + + // CancelRequested: Identifies whether the user has requested + // cancellation of the operation. Operations that have successfully been + // cancelled have Operation.error value with a google.rpc.Status.code of + // 1, corresponding to `Code.CANCELLED`. + 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"` + + // RequestResource: The original request that started the operation. + RequestResource googleapi.RawMessage `json:"requestResource,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2Stage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2Stage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2StateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2StateMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata // of the long-running operation. type GoogleCloudFunctionsV2alphaOperationMetadata struct { diff --git a/cloudfunctions/v2/cloudfunctions-api.json b/cloudfunctions/v2/cloudfunctions-api.json index 32b30be7c05..318b9ce0664 100644 --- a/cloudfunctions/v2/cloudfunctions-api.json +++ b/cloudfunctions/v2/cloudfunctions-api.json @@ -154,6 +154,145 @@ "resources": { "functions": { "methods": { + "create": { + "description": "Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "functionId": { + "description": "The ID to use for the function, which will become the final component of the function's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location in which the function should be created, specified in the format `projects/*/locations/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/functions", + "request": { + "$ref": "Function" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "httpMethod": "DELETE", + "id": "cloudfunctions.projects.locations.functions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the function which should be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateDownloadUrl": { + "description": "Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:generateDownloadUrl", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.generateDownloadUrl", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of function for which source code Google Cloud Storage signed URL should be generated.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:generateDownloadUrl", + "request": { + "$ref": "GenerateDownloadUrlRequest" + }, + "response": { + "$ref": "GenerateDownloadUrlResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "generateUploadUrl": { + "description": "Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrl", + "httpMethod": "POST", + "id": "cloudfunctions.projects.locations.functions.generateUploadUrl", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/functions:generateUploadUrl", + "request": { + "$ref": "GenerateUploadUrlRequest" + }, + "response": { + "$ref": "GenerateUploadUrlResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns a function with the given name from the requested project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.functions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the function which details should be obtained.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "Function" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getIamPolicy": { "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", @@ -185,6 +324,86 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Returns a list of functions that belong to the requested project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.functions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter for Functions that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "The sorting order of the resources returned. Value should be a comma separated list of fields. The default sorting oder is ascending. See https://google.aip.dev/132#ordering.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of functions to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the function should be listed, specified in the format `projects/*/locations/*` If you want to list functions in all locations, use \"-\" in place of a location. When listing functions in all locations, if one or more location(s) are unreachable, the response will contain functions from all reachable locations along with the names of any unreachable locations.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/functions", + "response": { + "$ref": "ListFunctionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates existing function.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "httpMethod": "PATCH", + "id": "cloudfunctions.projects.locations.functions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated. If no field mask is provided, all provided fields in the request will be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "Function" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicy", @@ -312,13 +531,47 @@ ] } } + }, + "runtimes": { + "methods": { + "list": { + "description": "Returns a list of runtimes that are supported for the requested project.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/runtimes", + "httpMethod": "GET", + "id": "cloudfunctions.projects.locations.runtimes.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter for Runtimes that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the runtimes should be listed, specified in the format `projects/*/locations/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/runtimes", + "response": { + "$ref": "ListRuntimesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } } } }, - "revision": "20220509", + "revision": "20220707", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -350,65 +603,449 @@ }, "type": "array" }, - "logType": { - "description": "The log type that this config enables.", + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "BuildConfig": { + "description": "Describes the Build step of the function that builds a container from the given source.", + "id": "BuildConfig", + "properties": { + "build": { + "description": "Output only. The Cloud Build name of the latest successful deployment of the function.", + "readOnly": true, + "type": "string" + }, + "dockerRepository": { + "description": "Optional. User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, GCF will create and use a repository named 'gcf-artifacts' for every deployed region. It must match the pattern `projects/{project}/locations/{location}/repositories/{repository}`. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.", + "type": "string" + }, + "entryPoint": { + "description": "The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named \"function\". For Node.js this is name of a function exported by the module specified in `source_location`.", + "type": "string" + }, + "environmentVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "User-provided build-time environment variables for the function", + "type": "object" + }, + "runtime": { + "description": "The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the [`gcloud` command reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime).", + "type": "string" + }, + "source": { + "$ref": "Source", + "description": "The location of the function source code." + }, + "sourceProvenance": { + "$ref": "SourceProvenance", + "description": "Output only. A permanent fixed identifier for source.", + "readOnly": true + }, + "workerPool": { + "description": "Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is `projects/{project}/locations/{region}/workerPools/{workerPool}` where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool. If the project id is not the same as the function, then the Cloud Functions Service Agent (service-@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.", + "type": "string" + } + }, + "type": "object" + }, + "EventFilter": { + "description": "Filters events based on exact matches on the CloudEvents attributes.", + "id": "EventFilter", + "properties": { + "attribute": { + "description": "Required. The name of a CloudEvents attribute.", + "type": "string" + }, + "operator": { + "description": "Optional. The operator used for matching the events with the value of the filter. If not specified, only events that have an exact key-value pair specified in the filter are matched. The only allowed value is `match-path-pattern`.", + "type": "string" + }, + "value": { + "description": "Required. The value for the attribute.", + "type": "string" + } + }, + "type": "object" + }, + "EventTrigger": { + "description": "Describes EventTrigger, used to request events to be sent from another service.", + "id": "EventTrigger", + "properties": { + "channel": { + "description": "Optional. The name of the channel associated with the trigger in `projects/{project}/locations/{location}/channels/{channel}` format. You must provide a channel to receive events from Eventarc SaaS partners.", + "type": "string" + }, + "eventFilters": { + "description": "Criteria used to filter events.", + "items": { + "$ref": "EventFilter" + }, + "type": "array" + }, + "eventType": { + "description": "Required. The type of event to observe. For example: `google.cloud.audit.log.v1.written` or `google.cloud.pubsub.topic.v1.messagePublished`.", + "type": "string" + }, + "pubsubTopic": { + "description": "Optional. The name of a Pub/Sub topic in the same project that will be used as the transport topic for the event delivery. Format: `projects/{project}/topics/{topic}`. This is only valid for events of type `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here will not be deleted at function deletion.", + "type": "string" + }, + "retryPolicy": { + "description": "Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).", + "enum": [ + "RETRY_POLICY_UNSPECIFIED", + "RETRY_POLICY_DO_NOT_RETRY", + "RETRY_POLICY_RETRY" + ], + "enumDescriptions": [ + "Not specified.", + "Do not retry.", + "Retry on any failure, retry up to 7 days with an exponential backoff (capped at 10 seconds)." + ], + "type": "string" + }, + "serviceAccountEmail": { + "description": "Optional. The email of the trigger's service account. The service account must have permission to invoke Cloud Run services, the permission is `run.routes.invoke`. If empty, defaults to the Compute Engine default service account: `{project_number}-compute@developer.gserviceaccount.com`.", + "type": "string" + }, + "trigger": { + "description": "Output only. The resource name of the Eventarc trigger. The format of this field is `projects/{project}/locations/{region}/triggers/{trigger}`.", + "readOnly": true, + "type": "string" + }, + "triggerRegion": { + "description": "The region that the trigger will be in. The trigger will only receive events originating in this region. It can be the same region as the function, a different region or multi-region, or the global region. If not provided, defaults to the same region as the function.", + "type": "string" + } + }, + "type": "object" + }, + "Expr": { + "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", + "id": "Expr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + }, + "Function": { + "description": "Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.", + "id": "Function", + "properties": { + "buildConfig": { + "$ref": "BuildConfig", + "description": "Describes the Build step of the function that builds a container from the given source." + }, + "description": { + "description": "User-provided description of a function.", + "type": "string" + }, + "environment": { + "description": "Describe whether the function is gen1 or gen2.", + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "GEN_1", + "GEN_2" + ], + "enumDescriptions": [ + "Unspecified", + "Gen 1", + "Gen 2" + ], + "type": "string" + }, + "eventTrigger": { + "$ref": "EventTrigger", + "description": "An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels associated with this Cloud Function.", + "type": "object" + }, + "name": { + "description": "A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`", + "type": "string" + }, + "serviceConfig": { + "$ref": "ServiceConfig", + "description": "Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed)." + }, + "state": { + "description": "Output only. State of the function.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "FAILED", + "DEPLOYING", + "DELETING", + "UNKNOWN" + ], + "enumDescriptions": [ + "Not specified. Invalid state.", + "Function has been successfully deployed and is serving.", + "Function deployment failed and the function is not serving.", + "Function is being created or updated.", + "Function is being deleted.", + "Function deployment failed and the function serving state is undefined. The function should be updated or deleted to move it out of this state." + ], + "readOnly": true, + "type": "string" + }, + "stateMessages": { + "description": "Output only. State Messages for this Cloud Function.", + "items": { + "$ref": "GoogleCloudFunctionsV2StateMessage" + }, + "readOnly": true, + "type": "array" + }, + "updateTime": { + "description": "Output only. The last update timestamp of a Cloud Function.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GenerateDownloadUrlRequest": { + "description": "Request of `GenerateDownloadUrl` method.", + "id": "GenerateDownloadUrlRequest", + "properties": {}, + "type": "object" + }, + "GenerateDownloadUrlResponse": { + "description": "Response of `GenerateDownloadUrl` method.", + "id": "GenerateDownloadUrlResponse", + "properties": { + "downloadUrl": { + "description": "The generated Google Cloud Storage signed URL that should be used for function source code download.", + "type": "string" + } + }, + "type": "object" + }, + "GenerateUploadUrlRequest": { + "description": "Request of `GenerateSourceUploadUrl` method.", + "id": "GenerateUploadUrlRequest", + "properties": {}, + "type": "object" + }, + "GenerateUploadUrlResponse": { + "description": "Response of `GenerateSourceUploadUrl` method.", + "id": "GenerateUploadUrlResponse", + "properties": { + "storageSource": { + "$ref": "StorageSource", + "description": "The location of the source code in the upload bucket. Once the archive is uploaded using the `upload_url` use this field to set the `function.build_config.source.storage_source` during CreateFunction and UpdateFunction. Generation defaults to 0, as Cloud Storage provides a new generation only upon uploading a new object or version of an object." + }, + "uploadUrl": { + "description": "The generated Google Cloud Storage signed URL that should be used for a function source code upload. The uploaded file should be a zip archive which contains a function.", + "type": "string" + } + }, + "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" + }, + "cancelRequested": { + "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "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" + }, + "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" + }, + "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": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" + "STATE_UNSPECIFIED", + "NOT_STARTED", + "IN_PROGRESS", + "COMPLETE" ], "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" + "Not specified. Invalid state.", + "Stage has not started.", + "Stage is in progress.", + "Stage has completed." ], "type": "string" - } - }, - "type": "object" - }, - "Binding": { - "description": "Associates `members`, or principals, with a `role`.", - "id": "Binding", - "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." }, - "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "stateMessages": { + "description": "State messages from the current Stage.", "items": { - "type": "string" + "$ref": "GoogleCloudFunctionsV2StateMessage" }, "type": "array" - }, - "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", - "type": "string" } }, "type": "object" }, - "Expr": { - "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", - "id": "Expr", + "GoogleCloudFunctionsV2StateMessage": { + "description": "Informational messages about the state of the Cloud Function or Operation.", + "id": "GoogleCloudFunctionsV2StateMessage", "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language syntax.", + "message": { + "description": "The message.", "type": "string" }, - "location": { - "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "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" }, - "title": { - "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": { + "description": "One-word CamelCase type of the state message.", "type": "string" } }, @@ -708,6 +1345,31 @@ }, "type": "object" }, + "ListFunctionsResponse": { + "description": "Response for the `ListFunctions` method.", + "id": "ListFunctionsResponse", + "properties": { + "functions": { + "description": "The functions that match the request.", + "items": { + "$ref": "Function" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached. The response does not include any functions from these locations.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -744,6 +1406,20 @@ }, "type": "object" }, + "ListRuntimesResponse": { + "description": "Response for the `ListRuntimes` method.", + "id": "ListRuntimesResponse", + "properties": { + "runtimes": { + "description": "The runtimes that match the request.", + "items": { + "$ref": "Runtime" + }, + "type": "array" + } + }, + "type": "object" + }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "id": "Location", @@ -901,6 +1577,267 @@ }, "type": "object" }, + "RepoSource": { + "description": "Location of the source in a Google Cloud Source Repository.", + "id": "RepoSource", + "properties": { + "branchName": { + "description": "Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + }, + "commitSha": { + "description": "Explicit commit SHA to build.", + "type": "string" + }, + "dir": { + "description": "Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution. eg. helloworld (no leading slash allowed)", + "type": "string" + }, + "invertRegex": { + "description": "Only trigger a build if the revision regex does NOT match the revision regex.", + "type": "boolean" + }, + "projectId": { + "description": "ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.", + "type": "string" + }, + "repoName": { + "description": "Name of the Cloud Source Repository.", + "type": "string" + }, + "tagName": { + "description": "Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", + "type": "string" + } + }, + "type": "object" + }, + "Runtime": { + "description": "Describes a runtime and any special information (e.g., deprecation status) related to it.", + "id": "Runtime", + "properties": { + "displayName": { + "description": "The user facing name, eg 'Go 1.13', 'Node.js 12', etc.", + "type": "string" + }, + "environment": { + "description": "The environment for the runtime.", + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "GEN_1", + "GEN_2" + ], + "enumDescriptions": [ + "Unspecified", + "Gen 1", + "Gen 2" + ], + "type": "string" + }, + "name": { + "description": "The name of the runtime, e.g., 'go113', 'nodejs12', etc.", + "type": "string" + }, + "stage": { + "description": "The stage of life this runtime is in, e.g., BETA, GA, etc.", + "enum": [ + "RUNTIME_STAGE_UNSPECIFIED", + "DEVELOPMENT", + "ALPHA", + "BETA", + "GA", + "DEPRECATED", + "DECOMMISSIONED" + ], + "enumDescriptions": [ + "Not specified.", + "The runtime is in development.", + "The runtime is in the Alpha stage.", + "The runtime is in the Beta stage.", + "The runtime is generally available.", + "The runtime is deprecated.", + "The runtime is no longer supported." + ], + "type": "string" + }, + "warnings": { + "description": "Warning messages, e.g., a deprecation warning.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "SecretEnvVar": { + "description": "Configuration for a secret environment variable. It has the information necessary to fetch the secret value from secret manager and expose it as an environment variable.", + "id": "SecretEnvVar", + "properties": { + "key": { + "description": "Name of the environment variable.", + "type": "string" + }, + "projectId": { + "description": "Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function.", + "type": "string" + }, + "secret": { + "description": "Name of the secret in secret manager (not the full resource name).", + "type": "string" + }, + "version": { + "description": "Version of the secret (version number or the string 'latest'). It is recommended to use a numeric version for secret environment variables as any updates to the secret value is not reflected until new instances start.", + "type": "string" + } + }, + "type": "object" + }, + "SecretVersion": { + "description": "Configuration for a single version.", + "id": "SecretVersion", + "properties": { + "path": { + "description": "Relative path of the file under the mount path where the secret value for this version will be fetched and made available. For example, setting the mount_path as '/etc/secrets' and path as `secret_foo` would mount the secret value file at `/etc/secrets/secret_foo`.", + "type": "string" + }, + "version": { + "description": "Version of the secret (version number or the string 'latest'). It is preferable to use `latest` version with secret volumes as secret value changes are reflected immediately.", + "type": "string" + } + }, + "type": "object" + }, + "SecretVolume": { + "description": "Configuration for a secret volume. It has the information necessary to fetch the secret value from secret manager and make it available as files mounted at the requested paths within the application container.", + "id": "SecretVolume", + "properties": { + "mountPath": { + "description": "The path within the container to mount the secret volume. For example, setting the mount_path as `/etc/secrets` would mount the secret value files under the `/etc/secrets` directory. This directory will also be completely shadowed and unavailable to mount any other secrets. Recommended mount path: /etc/secrets", + "type": "string" + }, + "projectId": { + "description": "Project identifier (preferably project number but can also be the project ID) of the project that contains the secret. If not set, it is assumed that the secret is in the same project as the function.", + "type": "string" + }, + "secret": { + "description": "Name of the secret in secret manager (not the full resource name).", + "type": "string" + }, + "versions": { + "description": "List of secret versions to mount for this secret. If empty, the `latest` version of the secret will be made available in a file named after the secret under the mount point.", + "items": { + "$ref": "SecretVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "ServiceConfig": { + "description": "Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).", + "id": "ServiceConfig", + "properties": { + "allTrafficOnLatestRevision": { + "description": "Whether 100% of traffic is routed to the latest revision. On CreateFunction and UpdateFunction, when set to true, the revision being deployed will serve 100% of traffic, ignoring any traffic split settings, if any. On GetFunction, true will be returned if the latest revision is serving 100% of traffic.", + "type": "boolean" + }, + "availableMemory": { + "description": "The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.", + "type": "string" + }, + "environmentVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables that shall be available during function execution.", + "type": "object" + }, + "ingressSettings": { + "description": "The ingress settings for the function, controlling what traffic can reach it.", + "enum": [ + "INGRESS_SETTINGS_UNSPECIFIED", + "ALLOW_ALL", + "ALLOW_INTERNAL_ONLY", + "ALLOW_INTERNAL_AND_GCLB" + ], + "enumDescriptions": [ + "Unspecified.", + "Allow HTTP traffic from public and private sources.", + "Allow HTTP traffic from only private VPC sources.", + "Allow HTTP traffic from private VPC sources and through GCLB." + ], + "type": "string" + }, + "maxInstanceCount": { + "description": "The limit on the maximum number of function instances that may coexist at a given time. In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max instances value than your function can tolerate. See the [Max Instances](https://cloud.google.com/functions/docs/max-instances) Guide for more details.", + "format": "int32", + "type": "integer" + }, + "minInstanceCount": { + "description": "The limit on the minimum number of function instances that may coexist at a given time. Function instances are kept in idle state for a short period after they finished executing the request to reduce cold start time for subsequent requests. Setting a minimum instance count will ensure that the given number of instances are kept running in idle state always. This can help with cold start times when jump in incoming request count occurs after the idle instance would have been stopped in the default case.", + "format": "int32", + "type": "integer" + }, + "revision": { + "description": "Output only. The name of service revision.", + "readOnly": true, + "type": "string" + }, + "secretEnvironmentVariables": { + "description": "Secret environment variables configuration.", + "items": { + "$ref": "SecretEnvVar" + }, + "type": "array" + }, + "secretVolumes": { + "description": "Secret volumes configuration.", + "items": { + "$ref": "SecretVolume" + }, + "type": "array" + }, + "service": { + "description": "Output only. Name of the service associated with a Function. The format of this field is `projects/{project}/locations/{region}/services/{service}`", + "readOnly": true, + "type": "string" + }, + "serviceAccountEmail": { + "description": "The email of the service's service account. If empty, defaults to `{project_number}-compute@developer.gserviceaccount.com`.", + "type": "string" + }, + "timeoutSeconds": { + "description": "The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.", + "format": "int32", + "type": "integer" + }, + "uri": { + "description": "Output only. URI of the Service deployed.", + "readOnly": true, + "type": "string" + }, + "vpcConnector": { + "description": "The Serverless VPC Access connector that this cloud function can connect to. The format of this field is `projects/*/locations/*/connectors/*`.", + "type": "string" + }, + "vpcConnectorEgressSettings": { + "description": "The egress settings for the connector, controlling what traffic is diverted through it.", + "enum": [ + "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED", + "PRIVATE_RANGES_ONLY", + "ALL_TRAFFIC" + ], + "enumDescriptions": [ + "Unspecified.", + "Use the VPC Access Connector only for private IP space from RFC1918.", + "Force the use of VPC Access Connector for all egress traffic from the function." + ], + "type": "string" + } + }, + "type": "object" + }, "SetIamPolicyRequest": { "description": "Request message for `SetIamPolicy` method.", "id": "SetIamPolicyRequest", @@ -917,6 +1854,36 @@ }, "type": "object" }, + "Source": { + "description": "The location of the function source code.", + "id": "Source", + "properties": { + "repoSource": { + "$ref": "RepoSource", + "description": "If provided, get the source from this location in a Cloud Source Repository." + }, + "storageSource": { + "$ref": "StorageSource", + "description": "If provided, get the source from this location in Google Cloud Storage." + } + }, + "type": "object" + }, + "SourceProvenance": { + "description": "Provenance of the source. Ways to find the original source, or verify that some source was used for this build.", + "id": "SourceProvenance", + "properties": { + "resolvedRepoSource": { + "$ref": "RepoSource", + "description": "A copy of the build's `source.repo_source`, if exists, with any revisions resolved." + }, + "resolvedStorageSource": { + "$ref": "StorageSource", + "description": "A copy of the build's `source.storage_source`, if exists, with any generations resolved." + } + }, + "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", @@ -944,6 +1911,26 @@ }, "type": "object" }, + "StorageSource": { + "description": "Location of the source in an archive file in Google Cloud Storage.", + "id": "StorageSource", + "properties": { + "bucket": { + "description": "Google Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", + "type": "string" + }, + "generation": { + "description": "Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", + "format": "int64", + "type": "string" + }, + "object": { + "description": "Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.", + "type": "string" + } + }, + "type": "object" + }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index b6890dea299..a00b2ac1f33 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -153,6 +153,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Functions = NewProjectsLocationsFunctionsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.Runtimes = NewProjectsLocationsRuntimesService(s) return rs } @@ -162,6 +163,8 @@ type ProjectsLocationsService struct { Functions *ProjectsLocationsFunctionsService Operations *ProjectsLocationsOperationsService + + Runtimes *ProjectsLocationsRuntimesService } func NewProjectsLocationsFunctionsService(s *Service) *ProjectsLocationsFunctionsService { @@ -182,6 +185,15 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsRuntimesService(s *Service) *ProjectsLocationsRuntimesService { + rs := &ProjectsLocationsRuntimesService{s: s} + return rs +} + +type ProjectsLocationsRuntimesService struct { + s *Service +} + // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must @@ -352,6 +364,201 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BuildConfig: Describes the Build step of the function that builds a +// container from the given source. +type BuildConfig struct { + // Build: Output only. The Cloud Build name of the latest successful + // deployment of the function. + Build string `json:"build,omitempty"` + + // DockerRepository: Optional. User managed repository created in + // Artifact Registry optionally with a customer managed encryption key. + // This is the repository to which the function docker image will be + // pushed after it is built by Cloud Build. If unspecified, GCF will + // create and use a repository named 'gcf-artifacts' for every deployed + // region. It must match the pattern + // `projects/{project}/locations/{location}/repositories/{repository}`. + // Cross-project repositories are not supported. Cross-location + // repositories are not supported. Repository format must be 'DOCKER'. + DockerRepository string `json:"dockerRepository,omitempty"` + + // EntryPoint: The name of the function (as defined in source code) that + // will be executed. Defaults to the resource name suffix, if not + // specified. For backward compatibility, if function with given name is + // not found, then the system will try to use function named "function". + // For Node.js this is name of a function exported by the module + // specified in `source_location`. + EntryPoint string `json:"entryPoint,omitempty"` + + // EnvironmentVariables: User-provided build-time environment variables + // for the function + EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` + + // Runtime: The runtime in which to run the function. Required when + // deploying a new function, optional when updating an existing + // function. For a complete list of possible choices, see the `gcloud` + // command reference + // (https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + Runtime string `json:"runtime,omitempty"` + + // Source: The location of the function source code. + Source *Source `json:"source,omitempty"` + + // SourceProvenance: Output only. A permanent fixed identifier for + // source. + SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"` + + // WorkerPool: Name of the Cloud Build Custom Worker Pool that should be + // used to build the function. The format of this field is + // `projects/{project}/locations/{region}/workerPools/{workerPool}` + // where {project} and {region} are the project id and region + // respectively where the worker pool is defined and {workerPool} is the + // short name of the worker pool. If the project id is not the same as + // the function, then the Cloud Functions Service Agent + // (service-@gcf-admin-robot.iam.gserviceaccount.com) must be granted + // the role Cloud Build Custom Workers Builder + // (roles/cloudbuild.customworkers.builder) in the project. + WorkerPool string `json:"workerPool,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Build") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Build") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BuildConfig) MarshalJSON() ([]byte, error) { + type NoMethod BuildConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EventFilter: Filters events based on exact matches on the CloudEvents +// attributes. +type EventFilter struct { + // Attribute: Required. The name of a CloudEvents attribute. + Attribute string `json:"attribute,omitempty"` + + // Operator: Optional. The operator used for matching the events with + // the value of the filter. If not specified, only events that have an + // exact key-value pair specified in the filter are matched. The only + // allowed value is `match-path-pattern`. + Operator string `json:"operator,omitempty"` + + // Value: Required. The value for the attribute. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Attribute") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attribute") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EventFilter) MarshalJSON() ([]byte, error) { + type NoMethod EventFilter + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// EventTrigger: Describes EventTrigger, used to request events to be +// sent from another service. +type EventTrigger struct { + // Channel: Optional. The name of the channel associated with the + // trigger in + // `projects/{project}/locations/{location}/channels/{channel}` format. + // You must provide a channel to receive events from Eventarc SaaS + // partners. + Channel string `json:"channel,omitempty"` + + // EventFilters: Criteria used to filter events. + EventFilters []*EventFilter `json:"eventFilters,omitempty"` + + // EventType: Required. The type of event to observe. For example: + // `google.cloud.audit.log.v1.written` or + // `google.cloud.pubsub.topic.v1.messagePublished`. + EventType string `json:"eventType,omitempty"` + + // PubsubTopic: Optional. The name of a Pub/Sub topic in the same + // project that will be used as the transport topic for the event + // delivery. Format: `projects/{project}/topics/{topic}`. This is only + // valid for events of type + // `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided + // here will not be deleted at function deletion. + PubsubTopic string `json:"pubsubTopic,omitempty"` + + // RetryPolicy: Optional. If unset, then defaults to ignoring failures + // (i.e. not retrying them). + // + // Possible values: + // "RETRY_POLICY_UNSPECIFIED" - Not specified. + // "RETRY_POLICY_DO_NOT_RETRY" - Do not retry. + // "RETRY_POLICY_RETRY" - Retry on any failure, retry up to 7 days + // with an exponential backoff (capped at 10 seconds). + RetryPolicy string `json:"retryPolicy,omitempty"` + + // ServiceAccountEmail: Optional. The email of the trigger's service + // account. The service account must have permission to invoke Cloud Run + // services, the permission is `run.routes.invoke`. If empty, defaults + // to the Compute Engine default service account: + // `{project_number}-compute@developer.gserviceaccount.com`. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // Trigger: Output only. The resource name of the Eventarc trigger. The + // format of this field is + // `projects/{project}/locations/{region}/triggers/{trigger}`. + Trigger string `json:"trigger,omitempty"` + + // TriggerRegion: The region that the trigger will be in. The trigger + // will only receive events originating in this region. It can be the + // same region as the function, a different region or multi-region, or + // the global region. If not provided, defaults to the same region as + // the function. + TriggerRegion string `json:"triggerRegion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Channel") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Channel") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *EventTrigger) MarshalJSON() ([]byte, error) { + type NoMethod EventTrigger + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Expr: Represents a textual expression in the Common Expression // Language (CEL) syntax. CEL is a C-like expression language. The // syntax and semantics of CEL are documented at @@ -412,9 +619,178 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata -// of the long-running operation. -type GoogleCloudFunctionsV2alphaOperationMetadata struct { +// Function: Describes a Cloud Function that contains user computation +// executed in response to an event. It encapsulates function and +// trigger configurations. +type Function struct { + // BuildConfig: Describes the Build step of the function that builds a + // container from the given source. + BuildConfig *BuildConfig `json:"buildConfig,omitempty"` + + // Description: User-provided description of a function. + Description string `json:"description,omitempty"` + + // Environment: Describe whether the function is gen1 or gen2. + // + // Possible values: + // "ENVIRONMENT_UNSPECIFIED" - Unspecified + // "GEN_1" - Gen 1 + // "GEN_2" - Gen 2 + Environment string `json:"environment,omitempty"` + + // EventTrigger: An Eventarc trigger managed by Google Cloud Functions + // that fires events in response to a condition in another service. + EventTrigger *EventTrigger `json:"eventTrigger,omitempty"` + + // Labels: Labels associated with this Cloud Function. + Labels map[string]string `json:"labels,omitempty"` + + // Name: A user-defined name of the function. Function names must be + // unique globally and match pattern + // `projects/*/locations/*/functions/*` + Name string `json:"name,omitempty"` + + // ServiceConfig: Describes the Service being deployed. Currently + // deploys services to Cloud Run (fully managed). + ServiceConfig *ServiceConfig `json:"serviceConfig,omitempty"` + + // State: Output only. State of the function. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not specified. Invalid state. + // "ACTIVE" - Function has been successfully deployed and is serving. + // "FAILED" - Function deployment failed and the function is not + // serving. + // "DEPLOYING" - Function is being created or updated. + // "DELETING" - Function is being deleted. + // "UNKNOWN" - Function deployment failed and the function serving + // state is undefined. The function should be updated or deleted to move + // it out of this state. + State string `json:"state,omitempty"` + + // StateMessages: Output only. State Messages for this Cloud Function. + StateMessages []*GoogleCloudFunctionsV2StateMessage `json:"stateMessages,omitempty"` + + // UpdateTime: Output only. The last update timestamp of a Cloud + // Function. + 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. "BuildConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BuildConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Function) MarshalJSON() ([]byte, error) { + type NoMethod Function + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateDownloadUrlRequest: Request of `GenerateDownloadUrl` method. +type GenerateDownloadUrlRequest struct { +} + +// GenerateDownloadUrlResponse: Response of `GenerateDownloadUrl` +// method. +type GenerateDownloadUrlResponse struct { + // DownloadUrl: The generated Google Cloud Storage signed URL that + // should be used for function source code download. + DownloadUrl string `json:"downloadUrl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DownloadUrl") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DownloadUrl") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateDownloadUrlResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateDownloadUrlResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GenerateUploadUrlRequest: Request of `GenerateSourceUploadUrl` +// method. +type GenerateUploadUrlRequest struct { +} + +// GenerateUploadUrlResponse: Response of `GenerateSourceUploadUrl` +// method. +type GenerateUploadUrlResponse struct { + // StorageSource: The location of the source code in the upload bucket. + // Once the archive is uploaded using the `upload_url` use this field to + // set the `function.build_config.source.storage_source` during + // CreateFunction and UpdateFunction. Generation defaults to 0, as Cloud + // Storage provides a new generation only upon uploading a new object or + // version of an object. + StorageSource *StorageSource `json:"storageSource,omitempty"` + + // UploadUrl: The generated Google Cloud Storage signed URL that should + // be used for a function source code upload. The uploaded file should + // be a zip archive which contains a function. + UploadUrl string `json:"uploadUrl,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "StorageSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StorageSource") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) { + type NoMethod GenerateUploadUrlResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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"` @@ -434,7 +810,7 @@ type GoogleCloudFunctionsV2alphaOperationMetadata struct { RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2alphaStage `json:"stages,omitempty"` + Stages []*GoogleCloudFunctionsV2Stage `json:"stages,omitempty"` // StatusDetail: Human-readable status of the operation, if any. StatusDetail string `json:"statusDetail,omitempty"` @@ -462,15 +838,14 @@ type GoogleCloudFunctionsV2alphaOperationMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudFunctionsV2alphaOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaOperationMetadata +func (s *GoogleCloudFunctionsV2OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2OperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2alphaStage: Each Stage of the deployment -// process -type GoogleCloudFunctionsV2alphaStage struct { +// GoogleCloudFunctionsV2Stage: Each Stage of the deployment process +type GoogleCloudFunctionsV2Stage struct { // Message: Message describing the Stage Message string `json:"message,omitempty"` @@ -502,7 +877,7 @@ type GoogleCloudFunctionsV2alphaStage struct { State string `json:"state,omitempty"` // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2alphaStateMessage `json:"stateMessages,omitempty"` + 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 @@ -521,15 +896,15 @@ type GoogleCloudFunctionsV2alphaStage struct { NullFields []string `json:"-"` } -func (s *GoogleCloudFunctionsV2alphaStage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaStage +func (s *GoogleCloudFunctionsV2Stage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2Stage raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2alphaStateMessage: Informational messages about -// the state of the Cloud Function or Operation. -type GoogleCloudFunctionsV2alphaStateMessage struct { +// GoogleCloudFunctionsV2StateMessage: Informational messages about the +// state of the Cloud Function or Operation. +type GoogleCloudFunctionsV2StateMessage struct { // Message: The message. Message string `json:"message,omitempty"` @@ -562,15 +937,15 @@ type GoogleCloudFunctionsV2alphaStateMessage struct { NullFields []string `json:"-"` } -func (s *GoogleCloudFunctionsV2alphaStateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2alphaStateMessage +func (s *GoogleCloudFunctionsV2StateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2StateMessage raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2betaOperationMetadata: Represents the metadata +// GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata // of the long-running operation. -type GoogleCloudFunctionsV2betaOperationMetadata struct { +type GoogleCloudFunctionsV2alphaOperationMetadata struct { // ApiVersion: API version used to start the operation. ApiVersion string `json:"apiVersion,omitempty"` @@ -590,7 +965,7 @@ type GoogleCloudFunctionsV2betaOperationMetadata struct { RequestResource googleapi.RawMessage `json:"requestResource,omitempty"` // Stages: Mechanism for reporting in-progress stages - Stages []*GoogleCloudFunctionsV2betaStage `json:"stages,omitempty"` + Stages []*GoogleCloudFunctionsV2alphaStage `json:"stages,omitempty"` // StatusDetail: Human-readable status of the operation, if any. StatusDetail string `json:"statusDetail,omitempty"` @@ -618,14 +993,15 @@ type GoogleCloudFunctionsV2betaOperationMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudFunctionsV2betaOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaOperationMetadata +func (s *GoogleCloudFunctionsV2alphaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2alphaOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2betaStage: Each Stage of the deployment process -type GoogleCloudFunctionsV2betaStage struct { +// GoogleCloudFunctionsV2alphaStage: Each Stage of the deployment +// process +type GoogleCloudFunctionsV2alphaStage struct { // Message: Message describing the Stage Message string `json:"message,omitempty"` @@ -657,7 +1033,7 @@ type GoogleCloudFunctionsV2betaStage struct { State string `json:"state,omitempty"` // StateMessages: State messages from the current Stage. - StateMessages []*GoogleCloudFunctionsV2betaStateMessage `json:"stateMessages,omitempty"` + 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 @@ -676,15 +1052,15 @@ type GoogleCloudFunctionsV2betaStage struct { NullFields []string `json:"-"` } -func (s *GoogleCloudFunctionsV2betaStage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaStage +func (s *GoogleCloudFunctionsV2alphaStage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2alphaStage raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudFunctionsV2betaStateMessage: Informational messages about +// GoogleCloudFunctionsV2alphaStateMessage: Informational messages about // the state of the Cloud Function or Operation. -type GoogleCloudFunctionsV2betaStateMessage struct { +type GoogleCloudFunctionsV2alphaStateMessage struct { // Message: The message. Message string `json:"message,omitempty"` @@ -717,27 +1093,223 @@ type GoogleCloudFunctionsV2betaStateMessage struct { NullFields []string `json:"-"` } -func (s *GoogleCloudFunctionsV2betaStateMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudFunctionsV2betaStateMessage +func (s *GoogleCloudFunctionsV2alphaStateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2alphaStateMessage raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ListLocationsResponse: The response message for -// Locations.ListLocations. -type ListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*Location `json:"locations,omitempty"` +// 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"` - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` + // CancelRequested: Identifies whether the user has requested + // cancellation of the operation. Operations that have successfully been + // cancelled have Operation.error value with a google.rpc.Status.code of + // 1, corresponding to `Code.CANCELLED`. + CancelRequested bool `json:"cancelRequested,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // CreateTime: The time the operation was created. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Locations") to + // EndTime: The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestResource: The original request that started the operation. + RequestResource googleapi.RawMessage `json:"requestResource,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2betaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2betaOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2betaStage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2betaStage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2betaStateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2betaStateMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListFunctionsResponse: Response for the `ListFunctions` method. +type ListFunctionsResponse struct { + // Functions: The functions that match the request. + Functions []*Function `json:"functions,omitempty"` + + // NextPageToken: A token, which can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. The response does + // not include any functions from these locations. + 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. "Functions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Functions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListFunctionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListFunctionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -797,6 +1369,38 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListRuntimesResponse: Response for the `ListRuntimes` method. +type ListRuntimesResponse struct { + // Runtimes: The runtimes that match the request. + Runtimes []*Runtime `json:"runtimes,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Runtimes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Runtimes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListRuntimesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListRuntimesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Location: A resource that represents Google Cloud Platform location. type Location struct { // DisplayName: The friendly name for this location, typically a nearby @@ -1077,21 +1681,40 @@ func (s *Policy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the - // `resource`. The size of the policy is limited to a few 10s of KB. An - // empty policy is a valid policy but certain Google Cloud services - // (such as Projects) might reject them. - Policy *Policy `json:"policy,omitempty"` +// RepoSource: Location of the source in a Google Cloud Source +// Repository. +type RepoSource struct { + // BranchName: Regex matching branches to build. The syntax of the + // regular expressions accepted is the syntax accepted by RE2 and + // described at https://github.com/google/re2/wiki/Syntax + BranchName string `json:"branchName,omitempty"` - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the - // policy to modify. Only the fields in the mask will be modified. If no - // mask is provided, the following default mask is used: `paths: - // "bindings, etag" - UpdateMask string `json:"updateMask,omitempty"` + // CommitSha: Explicit commit SHA to build. + CommitSha string `json:"commitSha,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to + // Dir: Directory, relative to the source root, in which to run the + // build. This must be a relative path. If a step's `dir` is specified + // and is an absolute path, this value is ignored for that step's + // execution. eg. helloworld (no leading slash allowed) + Dir string `json:"dir,omitempty"` + + // InvertRegex: Only trigger a build if the revision regex does NOT + // match the revision regex. + InvertRegex bool `json:"invertRegex,omitempty"` + + // ProjectId: ID of the project that owns the Cloud Source Repository. + // If omitted, the project ID requesting the build is assumed. + ProjectId string `json:"projectId,omitempty"` + + // RepoName: Name of the Cloud Source Repository. + RepoName string `json:"repoName,omitempty"` + + // TagName: Regex matching tags to build. The syntax of the regular + // expressions accepted is the syntax accepted by RE2 and described at + // https://github.com/google/re2/wiki/Syntax + TagName string `json:"tagName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BranchName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1099,8 +1722,8 @@ type SetIamPolicyRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "BranchName") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -1108,34 +1731,45 @@ type SetIamPolicyRequest struct { NullFields []string `json:"-"` } -func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod SetIamPolicyRequest +func (s *RepoSource) MarshalJSON() ([]byte, error) { + type NoMethod RepoSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Status: The `Status` type defines a logical error model that is -// suitable for different programming environments, including REST APIs -// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type Status struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` +// Runtime: Describes a runtime and any special information (e.g., +// deprecation status) related to it. +type Runtime struct { + // DisplayName: The user facing name, eg 'Go 1.13', 'Node.js 12', etc. + DisplayName string `json:"displayName,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"` + // Environment: The environment for the runtime. + // + // Possible values: + // "ENVIRONMENT_UNSPECIFIED" - Unspecified + // "GEN_1" - Gen 1 + // "GEN_2" - Gen 2 + Environment string `json:"environment,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"` + // Name: The name of the runtime, e.g., 'go113', 'nodejs12', etc. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // Stage: The stage of life this runtime is in, e.g., BETA, GA, etc. + // + // Possible values: + // "RUNTIME_STAGE_UNSPECIFIED" - Not specified. + // "DEVELOPMENT" - The runtime is in development. + // "ALPHA" - The runtime is in the Alpha stage. + // "BETA" - The runtime is in the Beta stage. + // "GA" - The runtime is generally available. + // "DEPRECATED" - The runtime is deprecated. + // "DECOMMISSIONED" - The runtime is no longer supported. + Stage string `json:"stage,omitempty"` + + // Warnings: Warning messages, e.g., a deprecation warning. + Warnings []string `json:"warnings,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1143,30 +1777,475 @@ type Status struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *Status) MarshalJSON() ([]byte, error) { - type NoMethod Status +func (s *Runtime) MarshalJSON() ([]byte, error) { + type NoMethod Runtime raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// TestIamPermissionsRequest: Request message for `TestIamPermissions` -// method. -type TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. - // Permissions with wildcards (such as `*` or `storage.*`) are not - // allowed. For more information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` - +// SecretEnvVar: Configuration for a secret environment variable. It has +// the information necessary to fetch the secret value from secret +// manager and expose it as an environment variable. +type SecretEnvVar struct { + // Key: Name of the environment variable. + Key string `json:"key,omitempty"` + + // ProjectId: Project identifier (preferably project number but can also + // be the project ID) of the project that contains the secret. If not + // set, it is assumed that the secret is in the same project as the + // function. + ProjectId string `json:"projectId,omitempty"` + + // Secret: Name of the secret in secret manager (not the full resource + // name). + Secret string `json:"secret,omitempty"` + + // Version: Version of the secret (version number or the string + // 'latest'). It is recommended to use a numeric version for secret + // environment variables as any updates to the secret value is not + // reflected until new instances start. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecretEnvVar) MarshalJSON() ([]byte, error) { + type NoMethod SecretEnvVar + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecretVersion: Configuration for a single version. +type SecretVersion struct { + // Path: Relative path of the file under the mount path where the secret + // value for this version will be fetched and made available. For + // example, setting the mount_path as '/etc/secrets' and path as + // `secret_foo` would mount the secret value file at + // `/etc/secrets/secret_foo`. + Path string `json:"path,omitempty"` + + // Version: Version of the secret (version number or the string + // 'latest'). It is preferable to use `latest` version with secret + // volumes as secret value changes are reflected immediately. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Path") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Path") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecretVersion) MarshalJSON() ([]byte, error) { + type NoMethod SecretVersion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SecretVolume: Configuration for a secret volume. It has the +// information necessary to fetch the secret value from secret manager +// and make it available as files mounted at the requested paths within +// the application container. +type SecretVolume struct { + // MountPath: The path within the container to mount the secret volume. + // For example, setting the mount_path as `/etc/secrets` would mount the + // secret value files under the `/etc/secrets` directory. This directory + // will also be completely shadowed and unavailable to mount any other + // secrets. Recommended mount path: /etc/secrets + MountPath string `json:"mountPath,omitempty"` + + // ProjectId: Project identifier (preferably project number but can also + // be the project ID) of the project that contains the secret. If not + // set, it is assumed that the secret is in the same project as the + // function. + ProjectId string `json:"projectId,omitempty"` + + // Secret: Name of the secret in secret manager (not the full resource + // name). + Secret string `json:"secret,omitempty"` + + // Versions: List of secret versions to mount for this secret. If empty, + // the `latest` version of the secret will be made available in a file + // named after the secret under the mount point. + Versions []*SecretVersion `json:"versions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MountPath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MountPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SecretVolume) MarshalJSON() ([]byte, error) { + type NoMethod SecretVolume + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceConfig: Describes the Service being deployed. Currently +// Supported : Cloud Run (fully managed). +type ServiceConfig struct { + // AllTrafficOnLatestRevision: Whether 100% of traffic is routed to the + // latest revision. On CreateFunction and UpdateFunction, when set to + // true, the revision being deployed will serve 100% of traffic, + // ignoring any traffic split settings, if any. On GetFunction, true + // will be returned if the latest revision is serving 100% of traffic. + AllTrafficOnLatestRevision bool `json:"allTrafficOnLatestRevision,omitempty"` + + // AvailableMemory: The amount of memory available for a function. + // Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is + // supplied the value is interpreted as bytes. See + // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go + // a full description. + AvailableMemory string `json:"availableMemory,omitempty"` + + // EnvironmentVariables: Environment variables that shall be available + // during function execution. + EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` + + // IngressSettings: The ingress settings for the function, controlling + // what traffic can reach it. + // + // Possible values: + // "INGRESS_SETTINGS_UNSPECIFIED" - Unspecified. + // "ALLOW_ALL" - Allow HTTP traffic from public and private sources. + // "ALLOW_INTERNAL_ONLY" - Allow HTTP traffic from only private VPC + // sources. + // "ALLOW_INTERNAL_AND_GCLB" - Allow HTTP traffic from private VPC + // sources and through GCLB. + IngressSettings string `json:"ingressSettings,omitempty"` + + // MaxInstanceCount: The limit on the maximum number of function + // instances that may coexist at a given time. In some cases, such as + // rapid traffic surges, Cloud Functions may, for a short period of + // time, create more instances than the specified max instances limit. + // If your function cannot tolerate this temporary behavior, you may + // want to factor in a safety margin and set a lower max instances value + // than your function can tolerate. See the Max Instances + // (https://cloud.google.com/functions/docs/max-instances) Guide for + // more details. + MaxInstanceCount int64 `json:"maxInstanceCount,omitempty"` + + // MinInstanceCount: The limit on the minimum number of function + // instances that may coexist at a given time. Function instances are + // kept in idle state for a short period after they finished executing + // the request to reduce cold start time for subsequent requests. + // Setting a minimum instance count will ensure that the given number of + // instances are kept running in idle state always. This can help with + // cold start times when jump in incoming request count occurs after the + // idle instance would have been stopped in the default case. + MinInstanceCount int64 `json:"minInstanceCount,omitempty"` + + // Revision: Output only. The name of service revision. + Revision string `json:"revision,omitempty"` + + // SecretEnvironmentVariables: Secret environment variables + // configuration. + SecretEnvironmentVariables []*SecretEnvVar `json:"secretEnvironmentVariables,omitempty"` + + // SecretVolumes: Secret volumes configuration. + SecretVolumes []*SecretVolume `json:"secretVolumes,omitempty"` + + // Service: Output only. Name of the service associated with a Function. + // The format of this field is + // `projects/{project}/locations/{region}/services/{service}` + Service string `json:"service,omitempty"` + + // ServiceAccountEmail: The email of the service's service account. If + // empty, defaults to + // `{project_number}-compute@developer.gserviceaccount.com`. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // TimeoutSeconds: The function execution timeout. Execution is + // considered failed and can be terminated if the function is not + // completed at the end of the timeout period. Defaults to 60 seconds. + TimeoutSeconds int64 `json:"timeoutSeconds,omitempty"` + + // Uri: Output only. URI of the Service deployed. + Uri string `json:"uri,omitempty"` + + // VpcConnector: The Serverless VPC Access connector that this cloud + // function can connect to. The format of this field is + // `projects/*/locations/*/connectors/*`. + VpcConnector string `json:"vpcConnector,omitempty"` + + // VpcConnectorEgressSettings: The egress settings for the connector, + // controlling what traffic is diverted through it. + // + // Possible values: + // "VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED" - Unspecified. + // "PRIVATE_RANGES_ONLY" - Use the VPC Access Connector only for + // private IP space from RFC1918. + // "ALL_TRAFFIC" - Force the use of VPC Access Connector for all + // egress traffic from the function. + VpcConnectorEgressSettings string `json:"vpcConnectorEgressSettings,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AllTrafficOnLatestRevision") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "AllTrafficOnLatestRevision") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ServiceConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Source: The location of the function source code. +type Source struct { + // RepoSource: If provided, get the source from this location in a Cloud + // Source Repository. + RepoSource *RepoSource `json:"repoSource,omitempty"` + + // StorageSource: If provided, get the source from this location in + // Google Cloud Storage. + StorageSource *StorageSource `json:"storageSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RepoSource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RepoSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Source) MarshalJSON() ([]byte, error) { + type NoMethod Source + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SourceProvenance: Provenance of the source. Ways to find the original +// source, or verify that some source was used for this build. +type SourceProvenance struct { + // ResolvedRepoSource: A copy of the build's `source.repo_source`, if + // exists, with any revisions resolved. + ResolvedRepoSource *RepoSource `json:"resolvedRepoSource,omitempty"` + + // ResolvedStorageSource: A copy of the build's `source.storage_source`, + // if exists, with any generations resolved. + ResolvedStorageSource *StorageSource `json:"resolvedStorageSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResolvedRepoSource") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResolvedRepoSource") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *SourceProvenance) MarshalJSON() ([]byte, error) { + type NoMethod SourceProvenance + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StorageSource: Location of the source in an archive file in Google +// Cloud Storage. +type StorageSource struct { + // Bucket: Google Cloud Storage bucket containing the source (see Bucket + // Name Requirements + // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). + Bucket string `json:"bucket,omitempty"` + + // Generation: Google Cloud Storage generation for the object. If the + // generation is omitted, the latest generation will be used. + Generation int64 `json:"generation,omitempty,string"` + + // Object: Google Cloud Storage object containing the source. This + // object must be a gzipped archive file (`.tar.gz`) containing source + // to build. + Object string `json:"object,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Bucket") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StorageSource) MarshalJSON() ([]byte, error) { + type NoMethod StorageSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Permissions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1298,14 +2377,1157 @@ func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocati // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "cloudfunctions.projects.locations.list" call. +// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v2/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "cloudfunctions.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": "v2/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudfunctions.projects.locations.functions.create": + +type ProjectsLocationsFunctionsCreateCall struct { + s *Service + parent string + function *Function + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new function. If a function with the given name +// already exists in the specified project, the long running operation +// will return `ALREADY_EXISTS` error. +// +// - parent: The project and location in which the function should be +// created, specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsFunctionsService) Create(parent string, function *Function) *ProjectsLocationsFunctionsCreateCall { + c := &ProjectsLocationsFunctionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.function = function + return c +} + +// FunctionId sets the optional parameter "functionId": The ID to use +// for the function, which will become the final component of the +// function's resource name. This value should be 4-63 characters, and +// valid characters are /a-z-/. +func (c *ProjectsLocationsFunctionsCreateCall) FunctionId(functionId string) *ProjectsLocationsFunctionsCreateCall { + c.urlParams_.Set("functionId", functionId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsCreateCall) Context(ctx context.Context) *ProjectsLocationsFunctionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.function) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/functions") + 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 "cloudfunctions.projects.locations.functions.create" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "functionId": { + // "description": "The ID to use for the function, which will become the final component of the function's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location in which the function should be created, specified in the format `projects/*/locations/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/functions", + // "request": { + // "$ref": "Function" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.delete": + +type ProjectsLocationsFunctionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a function with the given name from the specified +// project. If the given function is used by some trigger, the trigger +// will be updated to remove this function. +// +// - name: The name of the function which should be deleted. +func (r *ProjectsLocationsFunctionsService) Delete(name string) *ProjectsLocationsFunctionsDeleteCall { + c := &ProjectsLocationsFunctionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFunctionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "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 "cloudfunctions.projects.locations.functions.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + // "httpMethod": "DELETE", + // "id": "cloudfunctions.projects.locations.functions.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the function which should be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.generateDownloadUrl": + +type ProjectsLocationsFunctionsGenerateDownloadUrlCall struct { + s *Service + name string + generatedownloadurlrequest *GenerateDownloadUrlRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateDownloadUrl: Returns a signed URL for downloading deployed +// function source code. The URL is only valid for a limited period and +// should be used within 30 minutes of generation. For more information +// about the signed URL usage see: +// https://cloud.google.com/storage/docs/access-control/signed-urls +// +// - name: The name of function for which source code Google Cloud +// Storage signed URL should be generated. +func (r *ProjectsLocationsFunctionsService) GenerateDownloadUrl(name string, generatedownloadurlrequest *GenerateDownloadUrlRequest) *ProjectsLocationsFunctionsGenerateDownloadUrlCall { + c := &ProjectsLocationsFunctionsGenerateDownloadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.generatedownloadurlrequest = generatedownloadurlrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGenerateDownloadUrlCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGenerateDownloadUrlCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatedownloadurlrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:generateDownloadUrl") + 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 "cloudfunctions.projects.locations.functions.generateDownloadUrl" call. +// Exactly one of *GenerateDownloadUrlResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateDownloadUrlResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsGenerateDownloadUrlCall) Do(opts ...googleapi.CallOption) (*GenerateDownloadUrlResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GenerateDownloadUrlResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within 30 minutes of generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:generateDownloadUrl", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.generateDownloadUrl", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of function for which source code Google Cloud Storage signed URL should be generated.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}:generateDownloadUrl", + // "request": { + // "$ref": "GenerateDownloadUrlRequest" + // }, + // "response": { + // "$ref": "GenerateDownloadUrlResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.generateUploadUrl": + +type ProjectsLocationsFunctionsGenerateUploadUrlCall struct { + s *Service + parent string + generateuploadurlrequest *GenerateUploadUrlRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateUploadUrl: Returns a signed URL for uploading a function +// source code. For more information about the signed URL usage see: +// https://cloud.google.com/storage/docs/access-control/signed-urls. +// Once the function source code upload is complete, the used signed URL +// should be provided in CreateFunction or UpdateFunction request as a +// reference to the function source code. When uploading source code to +// the generated signed URL, please follow these restrictions: * Source +// file type should be a zip file. * No credentials should be attached - +// the signed URLs provide access to the target bucket using internal +// service identity; if credentials were attached, the identity from the +// credentials would be used, but that identity does not have +// permissions to upload files to the URL. When making a HTTP PUT +// request, these two headers need to be specified: * `content-type: +// application/zip` And this header SHOULD NOT be specified: * +// `Authorization: Bearer YOUR_TOKEN` +// +// - parent: The project and location in which the Google Cloud Storage +// signed URL should be generated, specified in the format +// `projects/*/locations/*`. +func (r *ProjectsLocationsFunctionsService) GenerateUploadUrl(parent string, generateuploadurlrequest *GenerateUploadUrlRequest) *ProjectsLocationsFunctionsGenerateUploadUrlCall { + c := &ProjectsLocationsFunctionsGenerateUploadUrlCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.generateuploadurlrequest = generateuploadurlrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGenerateUploadUrlCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGenerateUploadUrlCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateuploadurlrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/functions:generateUploadUrl") + 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 "cloudfunctions.projects.locations.functions.generateUploadUrl" call. +// Exactly one of *GenerateUploadUrlResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GenerateUploadUrlResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsGenerateUploadUrlCall) Do(opts ...googleapi.CallOption) (*GenerateUploadUrlResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GenerateUploadUrlResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrl", + // "httpMethod": "POST", + // "id": "cloudfunctions.projects.locations.functions.generateUploadUrl", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/functions:generateUploadUrl", + // "request": { + // "$ref": "GenerateUploadUrlRequest" + // }, + // "response": { + // "$ref": "GenerateUploadUrlResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.get": + +type ProjectsLocationsFunctionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns a function with the given name from the requested +// project. +// +// - name: The name of the function which details should be obtained. +func (r *ProjectsLocationsFunctionsService) Get(name string) *ProjectsLocationsFunctionsGetCall { + c := &ProjectsLocationsFunctionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsFunctionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGetCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "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 "cloudfunctions.projects.locations.functions.get" call. +// Exactly one of *Function or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Function.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsGetCall) Do(opts ...googleapi.CallOption) (*Function, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Function{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a function with the given name from the requested project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.functions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the function which details should be obtained.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+name}", + // "response": { + // "$ref": "Function" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.getIamPolicy": + +type ProjectsLocationsFunctionsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsFunctionsService) GetIamPolicy(resource string) *ProjectsLocationsFunctionsGetIamPolicyCall { + c := &ProjectsLocationsFunctionsGetIamPolicyCall{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 *ProjectsLocationsFunctionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "cloudfunctions.projects.locations.functions.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsFunctionsGetIamPolicyCall) 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, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.functions.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/[^/]+/functions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "cloudfunctions.projects.locations.functions.list": + +type ProjectsLocationsFunctionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of functions that belong to the requested +// project. +// +// - parent: The project and location from which the function should be +// listed, specified in the format `projects/*/locations/*` If you +// want to list functions in all locations, use "-" in place of a +// location. When listing functions in all locations, if one or more +// location(s) are unreachable, the response will contain functions +// from all reachable locations along with the names of any +// unreachable locations. +func (r *ProjectsLocationsFunctionsService) List(parent string) *ProjectsLocationsFunctionsListCall { + c := &ProjectsLocationsFunctionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter for Functions +// that match the filter expression, following the syntax outlined in +// https://google.aip.dev/160. +func (c *ProjectsLocationsFunctionsListCall) Filter(filter string) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": The sorting order of +// the resources returned. Value should be a comma separated list of +// fields. The default sorting oder is ascending. See +// https://google.aip.dev/132#ordering. +func (c *ProjectsLocationsFunctionsListCall) OrderBy(orderBy string) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// functions to return per call. +func (c *ProjectsLocationsFunctionsListCall) PageSize(pageSize int64) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListFunctionsResponse`; indicates that this is a +// continuation of a prior `ListFunctions` call, and that the system +// should return the next page of data. +func (c *ProjectsLocationsFunctionsListCall) PageToken(pageToken string) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsFunctionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsFunctionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsFunctionsListCall) Context(ctx context.Context) *ProjectsLocationsFunctionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsFunctionsListCall) 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 *ProjectsLocationsFunctionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1318,7 +3540,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}/functions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1326,19 +3548,19 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudfunctions.projects.locations.list" call. -// Exactly one of *ListLocationsResponse or error will be non-nil. Any +// Do executes the "cloudfunctions.projects.locations.functions.list" call. +// Exactly one of *ListFunctionsResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ListLocationsResponse.ServerResponse.Header or (if a response was +// *ListFunctionsResponse.ServerResponse.Header or (if a response was // returned 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 *ProjectsLocationsFunctionsListCall) Do(opts ...googleapi.CallOption) (*ListFunctionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1357,7 +3579,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListLocationsResponse{ + ret := &ListFunctionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1369,41 +3591,46 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocat } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v2/projects/{projectsId}/locations", + // "description": "Returns a list of functions that belong to the requested project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions", // "httpMethod": "GET", - // "id": "cloudfunctions.projects.locations.list", + // "id": "cloudfunctions.projects.locations.functions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "description": "The filter for Functions that match the filter expression, following the syntax outlined in 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, + // "orderBy": { + // "description": "The sorting order of the resources returned. Value should be a comma separated list of fields. The default sorting oder is ascending. See https://google.aip.dev/132#ordering.", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "description": "Maximum number of functions to return per call.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "description": "The value returned by the last `ListFunctionsResponse`; indicates that this is a continuation of a prior `ListFunctions` call, and that the system should return the next page of data.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the function should be listed, specified in the format `projects/*/locations/*` If you want to list functions in all locations, use \"-\" in place of a location. When listing functions in all locations, if one or more location(s) are unreachable, the response will contain functions from all reachable locations along with the names of any unreachable locations.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v2/{+name}/locations", + // "path": "v2/{+parent}/functions", // "response": { - // "$ref": "ListLocationsResponse" + // "$ref": "ListFunctionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1415,7 +3642,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 *ProjectsLocationsFunctionsListCall) Pages(ctx context.Context, f func(*ListFunctionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -1433,118 +3660,98 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } -// method id "cloudfunctions.projects.locations.functions.getIamPolicy": +// method id "cloudfunctions.projects.locations.functions.patch": -type ProjectsLocationsFunctionsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFunctionsPatchCall struct { + s *Service + name string + function *Function + 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. +// Patch: Updates existing function. // -// - 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 *ProjectsLocationsFunctionsService) GetIamPolicy(resource string) *ProjectsLocationsFunctionsGetIamPolicyCall { - c := &ProjectsLocationsFunctionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: A user-defined name of the function. Function names must be +// unique globally and match pattern +// `projects/*/locations/*/functions/*`. +func (r *ProjectsLocationsFunctionsService) Patch(name string, function *Function) *ProjectsLocationsFunctionsPatchCall { + c := &ProjectsLocationsFunctionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.function = function 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 *ProjectsLocationsFunctionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFunctionsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. If no field mask is provided, all provided +// fields in the request will be updated. +func (c *ProjectsLocationsFunctionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFunctionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsGetIamPolicyCall { +func (c *ProjectsLocationsFunctionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFunctionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsFunctionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFunctionsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFunctionsGetIamPolicyCall { +func (c *ProjectsLocationsFunctionsPatchCall) Context(ctx context.Context) *ProjectsLocationsFunctionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFunctionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFunctionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFunctionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.function) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") + 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{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "cloudfunctions.projects.locations.functions.getIamPolicy" call. -// Exactly one of *Policy or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// Do executes the "cloudfunctions.projects.locations.functions.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFunctionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1563,7 +3770,7 @@ func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Policy{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1575,31 +3782,34 @@ func (c *ProjectsLocationsFunctionsGetIamPolicyCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "cloudfunctions.projects.locations.functions.getIamPolicy", + // "description": "Updates existing function.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + // "httpMethod": "PATCH", + // "id": "cloudfunctions.projects.locations.functions.patch", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "options.requestedPolicyVersion": { - // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "A user-defined name of the function. Function names must be unique globally and match pattern `projects/*/locations/*/functions/*`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated. If no field mask is provided, all provided fields in the request will be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v2/{+resource}:getIamPolicy", + // "path": "v2/{+name}", + // "request": { + // "$ref": "Function" + // }, // "response": { - // "$ref": "Policy" + // "$ref": "Operation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -2272,3 +4482,164 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( c.PageToken(x.NextPageToken) } } + +// method id "cloudfunctions.projects.locations.runtimes.list": + +type ProjectsLocationsRuntimesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of runtimes that are supported for the requested +// project. +// +// - parent: The project and location from which the runtimes should be +// listed, specified in the format `projects/*/locations/*`. +func (r *ProjectsLocationsRuntimesService) List(parent string) *ProjectsLocationsRuntimesListCall { + c := &ProjectsLocationsRuntimesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter for Runtimes +// that match the filter expression, following the syntax outlined in +// https://google.aip.dev/160. +func (c *ProjectsLocationsRuntimesListCall) Filter(filter string) *ProjectsLocationsRuntimesListCall { + 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 information. +func (c *ProjectsLocationsRuntimesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuntimesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRuntimesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuntimesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRuntimesListCall) Context(ctx context.Context) *ProjectsLocationsRuntimesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRuntimesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRuntimesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/runtimes") + 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 "cloudfunctions.projects.locations.runtimes.list" call. +// Exactly one of *ListRuntimesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListRuntimesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRuntimesListCall) Do(opts ...googleapi.CallOption) (*ListRuntimesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListRuntimesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of runtimes that are supported for the requested project.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/runtimes", + // "httpMethod": "GET", + // "id": "cloudfunctions.projects.locations.runtimes.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "The filter for Runtimes that match the filter expression, following the syntax outlined in https://google.aip.dev/160.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The project and location from which the runtimes should be listed, specified in the format `projects/*/locations/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/runtimes", + // "response": { + // "$ref": "ListRuntimesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index c4fd724219d..315ad0ec316 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220622", + "revision": "20220707", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -904,6 +904,153 @@ }, "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" + }, + "cancelRequested": { + "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "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" + }, + "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" + }, + "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" + }, "GoogleCloudFunctionsV2alphaOperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "GoogleCloudFunctionsV2alphaOperationMetadata", diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index fc03febdfe1..4ce649879d5 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -788,6 +788,161 @@ func (s *GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, 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"` + + // CancelRequested: Identifies whether the user has requested + // cancellation of the operation. Operations that have successfully been + // cancelled have Operation.error value with a google.rpc.Status.code of + // 1, corresponding to `Code.CANCELLED`. + 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"` + + // RequestResource: The original request that started the operation. + RequestResource googleapi.RawMessage `json:"requestResource,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2Stage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2Stage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2StateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2StateMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata // of the long-running operation. type GoogleCloudFunctionsV2alphaOperationMetadata struct { diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index a779b59fa80..b4acb572a4a 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -571,7 +571,7 @@ } } }, - "revision": "20220622", + "revision": "20220707", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -904,6 +904,153 @@ }, "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" + }, + "cancelRequested": { + "description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "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" + }, + "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" + }, + "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" + }, "GoogleCloudFunctionsV2alphaOperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "GoogleCloudFunctionsV2alphaOperationMetadata", diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index f2f98ac00c7..8dd3ebf8881 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -788,6 +788,161 @@ func (s *GenerateUploadUrlResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, 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"` + + // CancelRequested: Identifies whether the user has requested + // cancellation of the operation. Operations that have successfully been + // cancelled have Operation.error value with a google.rpc.Status.code of + // 1, corresponding to `Code.CANCELLED`. + 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"` + + // RequestResource: The original request that started the operation. + RequestResource googleapi.RawMessage `json:"requestResource,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2Stage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2Stage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudFunctionsV2StateMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudFunctionsV2StateMessage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudFunctionsV2alphaOperationMetadata: Represents the metadata // of the long-running operation. type GoogleCloudFunctionsV2alphaOperationMetadata struct { diff --git a/cloudtasks/v2beta2/cloudtasks-api.json b/cloudtasks/v2beta2/cloudtasks-api.json index 250b2c00a80..d2cdb780fd9 100644 --- a/cloudtasks/v2beta2/cloudtasks-api.json +++ b/cloudtasks/v2beta2/cloudtasks-api.json @@ -179,6 +179,34 @@ "resources": { "queues": { "methods": { + "buffer": { + "description": "Creates and buffers a new task without the need to explicitly define a Task message. The queue must be an http queue (i.e., must have HTTP target). This method is used for a simplified application of Cloud Tasks queues in buffer and rate limitting HTTP requests.", + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:buffer", + "httpMethod": "POST", + "id": "cloudtasks.projects.locations.queues.buffer", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta2/{+name}:buffer", + "request": { + "$ref": "BufferQueueRequest" + }, + "response": { + "$ref": "BufferQueueResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.", "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues", @@ -809,7 +837,7 @@ } } }, - "revision": "20220520", + "revision": "20220713", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AcknowledgeTaskRequest": { @@ -953,6 +981,28 @@ }, "type": "object" }, + "BufferQueueRequest": { + "description": "Request message for BufferQueue.", + "id": "BufferQueueRequest", + "properties": { + "body": { + "$ref": "HttpBody", + "description": "Body of the HTTP request. The body can take any generic value. The value will be written to the HttpRequest of the [Task]." + } + }, + "type": "object" + }, + "BufferQueueResponse": { + "description": "Response message for BufferQueue.", + "id": "BufferQueueResponse", + "properties": { + "task": { + "description": "The name of the created task. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. TASK_ID is randomly generated and is unique within the queue.", + "type": "string" + } + }, + "type": "object" + }, "CancelLeaseRequest": { "description": "Request message for canceling a lease using CancelLease.", "id": "CancelLeaseRequest", @@ -1056,6 +1106,156 @@ }, "type": "object" }, + "Header": { + "description": "Defines a header message. A header can have a key and a value.", + "id": "Header", + "properties": { + "key": { + "format": "byte", + "type": "string" + }, + "value": { + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "HeaderOverride": { + "description": "Wraps the Header object.", + "id": "HeaderOverride", + "properties": { + "header": { + "$ref": "Header", + "description": "header embodying a key and a value." + } + }, + "type": "object" + }, + "HttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", + "id": "HttpBody", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "format": "byte", + "type": "string" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "HttpRequest": { + "description": "HTTP request. The task will be pushed to the worker as an HTTP request. An HTTP request embodies a url, an http method, headers, body and authorization for the http task.", + "id": "HttpRequest", + "properties": { + "body": { + "description": "HTTP request body. A request body is allowed only if the HTTP method is POST, PUT, or PATCH. It is an error to set body on a task with an incompatible HttpMethod.", + "format": "byte", + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP request headers. This map contains the header field names and values. Headers can be set when running the task is created or task is created. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with \"X-Google-Cloud-Tasks-\" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `\"Google-Cloud-Tasks\"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example, `Content-Type` can be set to `\"application/octet-stream\"` or `\"application/json\"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB.", + "type": "object" + }, + "httpMethod": { + "description": "The HTTP method to use for the request. The default is POST.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE" + ], + "enumDescriptions": [ + "HTTP method unspecified", + "HTTP POST", + "HTTP GET", + "HTTP HEAD", + "HTTP PUT", + "HTTP DELETE" + ], + "type": "string" + }, + "oauthToken": { + "$ref": "OAuthToken", + "description": "If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com." + }, + "oidcToken": { + "$ref": "OidcToken", + "description": "If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself." + }, + "url": { + "description": "Required. The full url path that the request will be sent to. This string must begin with either \"http://\" or \"https://\". Some examples are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Tasks will encode some characters for safety and compatibility. The maximum allowed URL length is 2083 characters after encoding. The `Location` header response from a redirect response [`300` - `399`] may be followed. The redirect is not counted as a separate attempt.", + "type": "string" + } + }, + "type": "object" + }, + "HttpTarget": { + "description": "HTTP target. When specified as a Queue, all the tasks with [HttpRequest] will be overridden according to the target.", + "id": "HttpTarget", + "properties": { + "headerOverrides": { + "description": "HTTP target headers. This map contains the header field names and values. Headers will be set when running the task is created and/or task is created. These headers represent a subset of the headers that will accompany the task's HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is: * Any header that is prefixed with \"X-Google-Cloud-Tasks-\" will be treated as service header. Service headers define properties of the task and are predefined in CloudTask. * Host: This will be computed by Cloud Tasks and derived from HttpRequest.url. * Content-Length: This will be computed by Cloud Tasks. * User-Agent: This will be set to `\"Google-Cloud-Tasks\"`. * `X-Google-*`: Google use only. * `X-AppEngine-*`: Google use only. `Content-Type` won't be set by Cloud Tasks. You can explicitly set `Content-Type` to a media type when the task is created. For example, `Content-Type` can be set to `\"application/octet-stream\"` or `\"application/json\"`. Headers which can have multiple values (according to RFC2616) can be specified using comma-separated values. The size of the headers must be less than 80KB. Queue-level headers to override headers of all the tasks in the queue.", + "items": { + "$ref": "HeaderOverride" + }, + "type": "array" + }, + "httpMethod": { + "description": "The HTTP method to use for the request. When specified, it will override HttpRequest for the task. Note that if the value is set to HttpMethod the HttpRequest of the task will be ignored at execution time.", + "enum": [ + "HTTP_METHOD_UNSPECIFIED", + "POST", + "GET", + "HEAD", + "PUT", + "DELETE" + ], + "enumDescriptions": [ + "HTTP method unspecified", + "HTTP POST", + "HTTP GET", + "HTTP HEAD", + "HTTP PUT", + "HTTP DELETE" + ], + "type": "string" + }, + "oauthToken": { + "$ref": "OAuthToken", + "description": "If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com." + }, + "oidcToken": { + "$ref": "OidcToken", + "description": "If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself." + }, + "uriOverride": { + "$ref": "UriOverride", + "description": "Uri override. When specified modifies the execution Uri for all the tasks in the queue." + } + }, + "type": "object" + }, "LeaseTasksRequest": { "description": "Request message for leasing tasks using LeaseTasks.", "id": "LeaseTasksRequest", @@ -1193,6 +1393,36 @@ }, "type": "object" }, + "OAuthToken": { + "description": "Contains information needed for generating an [OAuth token](https://developers.google.com/identity/protocols/OAuth2). This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.", + "id": "OAuthToken", + "properties": { + "scope": { + "description": "OAuth scope to be used for generating OAuth access token. If not specified, \"https://www.googleapis.com/auth/cloud-platform\" will be used.", + "type": "string" + }, + "serviceAccountEmail": { + "description": "[Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating OAuth token. The service account must be within the same project as the queue. The caller must have iam.serviceAccounts.actAs permission for the service account.", + "type": "string" + } + }, + "type": "object" + }, + "OidcToken": { + "description": "Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect). This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.", + "id": "OidcToken", + "properties": { + "audience": { + "description": "Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used.", + "type": "string" + }, + "serviceAccountEmail": { + "description": "[Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating OIDC token. The service account must be within the same project as the queue. The caller must have iam.serviceAccounts.actAs permission for the service account.", + "type": "string" + } + }, + "type": "object" + }, "PauseQueueRequest": { "description": "Request message for PauseQueue.", "id": "PauseQueueRequest", @@ -1259,6 +1489,10 @@ "$ref": "AppEngineHttpTarget", "description": "App Engine HTTP target. An App Engine queue is a queue that has an AppEngineHttpTarget." }, + "httpTarget": { + "$ref": "HttpTarget", + "description": "An http_target is used to override the target values for HTTP tasks." + }, "name": { "description": "Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters.", "type": "string" @@ -1518,6 +1752,10 @@ "format": "google-datetime", "type": "string" }, + "httpRequest": { + "$ref": "HttpRequest", + "description": "HTTP request that is sent to the task's target. An HTTP task is a task that has HttpRequest set." + }, "name": { "description": "Optionally caller-specified in CreateTask. The task name. The task name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID for the task's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters. * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or underscores (_). The maximum length is 500 characters.", "type": "string" @@ -1604,6 +1842,44 @@ } }, "type": "object" + }, + "UriOverride": { + "description": "Uri Override. When specified, all the HTTP tasks inside the queue will be partially or fully overridden depending on the configured values.", + "id": "UriOverride", + "properties": { + "host": { + "description": "Host override. When specified, the host part of url will be overridden. For example, if the original Uri is \"https://www.google.com\", and host is set to \"example.net\", the overridden Uri will be \"https://example.net\".", + "type": "string" + }, + "path": { + "description": "Uri path. Will be used as the path for the current Uri (replaces any existing path of the task url).", + "type": "string" + }, + "port": { + "description": "Port override. When specified, the port part of Uri will be replaced by the provided value. For instance, for a Uri http://www.google.com/foo and port=123 the overridden Uri becomes http://www.google.com:123/foo.", + "format": "int64", + "type": "string" + }, + "query": { + "description": "Uri Query. Will replace the query part of the task uri.", + "type": "string" + }, + "scheme": { + "description": "Scheme override. When specified, the Uri scheme is replaced by the provided value.", + "enum": [ + "SCHEME_UNSPECIFIED", + "HTTP", + "HTTPS" + ], + "enumDescriptions": [ + "Scheme unspecified. Defaults to HTTPS.", + "Convert the scheme to HTTP, e.g., https://www.google.ca will change to http://www.google.ca.", + "Convert the scheme to HTTPS, e.g., http://www.google.ca will change to https://www.google.ca." + ], + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/cloudtasks/v2beta2/cloudtasks-gen.go b/cloudtasks/v2beta2/cloudtasks-gen.go index 156edb0ff2e..93fb361352b 100644 --- a/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/cloudtasks/v2beta2/cloudtasks-gen.go @@ -596,6 +596,69 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BufferQueueRequest: Request message for BufferQueue. +type BufferQueueRequest struct { + // Body: Body of the HTTP request. The body can take any generic value. + // The value will be written to the HttpRequest of the [Task]. + Body *HttpBody `json:"body,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Body") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Body") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BufferQueueRequest) MarshalJSON() ([]byte, error) { + type NoMethod BufferQueueRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BufferQueueResponse: Response message for BufferQueue. +type BufferQueueResponse struct { + // Task: The name of the created task. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ + // ID`. TASK_ID is randomly generated and is unique within the queue. + Task string `json:"task,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Task") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Task") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BufferQueueResponse) MarshalJSON() ([]byte, error) { + type NoMethod BufferQueueResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelLeaseRequest: Request message for canceling a lease using // CancelLease. type CancelLeaseRequest struct { @@ -864,6 +927,288 @@ func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Header: Defines a header message. A header can have a key and a +// value. +type Header struct { + Key string `json:"key,omitempty"` + + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Header) MarshalJSON() ([]byte, error) { + type NoMethod Header + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HeaderOverride: Wraps the Header object. +type HeaderOverride struct { + // Header: header embodying a key and a value. + Header *Header `json:"header,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Header") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Header") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HeaderOverride) MarshalJSON() ([]byte, error) { + type NoMethod HeaderOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpBody: Message that represents an arbitrary HTTP body. It should +// only be used for payload formats that can't be represented as JSON, +// such as raw binary or an HTML page. This message can be used both in +// streaming and non-streaming API methods in the request as well as the +// response. It can be used as a top-level request field, which is +// convenient if one wants to extract parameters from either the URL or +// HTTP template into the request fields and also want access to the raw +// HTTP body. Example: message GetResourceRequest { // A unique request +// id. string request_id = 1; // The raw HTTP body is bound to this +// field. google.api.HttpBody http_body = 2; } service ResourceService { +// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); } Example with streaming methods: service +// CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns +// (stream google.api.HttpBody); rpc UpdateCalendar(stream +// google.api.HttpBody) returns (stream google.api.HttpBody); } Use of +// this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +type HttpBody struct { + // ContentType: The HTTP Content-Type header value specifying the + // content type of the body. + ContentType string `json:"contentType,omitempty"` + + // Data: The HTTP request/response body as raw binary. + Data string `json:"data,omitempty"` + + // Extensions: Application specific response metadata. Must be set in + // the first response for streaming APIs. + Extensions []googleapi.RawMessage `json:"extensions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpBody) MarshalJSON() ([]byte, error) { + type NoMethod HttpBody + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpRequest: HTTP request. The task will be pushed to the worker as +// an HTTP request. An HTTP request embodies a url, an http method, +// headers, body and authorization for the http task. +type HttpRequest struct { + // Body: HTTP request body. A request body is allowed only if the HTTP + // method is POST, PUT, or PATCH. It is an error to set body on a task + // with an incompatible HttpMethod. + Body string `json:"body,omitempty"` + + // Headers: HTTP request headers. This map contains the header field + // names and values. Headers can be set when running the task is created + // or task is created. These headers represent a subset of the headers + // that will accompany the task's HTTP request. Some HTTP request + // headers will be ignored or replaced. A partial list of headers that + // will be ignored or replaced is: * Any header that is prefixed with + // "X-Google-Cloud-Tasks-" will be treated as service header. Service + // headers define properties of the task and are predefined in + // CloudTask. * Host: This will be computed by Cloud Tasks and derived + // from HttpRequest.url. * Content-Length: This will be computed by + // Cloud Tasks. * User-Agent: This will be set to + // "Google-Cloud-Tasks". * `X-Google-*`: Google use only. * + // `X-AppEngine-*`: Google use only. `Content-Type` won't be set by + // Cloud Tasks. You can explicitly set `Content-Type` to a media type + // when the task is created. For example, `Content-Type` can be set to + // "application/octet-stream" or "application/json". Headers which + // can have multiple values (according to RFC2616) can be specified + // using comma-separated values. The size of the headers must be less + // than 80KB. + Headers map[string]string `json:"headers,omitempty"` + + // HttpMethod: The HTTP method to use for the request. The default is + // POST. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method unspecified + // "POST" - HTTP POST + // "GET" - HTTP GET + // "HEAD" - HTTP HEAD + // "PUT" - HTTP PUT + // "DELETE" - HTTP DELETE + HttpMethod string `json:"httpMethod,omitempty"` + + // OauthToken: If specified, an OAuth token + // (https://developers.google.com/identity/protocols/OAuth2) will be + // generated and attached as an `Authorization` header in the HTTP + // request. This type of authorization should generally only be used + // when calling Google APIs hosted on *.googleapis.com. + OauthToken *OAuthToken `json:"oauthToken,omitempty"` + + // OidcToken: If specified, an OIDC + // (https://developers.google.com/identity/protocols/OpenIDConnect) + // token will be generated and attached as an `Authorization` header in + // the HTTP request. This type of authorization can be used for many + // scenarios, including calling Cloud Run, or endpoints where you intend + // to validate the token yourself. + OidcToken *OidcToken `json:"oidcToken,omitempty"` + + // Url: Required. The full url path that the request will be sent to. + // This string must begin with either "http://" or "https://". Some + // examples are: `http://acme.com` and `https://acme.com/sales:8080`. + // Cloud Tasks will encode some characters for safety and compatibility. + // The maximum allowed URL length is 2083 characters after encoding. The + // `Location` header response from a redirect response [`300` - `399`] + // may be followed. The redirect is not counted as a separate attempt. + Url string `json:"url,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Body") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Body") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpRequest) MarshalJSON() ([]byte, error) { + type NoMethod HttpRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpTarget: HTTP target. When specified as a Queue, all the tasks +// with [HttpRequest] will be overridden according to the target. +type HttpTarget struct { + // HeaderOverrides: HTTP target headers. This map contains the header + // field names and values. Headers will be set when running the task is + // created and/or task is created. These headers represent a subset of + // the headers that will accompany the task's HTTP request. Some HTTP + // request headers will be ignored or replaced. A partial list of + // headers that will be ignored or replaced is: * Any header that is + // prefixed with "X-Google-Cloud-Tasks-" will be treated as service + // header. Service headers define properties of the task and are + // predefined in CloudTask. * Host: This will be computed by Cloud Tasks + // and derived from HttpRequest.url. * Content-Length: This will be + // computed by Cloud Tasks. * User-Agent: This will be set to + // "Google-Cloud-Tasks". * `X-Google-*`: Google use only. * + // `X-AppEngine-*`: Google use only. `Content-Type` won't be set by + // Cloud Tasks. You can explicitly set `Content-Type` to a media type + // when the task is created. For example, `Content-Type` can be set to + // "application/octet-stream" or "application/json". Headers which + // can have multiple values (according to RFC2616) can be specified + // using comma-separated values. The size of the headers must be less + // than 80KB. Queue-level headers to override headers of all the tasks + // in the queue. + HeaderOverrides []*HeaderOverride `json:"headerOverrides,omitempty"` + + // HttpMethod: The HTTP method to use for the request. When specified, + // it will override HttpRequest for the task. Note that if the value is + // set to HttpMethod the HttpRequest of the task will be ignored at + // execution time. + // + // Possible values: + // "HTTP_METHOD_UNSPECIFIED" - HTTP method unspecified + // "POST" - HTTP POST + // "GET" - HTTP GET + // "HEAD" - HTTP HEAD + // "PUT" - HTTP PUT + // "DELETE" - HTTP DELETE + HttpMethod string `json:"httpMethod,omitempty"` + + // OauthToken: If specified, an OAuth token + // (https://developers.google.com/identity/protocols/OAuth2) will be + // generated and attached as an `Authorization` header in the HTTP + // request. This type of authorization should generally only be used + // when calling Google APIs hosted on *.googleapis.com. + OauthToken *OAuthToken `json:"oauthToken,omitempty"` + + // OidcToken: If specified, an OIDC + // (https://developers.google.com/identity/protocols/OpenIDConnect) + // token will be generated and attached as an `Authorization` header in + // the HTTP request. This type of authorization can be used for many + // scenarios, including calling Cloud Run, or endpoints where you intend + // to validate the token yourself. + OidcToken *OidcToken `json:"oidcToken,omitempty"` + + // UriOverride: Uri override. When specified modifies the execution Uri + // for all the tasks in the queue. + UriOverride *UriOverride `json:"uriOverride,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HeaderOverrides") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HeaderOverrides") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *HttpTarget) MarshalJSON() ([]byte, error) { + type NoMethod HttpTarget + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LeaseTasksRequest: Request message for leasing tasks using // LeaseTasks. type LeaseTasksRequest struct { @@ -1144,6 +1489,87 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OAuthToken: Contains information needed for generating an OAuth token +// (https://developers.google.com/identity/protocols/OAuth2). This type +// of authorization should generally only be used when calling Google +// APIs hosted on *.googleapis.com. +type OAuthToken struct { + // Scope: OAuth scope to be used for generating OAuth access token. If + // not specified, "https://www.googleapis.com/auth/cloud-platform" will + // be used. + Scope string `json:"scope,omitempty"` + + // ServiceAccountEmail: Service account email + // (https://cloud.google.com/iam/docs/service-accounts) to be used for + // generating OAuth token. The service account must be within the same + // project as the queue. The caller must have iam.serviceAccounts.actAs + // permission for the service account. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Scope") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Scope") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OAuthToken) MarshalJSON() ([]byte, error) { + type NoMethod OAuthToken + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OidcToken: Contains information needed for generating an OpenID +// Connect token +// (https://developers.google.com/identity/protocols/OpenIDConnect). +// This type of authorization can be used for many scenarios, including +// calling Cloud Run, or endpoints where you intend to validate the +// token yourself. +type OidcToken struct { + // Audience: Audience to be used when generating OIDC token. If not + // specified, the URI specified in target will be used. + Audience string `json:"audience,omitempty"` + + // ServiceAccountEmail: Service account email + // (https://cloud.google.com/iam/docs/service-accounts) to be used for + // generating OIDC token. The service account must be within the same + // project as the queue. The caller must have iam.serviceAccounts.actAs + // permission for the service account. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Audience") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Audience") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OidcToken) MarshalJSON() ([]byte, error) { + type NoMethod OidcToken + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PauseQueueRequest: Request message for PauseQueue. type PauseQueueRequest struct { } @@ -1314,6 +1740,10 @@ type Queue struct { // queue that has an AppEngineHttpTarget. AppEngineHttpTarget *AppEngineHttpTarget `json:"appEngineHttpTarget,omitempty"` + // HttpTarget: An http_target is used to override the target values for + // HTTP tasks. + HttpTarget *HttpTarget `json:"httpTarget,omitempty"` + // Name: Caller-specified and required in CreateQueue, after which it // becomes output only. The queue name. The queue name must have the // following format: @@ -1883,6 +2313,10 @@ type Task struct { // `create_time` will be truncated to the nearest second. CreateTime string `json:"createTime,omitempty"` + // HttpRequest: HTTP request that is sent to the task's target. An HTTP + // task is a task that has HttpRequest set. + HttpRequest *HttpRequest `json:"httpRequest,omitempty"` + // Name: Optionally caller-specified in CreateTask. The task name. The // task name must have the following format: // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ @@ -2073,6 +2507,63 @@ func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UriOverride: Uri Override. When specified, all the HTTP tasks inside +// the queue will be partially or fully overridden depending on the +// configured values. +type UriOverride struct { + // Host: Host override. When specified, the host part of url will be + // overridden. For example, if the original Uri is + // "https://www.google.com", and host is set to "example.net", the + // overridden Uri will be "https://example.net". + Host string `json:"host,omitempty"` + + // Path: Uri path. Will be used as the path for the current Uri + // (replaces any existing path of the task url). + Path string `json:"path,omitempty"` + + // Port: Port override. When specified, the port part of Uri will be + // replaced by the provided value. For instance, for a Uri + // http://www.google.com/foo and port=123 the overridden Uri becomes + // http://www.google.com:123/foo. + Port int64 `json:"port,omitempty,string"` + + // Query: Uri Query. Will replace the query part of the task uri. + Query string `json:"query,omitempty"` + + // Scheme: Scheme override. When specified, the Uri scheme is replaced + // by the provided value. + // + // Possible values: + // "SCHEME_UNSPECIFIED" - Scheme unspecified. Defaults to HTTPS. + // "HTTP" - Convert the scheme to HTTP, e.g., https://www.google.ca + // will change to http://www.google.ca. + // "HTTPS" - Convert the scheme to HTTPS, e.g., http://www.google.ca + // will change to https://www.google.ca. + Scheme string `json:"scheme,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Host") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Host") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UriOverride) MarshalJSON() ([]byte, error) { + type NoMethod UriOverride + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // method id "cloudtasks.projects.locations.get": type ProjectsLocationsGetCall struct { @@ -2428,6 +2919,153 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +// method id "cloudtasks.projects.locations.queues.buffer": + +type ProjectsLocationsQueuesBufferCall struct { + s *Service + name string + bufferqueuerequest *BufferQueueRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Buffer: Creates and buffers a new task without the need to explicitly +// define a Task message. The queue must be an http queue (i.e., must +// have HTTP target). This method is used for a simplified application +// of Cloud Tasks queues in buffer and rate limitting HTTP requests. +// +// - name: The queue name. For example: +// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The +// queue must already exist. +func (r *ProjectsLocationsQueuesService) Buffer(name string, bufferqueuerequest *BufferQueueRequest) *ProjectsLocationsQueuesBufferCall { + c := &ProjectsLocationsQueuesBufferCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.bufferqueuerequest = bufferqueuerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsQueuesBufferCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesBufferCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsQueuesBufferCall) Context(ctx context.Context) *ProjectsLocationsQueuesBufferCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsQueuesBufferCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsQueuesBufferCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.bufferqueuerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta2/{+name}:buffer") + 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 "cloudtasks.projects.locations.queues.buffer" call. +// Exactly one of *BufferQueueResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *BufferQueueResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsQueuesBufferCall) Do(opts ...googleapi.CallOption) (*BufferQueueResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &BufferQueueResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates and buffers a new task without the need to explicitly define a Task message. The queue must be an http queue (i.e., must have HTTP target). This method is used for a simplified application of Cloud Tasks queues in buffer and rate limitting HTTP requests.", + // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:buffer", + // "httpMethod": "POST", + // "id": "cloudtasks.projects.locations.queues.buffer", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2beta2/{+name}:buffer", + // "request": { + // "$ref": "BufferQueueRequest" + // }, + // "response": { + // "$ref": "BufferQueueResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "cloudtasks.projects.locations.queues.create": type ProjectsLocationsQueuesCreateCall struct { diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index b82961d0af4..5bfdda8ddd8 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -8765,7 +8765,7 @@ ] }, "bulkInsert": { - "description": "Creates multiple instances. Count specifies the number of instances to create.", + "description": "Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.", "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", "httpMethod": "POST", "id": "compute.instances.bulkInsert", @@ -31172,7 +31172,7 @@ } } }, - "revision": "20220621", + "revision": "20220705", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -33292,7 +33292,7 @@ "type": "number" }, "maxUtilization": { - "description": "Optional parameter to define a target capacity for the UTILIZATIONbalancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.", + "description": "Optional parameter to define a target capacity for the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.", "format": "float", "type": "number" } @@ -34790,7 +34790,7 @@ }, "locationPolicy": { "$ref": "LocationPolicy", - "description": "Policy for chosing target zone." + "description": "Policy for chosing target zone. For more information, see Create VMs in bulk ." }, "minCount": { "description": "The minimum number of instances to create. If no min_count is specified then count is used as the default value. If min_count instances cannot be created, then no instances will be created and instances already created will be deleted.", @@ -45558,7 +45558,7 @@ "description": "Constraints that the caller requires on the result distribution in this zone." }, "preference": { - "description": "Preference for a given location.", + "description": "Preference for a given location. Set to either ALLOW or DENY.", "enum": [ "ALLOW", "DENY", @@ -46683,6 +46683,10 @@ "description": "Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. .", "type": "boolean" }, + "firewallPolicy": { + "description": "[Output Only] URL of the firewall policy the network is associated with.", + "type": "string" + }, "gatewayIPv4": { "description": "[Output Only] The gateway address for default routing out of the network, selected by GCP.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}", @@ -58611,6 +58615,14 @@ "description": "[Output Only] The ID value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name.", "type": "string" }, + "sourceSnapshotSchedulePolicy": { + "description": "[Output Only] URL of the resource policy which created this scheduled snapshot.", + "type": "string" + }, + "sourceSnapshotSchedulePolicyId": { + "description": "[Output Only] ID of the resource policy which created this scheduled snapshot.", + "type": "string" + }, "status": { "description": "[Output Only] The status of the snapshot. This can be CREATING, DELETING, FAILED, READY, or UPLOADING.", "enum": [ diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index 88629bccddd..22513cfbe81 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -4582,7 +4582,7 @@ type Backend struct { MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` // MaxUtilization: Optional parameter to define a target capacity for - // the UTILIZATIONbalancing mode. The valid range is [0.0, 1.0]. For + // the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For // usage guidelines, see Utilization balancing mode. MaxUtilization float64 `json:"maxUtilization,omitempty"` @@ -7093,7 +7093,8 @@ type BulkInsertInstanceResource struct { // to be created. Required if sourceInstanceTemplate is not provided. InstanceProperties *InstanceProperties `json:"instanceProperties,omitempty"` - // LocationPolicy: Policy for chosing target zone. + // LocationPolicy: Policy for chosing target zone. For more information, + // see Create VMs in bulk . LocationPolicy *LocationPolicy `json:"locationPolicy,omitempty"` // MinCount: The minimum number of instances to create. If no min_count @@ -24210,7 +24211,8 @@ type LocationPolicyLocation struct { // distribution in this zone. Constraints *LocationPolicyLocationConstraints `json:"constraints,omitempty"` - // Preference: Preference for a given location. + // Preference: Preference for a given location. Set to either ALLOW or + // DENY. // // Possible values: // "ALLOW" - Location is allowed for use. @@ -26040,6 +26042,10 @@ type Network struct { // prefix fd20::/20. . EnableUlaInternalIpv6 bool `json:"enableUlaInternalIpv6,omitempty"` + // FirewallPolicy: [Output Only] URL of the firewall policy the network + // is associated with. + FirewallPolicy string `json:"firewallPolicy,omitempty"` + // GatewayIPv4: [Output Only] The gateway address for default routing // out of the network, selected by GCP. GatewayIPv4 string `json:"gatewayIPv4,omitempty"` @@ -44345,6 +44351,14 @@ type Snapshot struct { // disk name. SourceDiskId string `json:"sourceDiskId,omitempty"` + // SourceSnapshotSchedulePolicy: [Output Only] URL of the resource + // policy which created this scheduled snapshot. + SourceSnapshotSchedulePolicy string `json:"sourceSnapshotSchedulePolicy,omitempty"` + + // SourceSnapshotSchedulePolicyId: [Output Only] ID of the resource + // policy which created this scheduled snapshot. + SourceSnapshotSchedulePolicyId string `json:"sourceSnapshotSchedulePolicyId,omitempty"` + // Status: [Output Only] The status of the snapshot. This can be // CREATING, DELETING, FAILED, READY, or UPLOADING. // @@ -93597,7 +93611,8 @@ type InstancesBulkInsertCall struct { } // BulkInsert: Creates multiple instances. Count specifies the number of -// instances to create. +// instances to create. For more information, see About bulk creation of +// VMs. // // - project: Project ID for this request. // - zone: The name of the zone for this request. @@ -93717,7 +93732,7 @@ func (c *InstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates multiple instances. Count specifies the number of instances to create.", + // "description": "Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.", // "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", // "httpMethod": "POST", // "id": "compute.instances.bulkInsert", diff --git a/datacatalog/v1/datacatalog-api.json b/datacatalog/v1/datacatalog-api.json index 7e93a0e1e15..26d0ce04969 100644 --- a/datacatalog/v1/datacatalog-api.json +++ b/datacatalog/v1/datacatalog-api.json @@ -1953,7 +1953,7 @@ } } }, - "revision": "20220530", + "revision": "20220707", "rootUrl": "https://datacatalog.googleapis.com/", "schemas": { "Binding": { @@ -2187,6 +2187,10 @@ "description": "Optional. Description of the column. Default value is an empty string. The description must be a UTF-8 string with the maximum size of 2000 bytes.", "type": "string" }, + "lookerColumnSpec": { + "$ref": "GoogleCloudDatacatalogV1ColumnSchemaLookerColumnSpec", + "description": "Looker specific column info of this column." + }, "mode": { "description": "Optional. A column's mode indicates whether values in this column are required, nullable, or repeated. Only `NULLABLE`, `REQUIRED`, and `REPEATED` values are supported. Default mode is `NULLABLE`.", "type": "string" @@ -2205,6 +2209,33 @@ }, "type": "object" }, + "GoogleCloudDatacatalogV1ColumnSchemaLookerColumnSpec": { + "description": "Column info specific to Looker System.", + "id": "GoogleCloudDatacatalogV1ColumnSchemaLookerColumnSpec", + "properties": { + "type": { + "description": "Looker specific column type of this column.", + "enum": [ + "LOOKER_COLUMN_TYPE_UNSPECIFIED", + "DIMENSION", + "DIMENSION_GROUP", + "FILTER", + "MEASURE", + "PAREMETER" + ], + "enumDescriptions": [ + "Unspecified.", + "Dimension.", + "Dimension group - parent for Dimension.", + "Filter.", + "Measure.", + "Parameter." + ], + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDatacatalogV1Contacts": { "description": "Contact people for the entry.", "id": "GoogleCloudDatacatalogV1Contacts", diff --git a/datacatalog/v1/datacatalog-gen.go b/datacatalog/v1/datacatalog-gen.go index 12245cf2761..ee6d612d318 100644 --- a/datacatalog/v1/datacatalog-gen.go +++ b/datacatalog/v1/datacatalog-gen.go @@ -751,6 +751,9 @@ type GoogleCloudDatacatalogV1ColumnSchema struct { // size of 2000 bytes. Description string `json:"description,omitempty"` + // LookerColumnSpec: Looker specific column info of this column. + LookerColumnSpec *GoogleCloudDatacatalogV1ColumnSchemaLookerColumnSpec `json:"lookerColumnSpec,omitempty"` + // Mode: Optional. A column's mode indicates whether values in this // column are required, nullable, or repeated. Only `NULLABLE`, // `REQUIRED`, and `REPEATED` values are supported. Default mode is @@ -788,6 +791,43 @@ func (s *GoogleCloudDatacatalogV1ColumnSchema) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDatacatalogV1ColumnSchemaLookerColumnSpec: Column info +// specific to Looker System. +type GoogleCloudDatacatalogV1ColumnSchemaLookerColumnSpec struct { + // Type: Looker specific column type of this column. + // + // Possible values: + // "LOOKER_COLUMN_TYPE_UNSPECIFIED" - Unspecified. + // "DIMENSION" - Dimension. + // "DIMENSION_GROUP" - Dimension group - parent for Dimension. + // "FILTER" - Filter. + // "MEASURE" - Measure. + // "PAREMETER" - Parameter. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Type") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Type") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDatacatalogV1ColumnSchemaLookerColumnSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDatacatalogV1ColumnSchemaLookerColumnSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDatacatalogV1Contacts: Contact people for the entry. type GoogleCloudDatacatalogV1Contacts struct { // People: The list of contact people for the entry. diff --git a/domains/v1/domains-api.json b/domains/v1/domains-api.json index 819f77762f6..6f07454af2f 100644 --- a/domains/v1/domains-api.json +++ b/domains/v1/domains-api.json @@ -843,7 +843,7 @@ } } }, - "revision": "20220616", + "revision": "20220712", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1566,7 +1566,7 @@ "type": "object" }, "PostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "PostalAddress", "properties": { "addressLines": { diff --git a/domains/v1/domains-gen.go b/domains/v1/domains-gen.go index 1bfc1214258..10b9b720f9d 100644 --- a/domains/v1/domains-gen.go +++ b/domains/v1/domains-gen.go @@ -1487,9 +1487,9 @@ func (s *Policy) MarshalJSON() ([]byte, error) { // to model geographical locations (roads, towns, mountains). In typical // usage an address would be created via user input or from importing // existing data, depending on the type of process. Advice on address -// input / editing: - Use an i18n-ready address widget such as -// https://github.com/google/libaddressinput) - Users should not be -// presented with UI elements for input or editing of fields outside +// input / editing: - Use an internationalization-ready address widget +// such as https://github.com/google/libaddressinput) - Users should not +// be presented with UI elements for input or editing of fields outside // countries where that field is used. For more guidance on how to use // this schema, please see: // https://support.google.com/business/answer/6397478 diff --git a/domains/v1beta1/domains-api.json b/domains/v1beta1/domains-api.json index 41e42bc5311..06d3c9e1f81 100644 --- a/domains/v1beta1/domains-api.json +++ b/domains/v1beta1/domains-api.json @@ -843,7 +843,7 @@ } } }, - "revision": "20220616", + "revision": "20220712", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1566,7 +1566,7 @@ "type": "object" }, "PostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "PostalAddress", "properties": { "addressLines": { diff --git a/domains/v1beta1/domains-gen.go b/domains/v1beta1/domains-gen.go index e6699949f9d..62610b71efc 100644 --- a/domains/v1beta1/domains-gen.go +++ b/domains/v1beta1/domains-gen.go @@ -1487,9 +1487,9 @@ func (s *Policy) MarshalJSON() ([]byte, error) { // to model geographical locations (roads, towns, mountains). In typical // usage an address would be created via user input or from importing // existing data, depending on the type of process. Advice on address -// input / editing: - Use an i18n-ready address widget such as -// https://github.com/google/libaddressinput) - Users should not be -// presented with UI elements for input or editing of fields outside +// input / editing: - Use an internationalization-ready address widget +// such as https://github.com/google/libaddressinput) - Users should not +// be presented with UI elements for input or editing of fields outside // countries where that field is used. For more guidance on how to use // this schema, please see: // https://support.google.com/business/answer/6397478 diff --git a/drive/v2/drive-api.json b/drive/v2/drive-api.json index 665fba0e2b7..062d654f3f2 100644 --- a/drive/v2/drive-api.json +++ b/drive/v2/drive-api.json @@ -38,7 +38,7 @@ "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/drive/", - "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/FJ_l9FpOo0745yxBh-UGhApXY3k\"", + "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/yvf5HwkC5GNTy86jNm4Q9l2g6tw\"", "icons": { "x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png", "x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png" @@ -327,6 +327,11 @@ "location": "query", "type": "boolean" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -430,6 +435,11 @@ "location": "query", "type": "boolean" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1160,6 +1170,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1378,6 +1393,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1470,6 +1490,11 @@ "location": "query", "type": "boolean" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1585,6 +1610,11 @@ "location": "query", "type": "boolean" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1670,6 +1700,75 @@ "https://www.googleapis.com/auth/drive.readonly" ] }, + "listLabels": { + "description": "Lists the labels on a file.", + "httpMethod": "GET", + "id": "drive.files.listLabels", + "parameterOrder": [ + "fileId" + ], + "parameters": { + "fileId": { + "description": "The ID of the file.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "default": "100", + "description": "The maximum number of labels to return per page. When not set, this defaults to 100.", + "format": "int32", + "location": "query", + "maximum": "100", + "minimum": "1", + "type": "integer" + }, + "pageToken": { + "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.", + "location": "query", + "type": "string" + } + }, + "path": "files/{fileId}/listLabels", + "response": { + "$ref": "LabelList" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.metadata", + "https://www.googleapis.com/auth/drive.metadata.readonly", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, + "modifyLabels": { + "description": "Modifies the set of labels on a file.", + "httpMethod": "POST", + "id": "drive.files.modifyLabels", + "parameterOrder": [ + "fileId" + ], + "parameters": { + "fileId": { + "description": "The ID of the file for which the labels are modified.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "files/{fileId}/modifyLabels", + "request": { + "$ref": "ModifyLabelsRequest" + }, + "response": { + "$ref": "ModifyLabelsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.metadata" + ] + }, "patch": { "description": "Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. This method supports patch semantics.", "httpMethod": "PATCH", @@ -1701,6 +1800,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1826,6 +1930,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1870,6 +1979,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1913,6 +2027,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1989,6 +2108,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -2121,6 +2245,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -3539,7 +3668,7 @@ } } }, - "revision": "20220508", + "revision": "20220709", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -4720,6 +4849,10 @@ "description": "Whether the current user can modify restrictions on content of this file.", "type": "boolean" }, + "canModifyLabels": { + "description": "Whether the current user can modify the labels on this file.", + "type": "boolean" + }, "canMoveChildrenOutOfDrive": { "description": "Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.", "type": "boolean" @@ -4764,6 +4897,10 @@ "description": "Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.", "type": "boolean" }, + "canReadLabels": { + "description": "Whether the current user can read the labels on this file.", + "type": "boolean" + }, "canReadRevisions": { "description": "Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.", "type": "boolean" @@ -5037,6 +5174,19 @@ "description": "The type of file. This is always drive#file.", "type": "string" }, + "labelInfo": { + "description": "An overview of the labels on the file.", + "properties": { + "labels": { + "description": "The set of labels on the file as requested by the label IDs in the includeLabels parameter. By default, no labels are returned.", + "items": { + "$ref": "Label" + }, + "type": "array" + } + }, + "type": "object" + }, "labels": { "description": "A group of labels for the file.", "properties": { @@ -5377,6 +5527,240 @@ }, "type": "object" }, + "Label": { + "description": "Representation of a label and its fields.", + "id": "Label", + "properties": { + "fields": { + "additionalProperties": { + "$ref": "LabelField" + }, + "description": "A map of the label's fields keyed by the field ID.", + "type": "object" + }, + "id": { + "description": "The ID of the label.", + "type": "string" + }, + "kind": { + "default": "drive#label", + "description": "This is always drive#label", + "type": "string" + }, + "revisionId": { + "description": "The revision ID of the label.", + "type": "string" + } + }, + "type": "object" + }, + "LabelField": { + "description": "Representation of a label field.", + "id": "LabelField", + "properties": { + "dateString": { + "description": "Only present if valueType is dateString. RFC 3339 formatted date: YYYY-MM-DD.", + "items": { + "format": "date", + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "The identifier of this field.", + "type": "string" + }, + "integer": { + "description": "Only present if valueType is integer.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "kind": { + "default": "drive#labelField", + "description": "This is always drive#labelField.", + "type": "string" + }, + "selection": { + "description": "Only present if valueType is selection.", + "items": { + "type": "string" + }, + "type": "array" + }, + "text": { + "description": "Only present if valueType is text.", + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "description": "Only present if valueType is user.", + "items": { + "$ref": "User" + }, + "type": "array" + }, + "valueType": { + "description": "The field type. While new values may be supported in the future, the following are currently allowed: \n- dateString \n- integer \n- selection \n- text \n- user", + "type": "string" + } + }, + "type": "object" + }, + "LabelFieldModification": { + "description": "A modification to a label's field.", + "id": "LabelFieldModification", + "properties": { + "fieldId": { + "description": "The ID of the field to be modified.", + "type": "string" + }, + "kind": { + "default": "drive#labelFieldModification", + "description": "This is always drive#labelFieldModification.", + "type": "string" + }, + "setDateValues": { + "description": "Replaces a dateString field with these new values. The values must be strings in the RFC 3339 full-date format: YYYY-MM-DD.", + "items": { + "format": "date", + "type": "string" + }, + "type": "array" + }, + "setIntegerValues": { + "description": "Replaces an integer field with these new values.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "setSelectionValues": { + "description": "Replaces a selection field with these new values.", + "items": { + "type": "string" + }, + "type": "array" + }, + "setTextValues": { + "description": "Replaces a text field with these new values.", + "items": { + "type": "string" + }, + "type": "array" + }, + "setUserValues": { + "description": "Replaces a user field with these new values. The values must be valid email addresses.", + "items": { + "type": "string" + }, + "type": "array" + }, + "unsetValues": { + "description": "Unsets the values for this field.", + "type": "boolean" + } + }, + "type": "object" + }, + "LabelList": { + "description": "A list of labels.", + "id": "LabelList", + "properties": { + "items": { + "description": "The list of labels.", + "items": { + "$ref": "Label" + }, + "type": "array" + }, + "kind": { + "default": "drive#labelList", + "description": "This is always drive#labelList", + "type": "string" + }, + "nextPageToken": { + "description": "The page token for the next page of labels. This field will be absent if the end of the list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.", + "type": "string" + } + }, + "type": "object" + }, + "LabelModification": { + "description": "A modification to a label on a file. A LabelModification can be used to apply a label to a file, update an existing label on a file, or remove a label from a file.", + "id": "LabelModification", + "properties": { + "fieldModifications": { + "description": "The list of modifications to this label's fields.", + "items": { + "$ref": "LabelFieldModification" + }, + "type": "array" + }, + "kind": { + "default": "drive#labelModification", + "description": "This is always drive#labelModification.", + "type": "string" + }, + "labelId": { + "annotations": { + "required": [ + "drive.files.modifyLabels" + ] + }, + "description": "The ID of the label to modify.", + "type": "string" + }, + "removeLabel": { + "description": "If true, the label will be removed from the file.", + "type": "boolean" + } + }, + "type": "object" + }, + "ModifyLabelsRequest": { + "description": "A request to modify the set of labels on a file. This request may contain many modifications that will either all succeed or all fail transactionally.", + "id": "ModifyLabelsRequest", + "properties": { + "kind": { + "default": "drive#modifyLabelsRequest", + "description": "This is always drive#modifyLabelsRequest", + "type": "string" + }, + "labelModifications": { + "description": "The list of modifications to apply to the labels on the file.", + "items": { + "$ref": "LabelModification" + }, + "type": "array" + } + }, + "type": "object" + }, + "ModifyLabelsResponse": { + "description": "Response to a ModifyLabels request. This contains only those labels which were added or updated by the request.", + "id": "ModifyLabelsResponse", + "properties": { + "kind": { + "default": "drive#modifyLabelsResponse", + "description": "This is always drive#modifyLabelsResponse", + "type": "string" + }, + "modifiedLabels": { + "description": "The list of labels which were added or updated by the request.", + "items": { + "$ref": "Label" + }, + "type": "array" + } + }, + "type": "object" + }, "ParentList": { "description": "A list of a file's parents.", "id": "ParentList", diff --git a/drive/v2/drive-gen.go b/drive/v2/drive-gen.go index b5b89bd3397..94ef27dd138 100644 --- a/drive/v2/drive-gen.go +++ b/drive/v2/drive-gen.go @@ -2071,6 +2071,9 @@ type File struct { // Kind: The type of file. This is always drive#file. Kind string `json:"kind,omitempty"` + // LabelInfo: An overview of the labels on the file. + LabelInfo *FileLabelInfo `json:"labelInfo,omitempty"` + // Labels: A group of labels for the file. Labels *FileLabels `json:"labels,omitempty"` @@ -2342,6 +2345,10 @@ type FileCapabilities struct { // restrictions on content of this file. CanModifyContentRestriction bool `json:"canModifyContentRestriction,omitempty"` + // CanModifyLabels: Whether the current user can modify the labels on + // this file. + CanModifyLabels bool `json:"canModifyLabels,omitempty"` + // CanMoveChildrenOutOfDrive: Whether the current user can move children // of this folder outside of the shared drive. This is false when the // item is not a folder. Only populated for items in shared drives. @@ -2394,6 +2401,10 @@ type FileCapabilities struct { // which this file belongs. Only populated for items in shared drives. CanReadDrive bool `json:"canReadDrive,omitempty"` + // CanReadLabels: Whether the current user can read the labels on this + // file. + CanReadLabels bool `json:"canReadLabels,omitempty"` + // CanReadRevisions: Whether the current user can read the revisions // resource of this file. For a shared drive item, whether revisions of // non-folder descendants of this item, or this item itself if it is not @@ -2654,6 +2665,35 @@ func (s *FileIndexableText) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FileLabelInfo: An overview of the labels on the file. +type FileLabelInfo struct { + // Labels: The set of labels on the file as requested by the label IDs + // in the includeLabels parameter. By default, no labels are returned. + Labels []*Label `json:"labels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Labels") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Labels") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FileLabelInfo) MarshalJSON() ([]byte, error) { + type NoMethod FileLabelInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FileLabels: A group of labels for the file. type FileLabels struct { // Hidden: Deprecated. @@ -2945,6 +2985,303 @@ func (s *GeneratedIds) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Label: Representation of a label and its fields. +type Label struct { + // Fields: A map of the label's fields keyed by the field ID. + Fields map[string]LabelField `json:"fields,omitempty"` + + // Id: The ID of the label. + Id string `json:"id,omitempty"` + + // Kind: This is always drive#label + Kind string `json:"kind,omitempty"` + + // RevisionId: The revision ID of the label. + RevisionId string `json:"revisionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fields") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Fields") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Label) MarshalJSON() ([]byte, error) { + type NoMethod Label + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LabelField: Representation of a label field. +type LabelField struct { + // DateString: Only present if valueType is dateString. RFC 3339 + // formatted date: YYYY-MM-DD. + DateString []string `json:"dateString,omitempty"` + + // Id: The identifier of this field. + Id string `json:"id,omitempty"` + + // Integer: Only present if valueType is integer. + Integer googleapi.Int64s `json:"integer,omitempty"` + + // Kind: This is always drive#labelField. + Kind string `json:"kind,omitempty"` + + // Selection: Only present if valueType is selection. + Selection []string `json:"selection,omitempty"` + + // Text: Only present if valueType is text. + Text []string `json:"text,omitempty"` + + // User: Only present if valueType is user. + User []*User `json:"user,omitempty"` + + // ValueType: The field type. While new values may be supported in the + // future, the following are currently allowed: + // - dateString + // - integer + // - selection + // - text + // - user + ValueType string `json:"valueType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DateString") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DateString") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LabelField) MarshalJSON() ([]byte, error) { + type NoMethod LabelField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LabelFieldModification: A modification to a label's field. +type LabelFieldModification struct { + // FieldId: The ID of the field to be modified. + FieldId string `json:"fieldId,omitempty"` + + // Kind: This is always drive#labelFieldModification. + Kind string `json:"kind,omitempty"` + + // SetDateValues: Replaces a dateString field with these new values. The + // values must be strings in the RFC 3339 full-date format: YYYY-MM-DD. + SetDateValues []string `json:"setDateValues,omitempty"` + + // SetIntegerValues: Replaces an integer field with these new values. + SetIntegerValues googleapi.Int64s `json:"setIntegerValues,omitempty"` + + // SetSelectionValues: Replaces a selection field with these new values. + SetSelectionValues []string `json:"setSelectionValues,omitempty"` + + // SetTextValues: Replaces a text field with these new values. + SetTextValues []string `json:"setTextValues,omitempty"` + + // SetUserValues: Replaces a user field with these new values. The + // values must be valid email addresses. + SetUserValues []string `json:"setUserValues,omitempty"` + + // UnsetValues: Unsets the values for this field. + UnsetValues bool `json:"unsetValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FieldId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LabelFieldModification) MarshalJSON() ([]byte, error) { + type NoMethod LabelFieldModification + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LabelList: A list of labels. +type LabelList struct { + // Items: The list of labels. + Items []*Label `json:"items,omitempty"` + + // Kind: This is always drive#labelList + Kind string `json:"kind,omitempty"` + + // NextPageToken: The page token for the next page of labels. This field + // will be absent if the end of the list has been reached. If the token + // is rejected for any reason, it should be discarded, and pagination + // should be restarted from the first 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. "Items") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Items") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LabelList) MarshalJSON() ([]byte, error) { + type NoMethod LabelList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LabelModification: A modification to a label on a file. A +// LabelModification can be used to apply a label to a file, update an +// existing label on a file, or remove a label from a file. +type LabelModification struct { + // FieldModifications: The list of modifications to this label's fields. + FieldModifications []*LabelFieldModification `json:"fieldModifications,omitempty"` + + // Kind: This is always drive#labelModification. + Kind string `json:"kind,omitempty"` + + // LabelId: The ID of the label to modify. + LabelId string `json:"labelId,omitempty"` + + // RemoveLabel: If true, the label will be removed from the file. + RemoveLabel bool `json:"removeLabel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldModifications") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FieldModifications") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LabelModification) MarshalJSON() ([]byte, error) { + type NoMethod LabelModification + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ModifyLabelsRequest: A request to modify the set of labels on a file. +// This request may contain many modifications that will either all +// succeed or all fail transactionally. +type ModifyLabelsRequest struct { + // Kind: This is always drive#modifyLabelsRequest + Kind string `json:"kind,omitempty"` + + // LabelModifications: The list of modifications to apply to the labels + // on the file. + LabelModifications []*LabelModification `json:"labelModifications,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModifyLabelsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ModifyLabelsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ModifyLabelsResponse: Response to a ModifyLabels request. This +// contains only those labels which were added or updated by the +// request. +type ModifyLabelsResponse struct { + // Kind: This is always drive#modifyLabelsResponse + Kind string `json:"kind,omitempty"` + + // ModifiedLabels: The list of labels which were added or updated by the + // request. + ModifiedLabels []*Label `json:"modifiedLabels,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModifyLabelsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ModifyLabelsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ParentList: A list of a file's parents. type ParentList struct { // Etag: The ETag of the list. @@ -4986,6 +5323,14 @@ func (c *ChangesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bo return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *ChangesListCall) IncludeLabels(includeLabels string) *ChangesListCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -5189,6 +5534,11 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error) // "location": "query", // "type": "boolean" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -5340,6 +5690,14 @@ func (c *ChangesWatchCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives b return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *ChangesWatchCall) IncludeLabels(includeLabels string) *ChangesWatchCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -5535,6 +5893,11 @@ func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // "location": "query", // "type": "boolean" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -8465,6 +8828,14 @@ func (c *FilesCopyCall) EnforceSingleParent(enforceSingleParent bool) *FilesCopy return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesCopyCall) IncludeLabels(includeLabels string) *FilesCopyCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -8654,6 +9025,11 @@ func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -9330,6 +9706,14 @@ func (c *FilesGetCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesGetCall { return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesGetCall) IncludeLabels(includeLabels string) *FilesGetCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -9515,6 +9899,11 @@ func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -9610,6 +9999,14 @@ func (c *FilesInsertCall) EnforceSingleParent(enforceSingleParent bool) *FilesIn return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesInsertCall) IncludeLabels(includeLabels string) *FilesInsertCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -9877,6 +10274,11 @@ func (c *FilesInsertCall) Do(opts ...googleapi.CallOption) (*File, error) { // "location": "query", // "type": "boolean" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -10017,6 +10419,14 @@ func (c *FilesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesListCall) IncludeLabels(includeLabels string) *FilesListCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -10238,6 +10648,11 @@ func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) { // "location": "query", // "type": "boolean" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -10347,10 +10762,351 @@ func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) erro } } -// method id "drive.files.patch": +// method id "drive.files.listLabels": -type FilesPatchCall struct { - s *Service +type FilesListLabelsCall struct { + s *Service + fileId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListLabels: Lists the labels on a file. +// +// - fileId: The ID of the file. +func (r *FilesService) ListLabels(fileId string) *FilesListLabelsCall { + c := &FilesListLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.fileId = fileId + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of labels to return per page. When not set, this defaults to +// 100. +func (c *FilesListLabelsCall) MaxResults(maxResults int64) *FilesListLabelsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token for +// continuing a previous list request on the next page. This should be +// set to the value of 'nextPageToken' from the previous response. +func (c *FilesListLabelsCall) PageToken(pageToken string) *FilesListLabelsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FilesListLabelsCall) Fields(s ...googleapi.Field) *FilesListLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FilesListLabelsCall) IfNoneMatch(entityTag string) *FilesListLabelsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FilesListLabelsCall) Context(ctx context.Context) *FilesListLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FilesListLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FilesListLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/listLabels") + 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{ + "fileId": c.fileId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drive.files.listLabels" call. +// Exactly one of *LabelList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LabelList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &LabelList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the labels on a file.", + // "httpMethod": "GET", + // "id": "drive.files.listLabels", + // "parameterOrder": [ + // "fileId" + // ], + // "parameters": { + // "fileId": { + // "description": "The ID of the file.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "default": "100", + // "description": "The maximum number of labels to return per page. When not set, this defaults to 100.", + // "format": "int32", + // "location": "query", + // "maximum": "100", + // "minimum": "1", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "files/{fileId}/listLabels", + // "response": { + // "$ref": "LabelList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/drive.metadata", + // "https://www.googleapis.com/auth/drive.metadata.readonly", + // "https://www.googleapis.com/auth/drive.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *FilesListLabelsCall) Pages(ctx context.Context, f func(*LabelList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "drive.files.modifyLabels": + +type FilesModifyLabelsCall struct { + s *Service + fileId string + modifylabelsrequest *ModifyLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ModifyLabels: Modifies the set of labels on a file. +// +// - fileId: The ID of the file for which the labels are modified. +func (r *FilesService) ModifyLabels(fileId string, modifylabelsrequest *ModifyLabelsRequest) *FilesModifyLabelsCall { + c := &FilesModifyLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.fileId = fileId + c.modifylabelsrequest = modifylabelsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FilesModifyLabelsCall) Fields(s ...googleapi.Field) *FilesModifyLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FilesModifyLabelsCall) Context(ctx context.Context) *FilesModifyLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FilesModifyLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FilesModifyLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifylabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/modifyLabels") + 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{ + "fileId": c.fileId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drive.files.modifyLabels" call. +// Exactly one of *ModifyLabelsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ModifyLabelsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FilesModifyLabelsCall) Do(opts ...googleapi.CallOption) (*ModifyLabelsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ModifyLabelsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies the set of labels on a file.", + // "httpMethod": "POST", + // "id": "drive.files.modifyLabels", + // "parameterOrder": [ + // "fileId" + // ], + // "parameters": { + // "fileId": { + // "description": "The ID of the file for which the labels are modified.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "files/{fileId}/modifyLabels", + // "request": { + // "$ref": "ModifyLabelsRequest" + // }, + // "response": { + // "$ref": "ModifyLabelsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/drive.metadata" + // ] + // } + +} + +// method id "drive.files.patch": + +type FilesPatchCall struct { + s *Service fileId string file *File urlParams_ gensupport.URLParams @@ -10393,6 +11149,14 @@ func (c *FilesPatchCall) EnforceSingleParent(enforceSingleParent bool) *FilesPat return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesPatchCall) IncludeLabels(includeLabels string) *FilesPatchCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -10641,6 +11405,11 @@ func (c *FilesPatchCall) Do(opts ...googleapi.CallOption) (*File, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -10774,6 +11543,14 @@ func (r *FilesService) Touch(fileId string) *FilesTouchCall { return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesTouchCall) IncludeLabels(includeLabels string) *FilesTouchCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -10897,6 +11674,11 @@ func (c *FilesTouchCall) Do(opts ...googleapi.CallOption) (*File, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -10955,6 +11737,14 @@ func (r *FilesService) Trash(fileId string) *FilesTrashCall { return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesTrashCall) IncludeLabels(includeLabels string) *FilesTrashCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -11078,6 +11868,11 @@ func (c *FilesTrashCall) Do(opts ...googleapi.CallOption) (*File, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -11131,6 +11926,14 @@ func (r *FilesService) Untrash(fileId string) *FilesUntrashCall { return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesUntrashCall) IncludeLabels(includeLabels string) *FilesUntrashCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -11254,6 +12057,11 @@ func (c *FilesUntrashCall) Do(opts ...googleapi.CallOption) (*File, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -11333,6 +12141,14 @@ func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParent bool) *FilesUp return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesUpdateCall) IncludeLabels(includeLabels string) *FilesUpdateCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -11664,6 +12480,11 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -11810,6 +12631,14 @@ func (c *FilesWatchCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesWatchCall return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesWatchCall) IncludeLabels(includeLabels string) *FilesWatchCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -11987,6 +12816,11 @@ func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", diff --git a/drive/v3/drive-api.json b/drive/v3/drive-api.json index 5c0ab76fdca..55999ba85f5 100644 --- a/drive/v3/drive-api.json +++ b/drive/v3/drive-api.json @@ -35,7 +35,7 @@ "description": "Manages files in Drive including uploading, downloading, searching, detecting changes, and updating sharing permissions.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/drive/", - "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/DjxGwbwcG0aMN4JG40B35nyJYNc\"", + "etag": "\"uWj2hSb4GVjzdDlAnRd2gbM1ZQ8/w7NrSVvAsjGozhSi_2XXg55ifjM\"", "icons": { "x16": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_16.png", "x32": "https://ssl.gstatic.com/docs/doclist/images/drive_icon_32.png" @@ -183,6 +183,11 @@ "location": "query", "type": "boolean" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -285,6 +290,11 @@ "location": "query", "type": "boolean" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -810,6 +820,11 @@ "location": "query", "type": "boolean" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -886,6 +901,11 @@ "location": "query", "type": "boolean" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1080,6 +1100,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1149,6 +1174,11 @@ "location": "query", "type": "boolean" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1222,6 +1252,75 @@ "https://www.googleapis.com/auth/drive.readonly" ] }, + "listLabels": { + "description": "Lists the labels on a file.", + "httpMethod": "GET", + "id": "drive.files.listLabels", + "parameterOrder": [ + "fileId" + ], + "parameters": { + "fileId": { + "description": "The ID of the file.", + "location": "path", + "required": true, + "type": "string" + }, + "maxResults": { + "default": "100", + "description": "The maximum number of labels to return per page. When not set, this defaults to 100.", + "format": "int32", + "location": "query", + "maximum": "100", + "minimum": "1", + "type": "integer" + }, + "pageToken": { + "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.", + "location": "query", + "type": "string" + } + }, + "path": "files/{fileId}/listLabels", + "response": { + "$ref": "LabelList" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.metadata", + "https://www.googleapis.com/auth/drive.metadata.readonly", + "https://www.googleapis.com/auth/drive.readonly" + ] + }, + "modifyLabels": { + "description": "Modifies the set of labels on a file.", + "httpMethod": "POST", + "id": "drive.files.modifyLabels", + "parameterOrder": [ + "fileId" + ], + "parameters": { + "fileId": { + "description": "The ID of the file for which the labels are modified.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "files/{fileId}/modifyLabels", + "request": { + "$ref": "ModifyLabelsRequest" + }, + "response": { + "$ref": "ModifyLabelsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.metadata" + ] + }, "update": { "description": "Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. This method supports patch semantics.", "httpMethod": "PATCH", @@ -1263,6 +1362,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -1339,6 +1443,11 @@ "required": true, "type": "string" }, + "includeLabels": { + "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + "location": "query", + "type": "string" + }, "includePermissionsForView": { "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", "location": "query", @@ -2203,7 +2312,7 @@ } } }, - "revision": "20220508", + "revision": "20220709", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { @@ -2883,6 +2992,10 @@ "description": "Whether the current user can modify restrictions on content of this file.", "type": "boolean" }, + "canModifyLabels": { + "description": "Whether the current user can modify the labels on this file.", + "type": "boolean" + }, "canMoveChildrenOutOfDrive": { "description": "Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives.", "type": "boolean" @@ -2927,6 +3040,10 @@ "description": "Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.", "type": "boolean" }, + "canReadLabels": { + "description": "Whether the current user can read the labels on this file.", + "type": "boolean" + }, "canReadRevisions": { "description": "Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read.", "type": "boolean" @@ -3186,6 +3303,19 @@ "description": "Identifies what kind of resource this is. Value: the fixed string \"drive#file\".", "type": "string" }, + "labelInfo": { + "description": "An overview of the labels on the file.", + "properties": { + "labels": { + "description": "The set of labels on the file as requested by the label IDs in the includeLabels parameter. By default, no labels are returned.", + "items": { + "$ref": "Label" + }, + "type": "array" + } + }, + "type": "object" + }, "lastModifyingUser": { "$ref": "User", "description": "The last user to modify the file." @@ -3459,6 +3589,240 @@ }, "type": "object" }, + "Label": { + "description": "Representation of a label and its fields.", + "id": "Label", + "properties": { + "fields": { + "additionalProperties": { + "$ref": "LabelField" + }, + "description": "A map of the label's fields keyed by the field ID.", + "type": "object" + }, + "id": { + "description": "The ID of the label.", + "type": "string" + }, + "kind": { + "default": "drive#label", + "description": "This is always drive#label", + "type": "string" + }, + "revisionId": { + "description": "The revision ID of the label.", + "type": "string" + } + }, + "type": "object" + }, + "LabelField": { + "description": "Representation of a label field.", + "id": "LabelField", + "properties": { + "dateString": { + "description": "Only present if valueType is dateString. RFC 3339 formatted date: YYYY-MM-DD.", + "items": { + "format": "date", + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "The identifier of this field.", + "type": "string" + }, + "integer": { + "description": "Only present if valueType is integer.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "kind": { + "default": "drive#labelField", + "description": "This is always drive#labelField.", + "type": "string" + }, + "selection": { + "description": "Only present if valueType is selection.", + "items": { + "type": "string" + }, + "type": "array" + }, + "text": { + "description": "Only present if valueType is text.", + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "description": "Only present if valueType is user.", + "items": { + "$ref": "User" + }, + "type": "array" + }, + "valueType": { + "description": "The field type. While new values may be supported in the future, the following are currently allowed: \n- dateString \n- integer \n- selection \n- text \n- user", + "type": "string" + } + }, + "type": "object" + }, + "LabelFieldModification": { + "description": "A modification to a label's field.", + "id": "LabelFieldModification", + "properties": { + "fieldId": { + "description": "The ID of the Field to be modified.", + "type": "string" + }, + "kind": { + "default": "drive#labelFieldModification", + "description": "This is always drive#labelFieldModification.", + "type": "string" + }, + "setDateValues": { + "description": "Replaces a dateString field with these new values. The values must be strings in the RFC 3339 full-date format: YYYY-MM-DD.", + "items": { + "format": "date", + "type": "string" + }, + "type": "array" + }, + "setIntegerValues": { + "description": "Replaces an integer field with these new values.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "setSelectionValues": { + "description": "Replaces a selection field with these new values.", + "items": { + "type": "string" + }, + "type": "array" + }, + "setTextValues": { + "description": "Replaces a text field with these new values.", + "items": { + "type": "string" + }, + "type": "array" + }, + "setUserValues": { + "description": "Replaces a user field with these new values. The values must be valid email addresses.", + "items": { + "type": "string" + }, + "type": "array" + }, + "unsetValues": { + "description": "Unsets the values for this field.", + "type": "boolean" + } + }, + "type": "object" + }, + "LabelList": { + "description": "A list of labels.", + "id": "LabelList", + "properties": { + "kind": { + "default": "drive#labelList", + "description": "This is always drive#labelList", + "type": "string" + }, + "labels": { + "description": "The list of labels.", + "items": { + "$ref": "Label" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The page token for the next page of labels. This field will be absent if the end of the list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.", + "type": "string" + } + }, + "type": "object" + }, + "LabelModification": { + "description": "A modification to a label on a file. A LabelModification can be used to apply a label to a file, update an existing label on a file, or remove a label from a file.", + "id": "LabelModification", + "properties": { + "fieldModifications": { + "description": "The list of modifications to this label's fields.", + "items": { + "$ref": "LabelFieldModification" + }, + "type": "array" + }, + "kind": { + "default": "drive#labelModification", + "description": "This is always drive#labelModification.", + "type": "string" + }, + "labelId": { + "annotations": { + "required": [ + "drive.files.modifyLabels" + ] + }, + "description": "The ID of the label to modify.", + "type": "string" + }, + "removeLabel": { + "description": "If true, the label will be removed from the file.", + "type": "boolean" + } + }, + "type": "object" + }, + "ModifyLabelsRequest": { + "description": "A request to modify the set of labels on a file. This request may contain many modifications that will either all succeed or all fail transactionally.", + "id": "ModifyLabelsRequest", + "properties": { + "kind": { + "default": "drive#modifyLabelsRequest", + "description": "This is always drive#modifyLabelsRequest", + "type": "string" + }, + "labelModifications": { + "description": "The list of modifications to apply to the labels on the file.", + "items": { + "$ref": "LabelModification" + }, + "type": "array" + } + }, + "type": "object" + }, + "ModifyLabelsResponse": { + "description": "Response to a ModifyLabels request. This contains only those labels which were added or updated by the request.", + "id": "ModifyLabelsResponse", + "properties": { + "kind": { + "default": "drive#modifyLabelsResponse", + "description": "This is always drive#modifyLabelsResponse", + "type": "string" + }, + "modifiedLabels": { + "description": "The list of labels which were added or updated by the request.", + "items": { + "$ref": "Label" + }, + "type": "array" + } + }, + "type": "object" + }, "Permission": { "description": "A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.", "id": "Permission", diff --git a/drive/v3/drive-gen.go b/drive/v3/drive-gen.go index 15efd7008af..4b3fec474a6 100644 --- a/drive/v3/drive-gen.go +++ b/drive/v3/drive-gen.go @@ -1301,6 +1301,9 @@ type File struct { // string "drive#file". Kind string `json:"kind,omitempty"` + // LabelInfo: An overview of the labels on the file. + LabelInfo *FileLabelInfo `json:"labelInfo,omitempty"` + // LastModifyingUser: The last user to modify the file. LastModifyingUser *User `json:"lastModifyingUser,omitempty"` @@ -1572,6 +1575,10 @@ type FileCapabilities struct { // restrictions on content of this file. CanModifyContentRestriction bool `json:"canModifyContentRestriction,omitempty"` + // CanModifyLabels: Whether the current user can modify the labels on + // this file. + CanModifyLabels bool `json:"canModifyLabels,omitempty"` + // CanMoveChildrenOutOfDrive: Whether the current user can move children // of this folder outside of the shared drive. This is false when the // item is not a folder. Only populated for items in shared drives. @@ -1624,6 +1631,10 @@ type FileCapabilities struct { // which this file belongs. Only populated for items in shared drives. CanReadDrive bool `json:"canReadDrive,omitempty"` + // CanReadLabels: Whether the current user can read the labels on this + // file. + CanReadLabels bool `json:"canReadLabels,omitempty"` + // CanReadRevisions: Whether the current user can read the revisions // resource of this file. For a shared drive item, whether revisions of // non-folder descendants of this item, or this item itself if it is not @@ -1922,6 +1933,35 @@ func (s *FileImageMediaMetadataLocation) UnmarshalJSON(data []byte) error { return nil } +// FileLabelInfo: An overview of the labels on the file. +type FileLabelInfo struct { + // Labels: The set of labels on the file as requested by the label IDs + // in the includeLabels parameter. By default, no labels are returned. + Labels []*Label `json:"labels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Labels") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Labels") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FileLabelInfo) MarshalJSON() ([]byte, error) { + type NoMethod FileLabelInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // FileLinkShareMetadata: Contains details about the link URLs that // clients are using to refer to this item. type FileLinkShareMetadata struct { @@ -2125,6 +2165,303 @@ func (s *GeneratedIds) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Label: Representation of a label and its fields. +type Label struct { + // Fields: A map of the label's fields keyed by the field ID. + Fields map[string]LabelField `json:"fields,omitempty"` + + // Id: The ID of the label. + Id string `json:"id,omitempty"` + + // Kind: This is always drive#label + Kind string `json:"kind,omitempty"` + + // RevisionId: The revision ID of the label. + RevisionId string `json:"revisionId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Fields") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Fields") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Label) MarshalJSON() ([]byte, error) { + type NoMethod Label + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LabelField: Representation of a label field. +type LabelField struct { + // DateString: Only present if valueType is dateString. RFC 3339 + // formatted date: YYYY-MM-DD. + DateString []string `json:"dateString,omitempty"` + + // Id: The identifier of this field. + Id string `json:"id,omitempty"` + + // Integer: Only present if valueType is integer. + Integer googleapi.Int64s `json:"integer,omitempty"` + + // Kind: This is always drive#labelField. + Kind string `json:"kind,omitempty"` + + // Selection: Only present if valueType is selection. + Selection []string `json:"selection,omitempty"` + + // Text: Only present if valueType is text. + Text []string `json:"text,omitempty"` + + // User: Only present if valueType is user. + User []*User `json:"user,omitempty"` + + // ValueType: The field type. While new values may be supported in the + // future, the following are currently allowed: + // - dateString + // - integer + // - selection + // - text + // - user + ValueType string `json:"valueType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DateString") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DateString") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LabelField) MarshalJSON() ([]byte, error) { + type NoMethod LabelField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LabelFieldModification: A modification to a label's field. +type LabelFieldModification struct { + // FieldId: The ID of the Field to be modified. + FieldId string `json:"fieldId,omitempty"` + + // Kind: This is always drive#labelFieldModification. + Kind string `json:"kind,omitempty"` + + // SetDateValues: Replaces a dateString field with these new values. The + // values must be strings in the RFC 3339 full-date format: YYYY-MM-DD. + SetDateValues []string `json:"setDateValues,omitempty"` + + // SetIntegerValues: Replaces an integer field with these new values. + SetIntegerValues googleapi.Int64s `json:"setIntegerValues,omitempty"` + + // SetSelectionValues: Replaces a selection field with these new values. + SetSelectionValues []string `json:"setSelectionValues,omitempty"` + + // SetTextValues: Replaces a text field with these new values. + SetTextValues []string `json:"setTextValues,omitempty"` + + // SetUserValues: Replaces a user field with these new values. The + // values must be valid email addresses. + SetUserValues []string `json:"setUserValues,omitempty"` + + // UnsetValues: Unsets the values for this field. + UnsetValues bool `json:"unsetValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FieldId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LabelFieldModification) MarshalJSON() ([]byte, error) { + type NoMethod LabelFieldModification + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LabelList: A list of labels. +type LabelList struct { + // Kind: This is always drive#labelList + Kind string `json:"kind,omitempty"` + + // Labels: The list of labels. + Labels []*Label `json:"labels,omitempty"` + + // NextPageToken: The page token for the next page of labels. This field + // will be absent if the end of the list has been reached. If the token + // is rejected for any reason, it should be discarded, and pagination + // should be restarted from the first 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. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LabelList) MarshalJSON() ([]byte, error) { + type NoMethod LabelList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LabelModification: A modification to a label on a file. A +// LabelModification can be used to apply a label to a file, update an +// existing label on a file, or remove a label from a file. +type LabelModification struct { + // FieldModifications: The list of modifications to this label's fields. + FieldModifications []*LabelFieldModification `json:"fieldModifications,omitempty"` + + // Kind: This is always drive#labelModification. + Kind string `json:"kind,omitempty"` + + // LabelId: The ID of the label to modify. + LabelId string `json:"labelId,omitempty"` + + // RemoveLabel: If true, the label will be removed from the file. + RemoveLabel bool `json:"removeLabel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldModifications") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FieldModifications") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LabelModification) MarshalJSON() ([]byte, error) { + type NoMethod LabelModification + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ModifyLabelsRequest: A request to modify the set of labels on a file. +// This request may contain many modifications that will either all +// succeed or all fail transactionally. +type ModifyLabelsRequest struct { + // Kind: This is always drive#modifyLabelsRequest + Kind string `json:"kind,omitempty"` + + // LabelModifications: The list of modifications to apply to the labels + // on the file. + LabelModifications []*LabelModification `json:"labelModifications,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModifyLabelsRequest) MarshalJSON() ([]byte, error) { + type NoMethod ModifyLabelsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ModifyLabelsResponse: Response to a ModifyLabels request. This +// contains only those labels which were added or updated by the +// request. +type ModifyLabelsResponse struct { + // Kind: This is always drive#modifyLabelsResponse + Kind string `json:"kind,omitempty"` + + // ModifiedLabels: The list of labels which were added or updated by the + // request. + ModifiedLabels []*Label `json:"modifiedLabels,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModifyLabelsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ModifyLabelsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Permission: A permission for a file. A permission grants a user, // group, domain or the world access to a file or a folder hierarchy. type Permission struct { @@ -3413,6 +3750,14 @@ func (c *ChangesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bo return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *ChangesListCall) IncludeLabels(includeLabels string) *ChangesListCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -3605,6 +3950,11 @@ func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangeList, error) // "location": "query", // "type": "boolean" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -3735,6 +4085,14 @@ func (c *ChangesWatchCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives b return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *ChangesWatchCall) IncludeLabels(includeLabels string) *ChangesWatchCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -3919,6 +4277,11 @@ func (c *ChangesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // "location": "query", // "type": "boolean" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -6000,6 +6363,14 @@ func (c *FilesCopyCall) IgnoreDefaultVisibility(ignoreDefaultVisibility bool) *F return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesCopyCall) IncludeLabels(includeLabels string) *FilesCopyCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -6157,6 +6528,11 @@ func (c *FilesCopyCall) Do(opts ...googleapi.CallOption) (*File, error) { // "location": "query", // "type": "boolean" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -6240,6 +6616,14 @@ func (c *FilesCreateCall) IgnoreDefaultVisibility(ignoreDefaultVisibility bool) return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesCreateCall) IncludeLabels(includeLabels string) *FilesCreateCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -6476,6 +6860,11 @@ func (c *FilesCreateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "location": "query", // "type": "boolean" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -7130,6 +7519,14 @@ func (c *FilesGetCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesGetCall { return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesGetCall) IncludeLabels(includeLabels string) *FilesGetCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -7288,6 +7685,11 @@ func (c *FilesGetCall) Do(opts ...googleapi.CallOption) (*File, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -7383,6 +7785,14 @@ func (c *FilesListCall) IncludeItemsFromAllDrives(includeItemsFromAllDrives bool return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesListCall) IncludeLabels(includeLabels string) *FilesListCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -7596,6 +8006,11 @@ func (c *FilesListCall) Do(opts ...googleapi.CallOption) (*FileList, error) { // "location": "query", // "type": "boolean" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -7693,10 +8108,351 @@ func (c *FilesListCall) Pages(ctx context.Context, f func(*FileList) error) erro } } -// method id "drive.files.update": +// method id "drive.files.listLabels": -type FilesUpdateCall struct { - s *Service +type FilesListLabelsCall struct { + s *Service + fileId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListLabels: Lists the labels on a file. +// +// - fileId: The ID of the file. +func (r *FilesService) ListLabels(fileId string) *FilesListLabelsCall { + c := &FilesListLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.fileId = fileId + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of labels to return per page. When not set, this defaults to +// 100. +func (c *FilesListLabelsCall) MaxResults(maxResults int64) *FilesListLabelsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// PageToken sets the optional parameter "pageToken": The token for +// continuing a previous list request on the next page. This should be +// set to the value of 'nextPageToken' from the previous response. +func (c *FilesListLabelsCall) PageToken(pageToken string) *FilesListLabelsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FilesListLabelsCall) Fields(s ...googleapi.Field) *FilesListLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *FilesListLabelsCall) IfNoneMatch(entityTag string) *FilesListLabelsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FilesListLabelsCall) Context(ctx context.Context) *FilesListLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FilesListLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FilesListLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/listLabels") + 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{ + "fileId": c.fileId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drive.files.listLabels" call. +// Exactly one of *LabelList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *LabelList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *FilesListLabelsCall) Do(opts ...googleapi.CallOption) (*LabelList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &LabelList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the labels on a file.", + // "httpMethod": "GET", + // "id": "drive.files.listLabels", + // "parameterOrder": [ + // "fileId" + // ], + // "parameters": { + // "fileId": { + // "description": "The ID of the file.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "maxResults": { + // "default": "100", + // "description": "The maximum number of labels to return per page. When not set, this defaults to 100.", + // "format": "int32", + // "location": "query", + // "maximum": "100", + // "minimum": "1", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "files/{fileId}/listLabels", + // "response": { + // "$ref": "LabelList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/drive.metadata", + // "https://www.googleapis.com/auth/drive.metadata.readonly", + // "https://www.googleapis.com/auth/drive.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *FilesListLabelsCall) Pages(ctx context.Context, f func(*LabelList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "drive.files.modifyLabels": + +type FilesModifyLabelsCall struct { + s *Service + fileId string + modifylabelsrequest *ModifyLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ModifyLabels: Modifies the set of labels on a file. +// +// - fileId: The ID of the file for which the labels are modified. +func (r *FilesService) ModifyLabels(fileId string, modifylabelsrequest *ModifyLabelsRequest) *FilesModifyLabelsCall { + c := &FilesModifyLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.fileId = fileId + c.modifylabelsrequest = modifylabelsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FilesModifyLabelsCall) Fields(s ...googleapi.Field) *FilesModifyLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *FilesModifyLabelsCall) Context(ctx context.Context) *FilesModifyLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FilesModifyLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FilesModifyLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifylabelsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "files/{fileId}/modifyLabels") + 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{ + "fileId": c.fileId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "drive.files.modifyLabels" call. +// Exactly one of *ModifyLabelsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ModifyLabelsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FilesModifyLabelsCall) Do(opts ...googleapi.CallOption) (*ModifyLabelsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ModifyLabelsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies the set of labels on a file.", + // "httpMethod": "POST", + // "id": "drive.files.modifyLabels", + // "parameterOrder": [ + // "fileId" + // ], + // "parameters": { + // "fileId": { + // "description": "The ID of the file for which the labels are modified.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "files/{fileId}/modifyLabels", + // "request": { + // "$ref": "ModifyLabelsRequest" + // }, + // "response": { + // "$ref": "ModifyLabelsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/drive", + // "https://www.googleapis.com/auth/drive.file", + // "https://www.googleapis.com/auth/drive.metadata" + // ] + // } + +} + +// method id "drive.files.update": + +type FilesUpdateCall struct { + s *Service fileId string file *File urlParams_ gensupport.URLParams @@ -7733,6 +8489,14 @@ func (c *FilesUpdateCall) EnforceSingleParent(enforceSingleParent bool) *FilesUp return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesUpdateCall) IncludeLabels(includeLabels string) *FilesUpdateCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -7987,6 +8751,11 @@ func (c *FilesUpdateCall) Do(opts ...googleapi.CallOption) (*File, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", @@ -8078,6 +8847,14 @@ func (c *FilesWatchCall) AcknowledgeAbuse(acknowledgeAbuse bool) *FilesWatchCall return c } +// IncludeLabels sets the optional parameter "includeLabels": A +// comma-separated list of IDs of labels to include in the labelInfo +// part of the response. +func (c *FilesWatchCall) IncludeLabels(includeLabels string) *FilesWatchCall { + c.urlParams_.Set("includeLabels", includeLabels) + return c +} + // IncludePermissionsForView sets the optional parameter // "includePermissionsForView": Specifies which additional view's // permissions to include in the response. Only 'published' is @@ -8228,6 +9005,11 @@ func (c *FilesWatchCall) Do(opts ...googleapi.CallOption) (*Channel, error) { // "required": true, // "type": "string" // }, + // "includeLabels": { + // "description": "A comma-separated list of IDs of labels to include in the labelInfo part of the response.", + // "location": "query", + // "type": "string" + // }, // "includePermissionsForView": { // "description": "Specifies which additional view's permissions to include in the response. Only 'published' is supported.", // "location": "query", diff --git a/memcache/v1beta2/memcache-api.json b/memcache/v1beta2/memcache-api.json index 168314c78ad..fba10017bfb 100644 --- a/memcache/v1beta2/memcache-api.json +++ b/memcache/v1beta2/memcache-api.json @@ -584,7 +584,7 @@ } } }, - "revision": "20220419", + "revision": "20220709", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -814,7 +814,7 @@ "additionalProperties": { "type": "string" }, - "description": "Deprecated. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug.", + "description": "Optional. Deprecated. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug.", "type": "object" }, "maintenanceSchedules": { @@ -954,7 +954,7 @@ "additionalProperties": { "$ref": "MaintenancePolicy" }, - "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the embedded policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the name is needed (like in the deprecated Instance.maintenance_policy_names field) then only populate MaintenancePolicy.name.", + "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the embedded policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the name is needed, then only populate MaintenancePolicy.name.", "type": "object" } }, diff --git a/memcache/v1beta2/memcache-gen.go b/memcache/v1beta2/memcache-gen.go index 8415362dafe..10c4cfdcadd 100644 --- a/memcache/v1beta2/memcache-gen.go +++ b/memcache/v1beta2/memcache-gen.go @@ -545,9 +545,9 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // value are arbitrary strings provided by the user. Labels map[string]string `json:"labels,omitempty"` - // MaintenancePolicyNames: Deprecated. The MaintenancePolicies that have - // been attached to the instance. The key must be of the type name of - // the oneof policy name defined in MaintenancePolicy, and the + // MaintenancePolicyNames: Optional. Deprecated. The MaintenancePolicies + // that have been attached to the instance. The key must be of the type + // name of the oneof policy name defined in MaintenancePolicy, and the // referenced policy must define the same policy type. For complete // details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"` @@ -718,9 +718,7 @@ type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings struct { // oneof policy name defined in MaintenancePolicy, and the embedded // policy must define the same policy type. For complete details of // MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the - // name is needed (like in the deprecated - // Instance.maintenance_policy_names field) then only populate - // MaintenancePolicy.name. + // name is needed, then only populate MaintenancePolicy.name. MaintenancePolicies map[string]MaintenancePolicy `json:"maintenancePolicies,omitempty"` // ForceSendFields is a list of field names (e.g. "Exclude") to diff --git a/ondemandscanning/v1/ondemandscanning-api.json b/ondemandscanning/v1/ondemandscanning-api.json index c0802a7da75..784d9ee4dca 100644 --- a/ondemandscanning/v1/ondemandscanning-api.json +++ b/ondemandscanning/v1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20220612", + "revision": "20220711", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -369,6 +369,19 @@ }, "type": "object" }, + "AnalysisCompleted": { + "description": "Indicates which analysis completed successfully. Multiple types of analysis can be performed on a single resource.", + "id": "AnalysisCompleted", + "properties": { + "analysisType": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AnalyzePackagesMetadata": { "description": "AnalyzePackagesMetadata contains metadata for an active scan of a container image.", "id": "AnalyzePackagesMetadata", @@ -927,6 +940,16 @@ "description": "Provides information about the analysis status of a discovered resource.", "id": "DiscoveryOccurrence", "properties": { + "analysisCompleted": { + "$ref": "AnalysisCompleted" + }, + "analysisError": { + "description": "Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.", + "items": { + "$ref": "Status" + }, + "type": "array" + }, "analysisStatus": { "description": "The status of discovery for the resource.", "enum": [ @@ -934,6 +957,7 @@ "PENDING", "SCANNING", "FINISHED_SUCCESS", + "COMPLETE", "FINISHED_FAILED", "FINISHED_UNSUPPORTED" ], @@ -942,8 +966,9 @@ "Resource is known but no action has been taken yet.", "Resource is being analyzed.", "Analysis has finished successfully.", + "Analysis has completed", "Analysis has finished unsuccessfully, the analysis itself is in a bad state.", - "The resource is known not to be supported" + "The resource is known not to be supported." ], "type": "string" }, diff --git a/ondemandscanning/v1/ondemandscanning-gen.go b/ondemandscanning/v1/ondemandscanning-gen.go index 99042b0d664..30c5ac6218c 100644 --- a/ondemandscanning/v1/ondemandscanning-gen.go +++ b/ondemandscanning/v1/ondemandscanning-gen.go @@ -232,6 +232,34 @@ func (s *AliasContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AnalysisCompleted: Indicates which analysis completed successfully. +// Multiple types of analysis can be performed on a single resource. +type AnalysisCompleted struct { + AnalysisType []string `json:"analysisType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnalysisType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnalysisType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AnalysisCompleted) MarshalJSON() ([]byte, error) { + type NoMethod AnalysisCompleted + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AnalyzePackagesMetadata: AnalyzePackagesMetadata contains metadata // for an active scan of a container image. type AnalyzePackagesMetadata struct { @@ -1033,6 +1061,12 @@ func (s *DeploymentOccurrence) MarshalJSON() ([]byte, error) { // DiscoveryOccurrence: Provides information about the analysis status // of a discovered resource. type DiscoveryOccurrence struct { + AnalysisCompleted *AnalysisCompleted `json:"analysisCompleted,omitempty"` + + // AnalysisError: Indicates any errors encountered during analysis of a + // resource. There could be 0 or more of these errors. + AnalysisError []*Status `json:"analysisError,omitempty"` + // AnalysisStatus: The status of discovery for the resource. // // Possible values: @@ -1040,9 +1074,10 @@ type DiscoveryOccurrence struct { // "PENDING" - Resource is known but no action has been taken yet. // "SCANNING" - Resource is being analyzed. // "FINISHED_SUCCESS" - Analysis has finished successfully. + // "COMPLETE" - Analysis has completed // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the // analysis itself is in a bad state. - // "FINISHED_UNSUPPORTED" - The resource is known not to be supported + // "FINISHED_UNSUPPORTED" - The resource is known not to be supported. AnalysisStatus string `json:"analysisStatus,omitempty"` // AnalysisStatusError: When an error is encountered this will contain a @@ -1068,15 +1103,15 @@ type DiscoveryOccurrence struct { // LastScanTime: The last time this resource was scanned. LastScanTime string `json:"lastScanTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnalysisStatus") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AnalysisCompleted") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnalysisStatus") to + // NullFields is a list of field names (e.g. "AnalysisCompleted") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/ondemandscanning/v1beta1/ondemandscanning-api.json b/ondemandscanning/v1beta1/ondemandscanning-api.json index 4f1a0f39f7d..6208752485f 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-api.json +++ b/ondemandscanning/v1beta1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20220612", + "revision": "20220711", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -369,6 +369,19 @@ }, "type": "object" }, + "AnalysisCompleted": { + "description": "Indicates which analysis completed successfully. Multiple types of analysis can be performed on a single resource.", + "id": "AnalysisCompleted", + "properties": { + "analysisType": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "AnalyzePackagesMetadata": { "description": "AnalyzePackagesMetadata contains metadata for an active scan of a container image.", "id": "AnalyzePackagesMetadata", @@ -923,6 +936,16 @@ "description": "Provides information about the analysis status of a discovered resource.", "id": "DiscoveryOccurrence", "properties": { + "analysisCompleted": { + "$ref": "AnalysisCompleted" + }, + "analysisError": { + "description": "Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.", + "items": { + "$ref": "Status" + }, + "type": "array" + }, "analysisStatus": { "description": "The status of discovery for the resource.", "enum": [ @@ -930,6 +953,7 @@ "PENDING", "SCANNING", "FINISHED_SUCCESS", + "COMPLETE", "FINISHED_FAILED", "FINISHED_UNSUPPORTED" ], @@ -938,8 +962,9 @@ "Resource is known but no action has been taken yet.", "Resource is being analyzed.", "Analysis has finished successfully.", + "Analysis has completed", "Analysis has finished unsuccessfully, the analysis itself is in a bad state.", - "The resource is known not to be supported" + "The resource is known not to be supported." ], "type": "string" }, diff --git a/ondemandscanning/v1beta1/ondemandscanning-gen.go b/ondemandscanning/v1beta1/ondemandscanning-gen.go index 384d55ca72d..f71aaaf0e3b 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-gen.go +++ b/ondemandscanning/v1beta1/ondemandscanning-gen.go @@ -232,6 +232,34 @@ func (s *AliasContext) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AnalysisCompleted: Indicates which analysis completed successfully. +// Multiple types of analysis can be performed on a single resource. +type AnalysisCompleted struct { + AnalysisType []string `json:"analysisType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnalysisType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnalysisType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AnalysisCompleted) MarshalJSON() ([]byte, error) { + type NoMethod AnalysisCompleted + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AnalyzePackagesMetadata: AnalyzePackagesMetadata contains metadata // for an active scan of a container image. type AnalyzePackagesMetadata struct { @@ -1027,6 +1055,12 @@ func (s *DeploymentOccurrence) MarshalJSON() ([]byte, error) { // DiscoveryOccurrence: Provides information about the analysis status // of a discovered resource. type DiscoveryOccurrence struct { + AnalysisCompleted *AnalysisCompleted `json:"analysisCompleted,omitempty"` + + // AnalysisError: Indicates any errors encountered during analysis of a + // resource. There could be 0 or more of these errors. + AnalysisError []*Status `json:"analysisError,omitempty"` + // AnalysisStatus: The status of discovery for the resource. // // Possible values: @@ -1034,9 +1068,10 @@ type DiscoveryOccurrence struct { // "PENDING" - Resource is known but no action has been taken yet. // "SCANNING" - Resource is being analyzed. // "FINISHED_SUCCESS" - Analysis has finished successfully. + // "COMPLETE" - Analysis has completed // "FINISHED_FAILED" - Analysis has finished unsuccessfully, the // analysis itself is in a bad state. - // "FINISHED_UNSUPPORTED" - The resource is known not to be supported + // "FINISHED_UNSUPPORTED" - The resource is known not to be supported. AnalysisStatus string `json:"analysisStatus,omitempty"` // AnalysisStatusError: When an error is encountered this will contain a @@ -1062,15 +1097,15 @@ type DiscoveryOccurrence struct { // LastScanTime: The last time this resource was scanned. LastScanTime string `json:"lastScanTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnalysisStatus") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AnalysisCompleted") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnalysisStatus") to + // NullFields is a list of field names (e.g. "AnalysisCompleted") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index cd6d969dac8..b12588abd8f 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -1193,7 +1193,7 @@ } } }, - "revision": "20220630", + "revision": "20220707", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -1994,7 +1994,7 @@ "type": "integer" }, "pageToken": { - "description": "The previous PredictResponse.next_page_token.", + "description": "This field is not used for now, please leave it unset.", "type": "string" }, "params": { diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 29034e52b4b..0771be5ec8d 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -1936,7 +1936,7 @@ type GoogleCloudRetailV2PredictRequest struct { // is 100. Values above 100 will be coerced to 100. PageSize int64 `json:"pageSize,omitempty"` - // PageToken: The previous PredictResponse.next_page_token. + // PageToken: This field is not used for now, please leave it unset. PageToken string `json:"pageToken,omitempty"` // Params: Additional domain specific parameters for the predictions. diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 6862c98495e..56a4238210f 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -1803,7 +1803,7 @@ } } }, - "revision": "20220630", + "revision": "20220707", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2397,7 +2397,7 @@ "type": "string" }, "inUse": { - "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only CatalogAttributes that are not in use by products can be deleted. CatalogAttributes that are in use by products cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", + "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded CatalogAttributes that are neither in use by products nor predefined can be deleted. CatalogAttributes that are either in use by products or are predefined cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", "readOnly": true, "type": "boolean" }, @@ -3277,7 +3277,7 @@ "type": "integer" }, "pageToken": { - "description": "The previous PredictResponse.next_page_token.", + "description": "This field is not used for now, please leave it unset.", "type": "string" }, "params": { diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 7fcdcb70990..b8025f712c4 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -1429,9 +1429,10 @@ type GoogleCloudRetailV2alphaCatalogAttribute struct { // CatalogService.AddCatalogAttribute, // CatalogService.ImportCatalogAttributes, or // CatalogService.UpdateAttributesConfig APIs. This field is `False` for - // pre-loaded CatalogAttributes. Only CatalogAttributes that are not in - // use by products can be deleted. CatalogAttributes that are in use by - // products cannot be deleted; however, their configuration properties + // pre-loaded CatalogAttributes. Only pre-loaded CatalogAttributes that + // are neither in use by products nor predefined can be deleted. + // CatalogAttributes that are either in use by products or are + // predefined cannot be deleted; however, their configuration properties // will reset to default values upon removal request. After catalog // changes, it takes about 10 minutes for this field to update. InUse bool `json:"inUse,omitempty"` @@ -3169,7 +3170,7 @@ type GoogleCloudRetailV2alphaPredictRequest struct { // is 100. Values above 100 will be coerced to 100. PageSize int64 `json:"pageSize,omitempty"` - // PageToken: The previous PredictResponse.next_page_token. + // PageToken: This field is not used for now, please leave it unset. PageToken string `json:"pageToken,omitempty"` // Params: Additional domain specific parameters for the predictions. diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 3d7cda40131..9ce63cd6ba3 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -1770,7 +1770,7 @@ } } }, - "revision": "20220630", + "revision": "20220707", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2687,7 +2687,7 @@ "type": "string" }, "inUse": { - "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only CatalogAttributes that are not in use by products can be deleted. CatalogAttributes that are in use by products cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", + "description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded CatalogAttributes that are neither in use by products nor predefined can be deleted. CatalogAttributes that are either in use by products or are predefined cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", "readOnly": true, "type": "boolean" }, @@ -3558,7 +3558,7 @@ "type": "integer" }, "pageToken": { - "description": "The previous PredictResponse.next_page_token.", + "description": "This field is not used for now, please leave it unset.", "type": "string" }, "params": { diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 4fa1997f91d..d47e6ab5bdb 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -2019,9 +2019,10 @@ type GoogleCloudRetailV2betaCatalogAttribute struct { // CatalogService.AddCatalogAttribute, // CatalogService.ImportCatalogAttributes, or // CatalogService.UpdateAttributesConfig APIs. This field is `False` for - // pre-loaded CatalogAttributes. Only CatalogAttributes that are not in - // use by products can be deleted. CatalogAttributes that are in use by - // products cannot be deleted; however, their configuration properties + // pre-loaded CatalogAttributes. Only pre-loaded CatalogAttributes that + // are neither in use by products nor predefined can be deleted. + // CatalogAttributes that are either in use by products or are + // predefined cannot be deleted; however, their configuration properties // will reset to default values upon removal request. After catalog // changes, it takes about 10 minutes for this field to update. InUse bool `json:"inUse,omitempty"` @@ -3744,7 +3745,7 @@ type GoogleCloudRetailV2betaPredictRequest struct { // is 100. Values above 100 will be coerced to 100. PageSize int64 `json:"pageSize,omitempty"` - // PageToken: The previous PredictResponse.next_page_token. + // PageToken: This field is not used for now, please leave it unset. PageToken string `json:"pageToken,omitempty"` // Params: Additional domain specific parameters for the predictions. diff --git a/run/v1/run-api.json b/run/v1/run-api.json index 1408dde5fc3..226e2ca9e92 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -2261,7 +2261,7 @@ } } }, - "revision": "20220617", + "revision": "20220710", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -3986,7 +3986,7 @@ "id": "SecretVolumeSource", "properties": { "defaultMode": { - "description": "Integer representation of mode bits to use on created files by default. Must be a value between 01 and 0777 (octal). If 0 or not set, it will default to 0644. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "description": "Integer representation of mode bits to use on created files by default. Must be a value between 01 and 0777 (octal). If 0 or not set, it will default to 0444. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", "format": "int32", "type": "integer" }, diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index 313e2021f8f..18a79e478f4 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -3576,7 +3576,7 @@ func (s *SecretKeySelector) MarshalJSON() ([]byte, error) { type SecretVolumeSource struct { // DefaultMode: Integer representation of mode bits to use on created // files by default. Must be a value between 01 and 0777 (octal). If 0 - // or not set, it will default to 0644. Directories within the path are + // or not set, it will default to 0444. Directories within the path are // not affected by this setting. Notes * Internally, a umask of 0222 // will be applied to any non-zero value. * This is an integer // representation of the mode bits. So, the octal integer value should diff --git a/run/v2/run-api.json b/run/v2/run-api.json index 3225cdb48b2..fb137c514e4 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1064,7 +1064,7 @@ } } }, - "revision": "20220603", + "revision": "20220710", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -1105,12 +1105,14 @@ "enum": [ "EXECUTION_REASON_UNDEFINED", "JOB_STATUS_SERVICE_POLLING_ERROR", - "NON_ZERO_EXIT_CODE" + "NON_ZERO_EXIT_CODE", + "CANCELLED" ], "enumDescriptions": [ "Default value.", "Internal system error getting execution status. System will retry.", - "A task reached its retry limit and the last attempt failed due to the user container exiting with a non-zero exit code." + "A task reached its retry limit and the last attempt failed due to the user container exiting with a non-zero exit code.", + "The execution was cancelled by users." ], "type": "string" }, @@ -1284,6 +1286,10 @@ "$ref": "GoogleCloudRunV2VolumeMount" }, "type": "array" + }, + "workingDir": { + "description": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.", + "type": "string" } }, "type": "object" @@ -2113,7 +2119,7 @@ "id": "GoogleCloudRunV2SecretVolumeSource", "properties": { "defaultMode": { - "description": "Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0644. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. This might be in conflict with other options that affect the file mode, like fsGroup, and as a result, other mode bits could be set.", + "description": "Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. This might be in conflict with other options that affect the file mode, like fsGroup, and as a result, other mode bits could be set.", "format": "int32", "type": "integer" }, diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index a86616adf91..85eb0a2c3bf 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -313,6 +313,7 @@ type GoogleCloudRunV2Condition struct { // "NON_ZERO_EXIT_CODE" - A task reached its retry limit and the last // attempt failed due to the user container exiting with a non-zero exit // code. + // "CANCELLED" - The execution was cancelled by users. ExecutionReason string `json:"executionReason,omitempty"` // LastTransitionTime: Last time the condition transitioned from one @@ -485,6 +486,11 @@ type GoogleCloudRunV2Container struct { // VolumeMounts: Volume to mount into the container's filesystem. VolumeMounts []*GoogleCloudRunV2VolumeMount `json:"volumeMounts,omitempty"` + // WorkingDir: Container's working directory. If not specified, the + // container runtime's default will be used, which might be configured + // in the container image. + WorkingDir string `json:"workingDir,omitempty"` + // ForceSendFields is a list of field names (e.g. "Args") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -1666,7 +1672,7 @@ func (s *GoogleCloudRunV2SecretKeySelector) MarshalJSON() ([]byte, error) { type GoogleCloudRunV2SecretVolumeSource struct { // DefaultMode: Integer representation of mode bits to use on created // files by default. Must be a value between 0000 and 0777 (octal), - // defaulting to 0644. Directories within the path are not affected by + // defaulting to 0444. Directories within the path are not affected by // this setting. Notes * Internally, a umask of 0222 will be applied to // any non-zero value. * This is an integer representation of the mode // bits. So, the octal integer value should look exactly as the chmod From 948b3c3e99a73c29ee4d51546704ebbaa3cd24ad Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 15 Jul 2022 06:53:13 -0700 Subject: [PATCH 3/6] feat(all): auto-regenerate discovery clients (#1620) --- bigtableadmin/v2/bigtableadmin-api.json | 7 +- bigtableadmin/v2/bigtableadmin-gen.go | 3 + dlp/v2/dlp-api.json | 6 +- dlp/v2/dlp-gen.go | 23 ++++-- run/v1alpha1/run-api.json | 4 +- run/v1alpha1/run-gen.go | 2 +- webrisk/v1/webrisk-api.json | 26 +++---- webrisk/v1/webrisk-gen.go | 36 ++++----- youtube/v3/youtube-api.json | 44 +---------- youtube/v3/youtube-gen.go | 97 +++---------------------- 10 files changed, 76 insertions(+), 172 deletions(-) diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index f3cf8574587..e436bb871c8 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -1892,7 +1892,7 @@ } } }, - "revision": "20220614", + "revision": "20220706", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2629,6 +2629,11 @@ "description": "The unique name of the instance. Values are of the form `projects/{project}/instances/a-z+[a-z0-9]`.", "type": "string" }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "state": { "description": "Output only. The current state of the instance.", "enum": [ diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index 29e9bc185f1..2853f7e1d45 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -1730,6 +1730,9 @@ type Instance struct { // `projects/{project}/instances/a-z+[a-z0-9]`. Name string `json:"name,omitempty"` + // SatisfiesPzs: Output only. Reserved for future use. + SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` + // State: Output only. The current state of the instance. // // Possible values: diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 0006cd785ea..561fc4763cf 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -3412,7 +3412,7 @@ } } }, - "revision": "20220612", + "revision": "20220708", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -5252,7 +5252,7 @@ }, "proximity": { "$ref": "GooglePrivacyDlpV2Proximity", - "description": "Proximity of the finding within which the entire hotword must reside. The total length of the window cannot exceed 1000 characters. Note that the finding itself will be included in the window, so that hotwords may be used to match substrings of the finding itself. For example, the certainty of a phone number regex \"\\(\\d{3}\\) \\d{3}-\\d{4}\" could be adjusted upwards if the area code is known to be the local area code of a company office using the hotword regex \"\\(xxx\\)\", where \"xxx\" is the area code in question." + "description": "Range of characters within which the entire hotword must reside. The total length of the window cannot exceed 1000 characters. The finding itself will be included in the window, so that hotwords can be used to match substrings of the finding itself. Suppose you want Cloud DLP to promote the likelihood of the phone number regex \"\\(\\d{3}\\) \\d{3}-\\d{4}\" if the area code is known to be the area code of a company's office. In this case, use the hotword regex \"\\(xxx\\)\", where \"xxx\" is the area code in question. For tabular data, if you want to modify the likelihood of an entire column of findngs, see [Hotword example: Set the match likelihood of a table column] (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values)." } }, "type": "object" @@ -6784,7 +6784,7 @@ "type": "integer" }, "windowBefore": { - "description": "Number of characters before the finding to consider.", + "description": "Number of characters before the finding to consider. For tabular data, if you want to modify the likelihood of an entire column of findngs, set this to 1. For more information, see [Hotword example: Set the match likelihood of a table column] (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).", "format": "int32", "type": "integer" } diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index f7a1bbc44de..8ed816b5810 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -3833,14 +3833,17 @@ type GooglePrivacyDlpV2HotwordRule struct { // findings. LikelihoodAdjustment *GooglePrivacyDlpV2LikelihoodAdjustment `json:"likelihoodAdjustment,omitempty"` - // Proximity: Proximity of the finding within which the entire hotword - // must reside. The total length of the window cannot exceed 1000 - // characters. Note that the finding itself will be included in the - // window, so that hotwords may be used to match substrings of the - // finding itself. For example, the certainty of a phone number regex - // "\(\d{3}\) \d{3}-\d{4}" could be adjusted upwards if the area code is - // known to be the local area code of a company office using the hotword - // regex "\(xxx\)", where "xxx" is the area code in question. + // Proximity: Range of characters within which the entire hotword must + // reside. The total length of the window cannot exceed 1000 characters. + // The finding itself will be included in the window, so that hotwords + // can be used to match substrings of the finding itself. Suppose you + // want Cloud DLP to promote the likelihood of the phone number regex + // "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the area code + // of a company's office. In this case, use the hotword regex "\(xxx\)", + // where "xxx" is the area code in question. For tabular data, if you + // want to modify the likelihood of an entire column of findngs, see + // [Hotword example: Set the match likelihood of a table column] + // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). Proximity *GooglePrivacyDlpV2Proximity `json:"proximity,omitempty"` // ForceSendFields is a list of field names (e.g. "HotwordRegex") to @@ -6452,6 +6455,10 @@ type GooglePrivacyDlpV2Proximity struct { WindowAfter int64 `json:"windowAfter,omitempty"` // WindowBefore: Number of characters before the finding to consider. + // For tabular data, if you want to modify the likelihood of an entire + // column of findngs, set this to 1. For more information, see [Hotword + // example: Set the match likelihood of a table column] + // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values). WindowBefore int64 `json:"windowBefore,omitempty"` // ForceSendFields is a list of field names (e.g. "WindowAfter") to diff --git a/run/v1alpha1/run-api.json b/run/v1alpha1/run-api.json index 9b388fc0f6a..ed784d1e3af 100644 --- a/run/v1alpha1/run-api.json +++ b/run/v1alpha1/run-api.json @@ -268,7 +268,7 @@ } } }, - "revision": "20220617", + "revision": "20220710", "rootUrl": "https://run.googleapis.com/", "schemas": { "ConfigMapEnvSource": { @@ -1188,7 +1188,7 @@ "id": "SecretVolumeSource", "properties": { "defaultMode": { - "description": "Integer representation of mode bits to use on created files by default. Must be a value between 01 and 0777 (octal). If 0 or not set, it will default to 0644. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "description": "Integer representation of mode bits to use on created files by default. Must be a value between 01 and 0777 (octal). If 0 or not set, it will default to 0444. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", "format": "int32", "type": "integer" }, diff --git a/run/v1alpha1/run-gen.go b/run/v1alpha1/run-gen.go index e0fb4bc5c33..ea57c1bead1 100644 --- a/run/v1alpha1/run-gen.go +++ b/run/v1alpha1/run-gen.go @@ -1848,7 +1848,7 @@ func (s *SecretKeySelector) MarshalJSON() ([]byte, error) { type SecretVolumeSource struct { // DefaultMode: Integer representation of mode bits to use on created // files by default. Must be a value between 01 and 0777 (octal). If 0 - // or not set, it will default to 0644. Directories within the path are + // or not set, it will default to 0444. Directories within the path are // not affected by this setting. Notes * Internally, a umask of 0222 // will be applied to any non-zero value. * This is an integer // representation of the mode bits. So, the octal integer value should diff --git a/webrisk/v1/webrisk-api.json b/webrisk/v1/webrisk-api.json index 57b46558648..bddb1b507ed 100644 --- a/webrisk/v1/webrisk-api.json +++ b/webrisk/v1/webrisk-api.json @@ -127,14 +127,14 @@ "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", - "HIGH_RECALL" + "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" ], "enumDescriptions": [ "No entries should match this threat type. This threat type is unused.", "Malware targeting any platform.", "Social engineering targeting any platform.", "Unwanted software targeting any platform.", - "High Recall Social Engineering list targeting any platform." + "Extended Coverage Social Engineering list targeting any platform." ], "location": "query", "repeated": true, @@ -377,14 +377,14 @@ "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", - "HIGH_RECALL" + "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" ], "enumDescriptions": [ "No entries should match this threat type. This threat type is unused.", "Malware targeting any platform.", "Social engineering targeting any platform.", "Unwanted software targeting any platform.", - "High Recall Social Engineering list targeting any platform." + "Extended Coverage Social Engineering list targeting any platform." ], "location": "query", "type": "string" @@ -422,14 +422,14 @@ "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", - "HIGH_RECALL" + "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" ], "enumDescriptions": [ "No entries should match this threat type. This threat type is unused.", "Malware targeting any platform.", "Social engineering targeting any platform.", "Unwanted software targeting any platform.", - "High Recall Social Engineering list targeting any platform." + "Extended Coverage Social Engineering list targeting any platform." ], "location": "query", "repeated": true, @@ -452,7 +452,7 @@ } } }, - "revision": "20220625", + "revision": "20220708", "rootUrl": "https://webrisk.googleapis.com/", "schemas": { "GoogleCloudWebriskV1ComputeThreatListDiffResponse": { @@ -608,14 +608,14 @@ "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", - "HIGH_RECALL" + "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" ], "enumDescriptions": [ "No entries should match this threat type. This threat type is unused.", "Malware targeting any platform.", "Social engineering targeting any platform.", "Unwanted software targeting any platform.", - "High Recall Social Engineering list targeting any platform." + "Extended Coverage Social Engineering list targeting any platform." ], "type": "string" }, @@ -651,14 +651,14 @@ "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", - "HIGH_RECALL" + "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" ], "enumDescriptions": [ "No entries should match this threat type. This threat type is unused.", "Malware targeting any platform.", "Social engineering targeting any platform.", "Unwanted software targeting any platform.", - "High Recall Social Engineering list targeting any platform." + "Extended Coverage Social Engineering list targeting any platform." ], "type": "string" }, @@ -679,14 +679,14 @@ "MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", - "HIGH_RECALL" + "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" ], "enumDescriptions": [ "No entries should match this threat type. This threat type is unused.", "Malware targeting any platform.", "Social engineering targeting any platform.", "Unwanted software targeting any platform.", - "High Recall Social Engineering list targeting any platform." + "Extended Coverage Social Engineering list targeting any platform." ], "type": "string" }, diff --git a/webrisk/v1/webrisk-gen.go b/webrisk/v1/webrisk-gen.go index e05b0ef76c5..0eff0005216 100644 --- a/webrisk/v1/webrisk-gen.go +++ b/webrisk/v1/webrisk-gen.go @@ -489,8 +489,8 @@ type GoogleCloudWebriskV1SearchHashesResponseThreatHash struct { // "MALWARE" - Malware targeting any platform. // "SOCIAL_ENGINEERING" - Social engineering targeting any platform. // "UNWANTED_SOFTWARE" - Unwanted software targeting any platform. - // "HIGH_RECALL" - High Recall Social Engineering list targeting any - // platform. + // "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" - Extended Coverage Social + // Engineering list targeting any platform. ThreatTypes []string `json:"threatTypes,omitempty"` // ForceSendFields is a list of field names (e.g. "ExpireTime") to @@ -563,8 +563,8 @@ type GoogleCloudWebriskV1SearchUrisResponseThreatUri struct { // "MALWARE" - Malware targeting any platform. // "SOCIAL_ENGINEERING" - Social engineering targeting any platform. // "UNWANTED_SOFTWARE" - Unwanted software targeting any platform. - // "HIGH_RECALL" - High Recall Social Engineering list targeting any - // platform. + // "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" - Extended Coverage Social + // Engineering list targeting any platform. ThreatTypes []string `json:"threatTypes,omitempty"` // ForceSendFields is a list of field names (e.g. "ExpireTime") to @@ -603,8 +603,8 @@ type GoogleCloudWebriskV1Submission struct { // "MALWARE" - Malware targeting any platform. // "SOCIAL_ENGINEERING" - Social engineering targeting any platform. // "UNWANTED_SOFTWARE" - Unwanted software targeting any platform. - // "HIGH_RECALL" - High Recall Social Engineering list targeting any - // platform. + // "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" - Extended Coverage Social + // Engineering list targeting any platform. ThreatTypes []string `json:"threatTypes,omitempty"` // Uri: Required. The URI that is being reported for malicious content @@ -980,8 +980,8 @@ func (c *HashesSearchCall) HashPrefix(hashPrefix string) *HashesSearchCall { // "MALWARE" - Malware targeting any platform. // "SOCIAL_ENGINEERING" - Social engineering targeting any platform. // "UNWANTED_SOFTWARE" - Unwanted software targeting any platform. -// "HIGH_RECALL" - High Recall Social Engineering list targeting any -// platform. +// "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" - Extended Coverage Social +// Engineering list targeting any platform. func (c *HashesSearchCall) ThreatTypes(threatTypes ...string) *HashesSearchCall { c.urlParams_.SetMulti("threatTypes", append([]string{}, threatTypes...)) return c @@ -1104,14 +1104,14 @@ func (c *HashesSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudWebrisk // "MALWARE", // "SOCIAL_ENGINEERING", // "UNWANTED_SOFTWARE", - // "HIGH_RECALL" + // "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" // ], // "enumDescriptions": [ // "No entries should match this threat type. This threat type is unused.", // "Malware targeting any platform.", // "Social engineering targeting any platform.", // "Unwanted software targeting any platform.", - // "High Recall Social Engineering list targeting any platform." + // "Extended Coverage Social Engineering list targeting any platform." // ], // "location": "query", // "repeated": true, @@ -2137,8 +2137,8 @@ func (c *ThreatListsComputeDiffCall) ConstraintsSupportedCompressions(constraint // "MALWARE" - Malware targeting any platform. // "SOCIAL_ENGINEERING" - Social engineering targeting any platform. // "UNWANTED_SOFTWARE" - Unwanted software targeting any platform. -// "HIGH_RECALL" - High Recall Social Engineering list targeting any -// platform. +// "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" - Extended Coverage Social +// Engineering list targeting any platform. func (c *ThreatListsComputeDiffCall) ThreatType(threatType string) *ThreatListsComputeDiffCall { c.urlParams_.Set("threatType", threatType) return c @@ -2294,14 +2294,14 @@ func (c *ThreatListsComputeDiffCall) Do(opts ...googleapi.CallOption) (*GoogleCl // "MALWARE", // "SOCIAL_ENGINEERING", // "UNWANTED_SOFTWARE", - // "HIGH_RECALL" + // "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" // ], // "enumDescriptions": [ // "No entries should match this threat type. This threat type is unused.", // "Malware targeting any platform.", // "Social engineering targeting any platform.", // "Unwanted software targeting any platform.", - // "High Recall Social Engineering list targeting any platform." + // "Extended Coverage Social Engineering list targeting any platform." // ], // "location": "query", // "type": "string" @@ -2353,8 +2353,8 @@ func (r *UrisService) Search() *UrisSearchCall { // "MALWARE" - Malware targeting any platform. // "SOCIAL_ENGINEERING" - Social engineering targeting any platform. // "UNWANTED_SOFTWARE" - Unwanted software targeting any platform. -// "HIGH_RECALL" - High Recall Social Engineering list targeting any -// platform. +// "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" - Extended Coverage Social +// Engineering list targeting any platform. func (c *UrisSearchCall) ThreatTypes(threatTypes ...string) *UrisSearchCall { c.urlParams_.SetMulti("threatTypes", append([]string{}, threatTypes...)) return c @@ -2477,14 +2477,14 @@ func (c *UrisSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudWebriskV1 // "MALWARE", // "SOCIAL_ENGINEERING", // "UNWANTED_SOFTWARE", - // "HIGH_RECALL" + // "SOCIAL_ENGINEERING_EXTENDED_COVERAGE" // ], // "enumDescriptions": [ // "No entries should match this threat type. This threat type is unused.", // "Malware targeting any platform.", // "Social engineering targeting any platform.", // "Unwanted software targeting any platform.", - // "High Recall Social Engineering list targeting any platform." + // "Extended Coverage Social Engineering list targeting any platform." // ], // "location": "query", // "repeated": true, diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index ab3b0a80835..5200a051713 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -1406,48 +1406,12 @@ "location": "query", "repeated": true, "type": "string" - }, - "resource.cueType": { - "enum": [ - "cueTypeUnspecified", - "cueTypeAd" - ], - "enumDescriptions": [ - "", - "" - ], - "location": "query", - "type": "string" - }, - "resource.durationSecs": { - "description": "The duration of this cuepoint.", - "format": "uint32", - "location": "query", - "type": "integer" - }, - "resource.etag": { - "location": "query", - "type": "string" - }, - "resource.id": { - "description": "The identifier for cuepoint resource.", - "location": "query", - "type": "string" - }, - "resource.insertionOffsetTimeMs": { - "description": "The time when the cuepoint should be inserted by offset to the broadcast actual start time.", - "format": "int64", - "location": "query", - "type": "string" - }, - "resource.walltimeMs": { - "description": "The wall clock time at which the cuepoint should be inserted. Only one of insertion_offset_time_ms and walltime_ms may be set at a time.", - "format": "uint64", - "location": "query", - "type": "string" } }, "path": "youtube/v3/liveBroadcasts/cuepoint", + "request": { + "$ref": "Cuepoint" + }, "response": { "$ref": "Cuepoint" }, @@ -3865,7 +3829,7 @@ } } }, - "revision": "20220711", + "revision": "20220713", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 56fb3e8519a..a4f6b0d8e91 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -15590,14 +15590,16 @@ func (c *LiveBroadcastsInsertCall) Do(opts ...googleapi.CallOption) (*LiveBroadc type LiveBroadcastsInsertCuepointCall struct { s *Service + cuepoint *Cuepoint urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } // InsertCuepoint: Insert cuepoints in a broadcast -func (r *LiveBroadcastsService) InsertCuepoint() *LiveBroadcastsInsertCuepointCall { +func (r *LiveBroadcastsService) InsertCuepoint(cuepoint *Cuepoint) *LiveBroadcastsInsertCuepointCall { c := &LiveBroadcastsInsertCuepointCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.cuepoint = cuepoint return c } @@ -15659,52 +15661,6 @@ func (c *LiveBroadcastsInsertCuepointCall) Part(part ...string) *LiveBroadcastsI return c } -// ResourceCueType sets the optional parameter "resource.cueType": -// -// Possible values: -// "cueTypeUnspecified" -// "cueTypeAd" -func (c *LiveBroadcastsInsertCuepointCall) ResourceCueType(resourceCueType string) *LiveBroadcastsInsertCuepointCall { - c.urlParams_.Set("resource.cueType", resourceCueType) - return c -} - -// ResourceDurationSecs sets the optional parameter -// "resource.durationSecs": The duration of this cuepoint. -func (c *LiveBroadcastsInsertCuepointCall) ResourceDurationSecs(resourceDurationSecs int64) *LiveBroadcastsInsertCuepointCall { - c.urlParams_.Set("resource.durationSecs", fmt.Sprint(resourceDurationSecs)) - return c -} - -// ResourceEtag sets the optional parameter "resource.etag": -func (c *LiveBroadcastsInsertCuepointCall) ResourceEtag(resourceEtag string) *LiveBroadcastsInsertCuepointCall { - c.urlParams_.Set("resource.etag", resourceEtag) - return c -} - -// ResourceId sets the optional parameter "resource.id": The identifier -// for cuepoint resource. -func (c *LiveBroadcastsInsertCuepointCall) ResourceId(resourceId string) *LiveBroadcastsInsertCuepointCall { - c.urlParams_.Set("resource.id", resourceId) - return c -} - -// ResourceInsertionOffsetTimeMs sets the optional parameter -// "resource.insertionOffsetTimeMs": The time when the cuepoint should -// be inserted by offset to the broadcast actual start time. -func (c *LiveBroadcastsInsertCuepointCall) ResourceInsertionOffsetTimeMs(resourceInsertionOffsetTimeMs int64) *LiveBroadcastsInsertCuepointCall { - c.urlParams_.Set("resource.insertionOffsetTimeMs", fmt.Sprint(resourceInsertionOffsetTimeMs)) - return c -} - -// ResourceWalltimeMs sets the optional parameter "resource.walltimeMs": -// The wall clock time at which the cuepoint should be inserted. Only -// one of insertion_offset_time_ms and walltime_ms may be set at a time. -func (c *LiveBroadcastsInsertCuepointCall) ResourceWalltimeMs(resourceWalltimeMs uint64) *LiveBroadcastsInsertCuepointCall { - c.urlParams_.Set("resource.walltimeMs", fmt.Sprint(resourceWalltimeMs)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -15738,6 +15694,11 @@ func (c *LiveBroadcastsInsertCuepointCall) doRequest(alt string) (*http.Response } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.cuepoint) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveBroadcasts/cuepoint") @@ -15814,48 +15775,12 @@ func (c *LiveBroadcastsInsertCuepointCall) Do(opts ...googleapi.CallOption) (*Cu // "location": "query", // "repeated": true, // "type": "string" - // }, - // "resource.cueType": { - // "enum": [ - // "cueTypeUnspecified", - // "cueTypeAd" - // ], - // "enumDescriptions": [ - // "", - // "" - // ], - // "location": "query", - // "type": "string" - // }, - // "resource.durationSecs": { - // "description": "The duration of this cuepoint.", - // "format": "uint32", - // "location": "query", - // "type": "integer" - // }, - // "resource.etag": { - // "location": "query", - // "type": "string" - // }, - // "resource.id": { - // "description": "The identifier for cuepoint resource.", - // "location": "query", - // "type": "string" - // }, - // "resource.insertionOffsetTimeMs": { - // "description": "The time when the cuepoint should be inserted by offset to the broadcast actual start time.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "resource.walltimeMs": { - // "description": "The wall clock time at which the cuepoint should be inserted. Only one of insertion_offset_time_ms and walltime_ms may be set at a time.", - // "format": "uint64", - // "location": "query", - // "type": "string" // } // }, // "path": "youtube/v3/liveBroadcasts/cuepoint", + // "request": { + // "$ref": "Cuepoint" + // }, // "response": { // "$ref": "Cuepoint" // }, From 136bec3f34da77299ca6d30d5a03fa1ca638954e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 18 Jul 2022 06:51:13 -0700 Subject: [PATCH 4/6] feat(all): auto-regenerate discovery clients (#1622) --- api-list.json | 4 +- compute/v0.alpha/compute-api.json | 622 +++++- compute/v0.alpha/compute-gen.go | 1824 ++++++++++++++++- compute/v0.beta/compute-api.json | 14 +- compute/v0.beta/compute-gen.go | 17 +- gkehub/v1alpha/gkehub-api.json | 34 +- gkehub/v1alpha/gkehub-gen.go | 57 +- gkehub/v1beta/gkehub-api.json | 6 +- gkehub/v1beta/gkehub-gen.go | 4 + memcache/v1/memcache-api.json | 6 +- memcache/v1/memcache-gen.go | 10 +- networksecurity/v1/networksecurity-api.json | 10 +- networksecurity/v1/networksecurity-gen.go | 12 +- .../v1beta1/networksecurity-api.json | 10 +- .../v1beta1/networksecurity-gen.go | 12 +- 15 files changed, 2545 insertions(+), 97 deletions(-) diff --git a/api-list.json b/api-list.json index c82666d5afe..eca48c62249 100644 --- a/api-list.json +++ b/api-list.json @@ -3762,7 +3762,7 @@ "name": "networkconnectivity", "version": "v1alpha1", "title": "Network Connectivity API", - "description": "The Network Connectivity API provides access to Network Connectivity Center.", + "description": "This API enables connectivity with and between Google Cloud resources.", "discoveryRestUrl": "https://networkconnectivity.googleapis.com/$discovery/rest?version=v1alpha1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", @@ -3777,7 +3777,7 @@ "name": "networkconnectivity", "version": "v1", "title": "Network Connectivity API", - "description": "The Network Connectivity API provides access to Network Connectivity Center.", + "description": "This API enables connectivity with and between Google Cloud resources.", "discoveryRestUrl": "https://networkconnectivity.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 0d8e3355c9c..f4ed76f7656 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -10789,7 +10789,7 @@ ] }, "bulkInsert": { - "description": "Creates multiple instances. Count specifies the number of instances to create.", + "description": "Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.", "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", "httpMethod": "POST", "id": "compute.instances.bulkInsert", @@ -39258,6 +39258,250 @@ } } }, + "zoneQueuedResources": { + "methods": { + "cancel": { + "description": "Cancels a QueuedResource. Only a resource in ACCEPTED state may be cancelled.", + "flatPath": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}/cancel", + "httpMethod": "POST", + "id": "compute.zoneQueuedResources.cancel", + "parameterOrder": [ + "project", + "zone", + "queuedResource" + ], + "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" + }, + "queuedResource": { + "description": "Name of the QueuedResource to cancel.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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. 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" + }, + "zone": { + "description": "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}/queuedResources/{queuedResource}/cancel", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "description": "Deletes a QueuedResource. For a QueuedResource in ACCEPTED state, call cancel on the resource before deleting, to make sure no VMs have been provisioned and may require cleaning up. For a QueuedResource in PROVISIONING state the request to delete is registered for execution following the provisioning.", + "flatPath": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}", + "httpMethod": "DELETE", + "id": "compute.zoneQueuedResources.delete", + "parameterOrder": [ + "project", + "zone", + "queuedResource" + ], + "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" + }, + "queuedResource": { + "description": "Name of the QueuedResource to delete.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "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. 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" + }, + "zone": { + "description": "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}/queuedResources/{queuedResource}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "Returns the specified QueuedResource resource.", + "flatPath": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}", + "httpMethod": "GET", + "id": "compute.zoneQueuedResources.get", + "parameterOrder": [ + "project", + "zone", + "queuedResource" + ], + "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" + }, + "queuedResource": { + "description": "Name of the QueuedResource resource to return.", + "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": "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}/queuedResources/{queuedResource}", + "response": { + "$ref": "QueuedResource" + }, + "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 QueuedResource.", + "flatPath": "projects/{project}/zones/{zone}/queuedResources", + "httpMethod": "POST", + "id": "compute.zoneQueuedResources.insert", + "parameterOrder": [ + "project", + "zone" + ], + "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" + }, + "requestId": { + "description": "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. 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" + }, + "zone": { + "description": "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}/queuedResources", + "request": { + "$ref": "QueuedResource" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "Retrieves the list of QueuedResource resources.", + "flatPath": "projects/{project}/zones/{zone}/queuedResources", + "httpMethod": "GET", + "id": "compute.zoneQueuedResources.list", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "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" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + "location": "query", + "type": "boolean" + }, + "zone": { + "description": "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}/queuedResources", + "response": { + "$ref": "QueuedResourceList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "zones": { "methods": { "get": { @@ -39353,7 +39597,7 @@ } } }, - "revision": "20220621", + "revision": "20220705", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -40759,6 +41003,13 @@ }, "type": "array" }, + "resourceManagerTags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values are in the format `tagValues/456`. The field is ignored (both PUT \u0026 PATCH) when empty.", + "type": "object" + }, "resourcePolicies": { "description": "Resource policies applied to this disk for automatic snapshot creations. Specified using the full or partial URL. For instance template, specify only the resource policy name.", "items": { @@ -41697,7 +41948,7 @@ "type": "number" }, "maxUtilization": { - "description": "Optional parameter to define a target capacity for the UTILIZATIONbalancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.", + "description": "Optional parameter to define a target capacity for the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.", "format": "float", "type": "number" } @@ -43295,7 +43546,7 @@ }, "locationPolicy": { "$ref": "LocationPolicy", - "description": "Policy for chosing target zone." + "description": "Policy for chosing target zone. For more information, see Create VMs in bulk ." }, "minCount": { "description": "The minimum number of instances to create. If no min_count is specified then count is used as the default value. If min_count instances cannot be created, then no instances will be created and instances already created will be deleted.", @@ -44232,6 +44483,47 @@ }, "type": "object" }, + "CustomErrorResponsePolicy": { + "description": "Specifies the custom error response policy that must be applied when the backend service or backend bucket responds with an error.", + "id": "CustomErrorResponsePolicy", + "properties": { + "errorResponseRules": { + "description": "Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.", + "items": { + "$ref": "CustomErrorResponsePolicyCustomErrorResponseRule" + }, + "type": "array" + }, + "errorService": { + "description": "The full or partial URL to the BackendBucket resource that contains the custom error content. Examples are: - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - compute/v1/projects/project/global/backendBuckets/myBackendBucket - global/backendBuckets/myBackendBucket If errorService is not specified at lower levels like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService. If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). errorService is not supported for internal or regional HTTP/HTTPS load balancers.", + "type": "string" + } + }, + "type": "object" + }, + "CustomErrorResponsePolicyCustomErrorResponseRule": { + "description": "Specifies the mapping between the response code that will be returned along with the custom error content and the response code returned by the backend service.", + "id": "CustomErrorResponsePolicyCustomErrorResponseRule", + "properties": { + "matchResponseCodes": { + "description": "Valid values include: - A number between 400 and 599: For example 401 or 503, in which case the load balancer applies the policy if the error code exactly matches this value. - 5xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 500 to 599. - 4xx: Load Balancer will apply the policy if the backend service responds with any response code in the range of 400 to 499. Values must be unique within matchResponseCodes and across all errorResponseRules of CustomErrorResponsePolicy.", + "items": { + "type": "string" + }, + "type": "array" + }, + "overrideResponseCode": { + "description": "The HTTP status code returned with the response containing the custom error content. If overrideResponseCode is not supplied, the same response code returned by the original backend bucket or backend service is returned to the client.", + "format": "int32", + "type": "integer" + }, + "path": { + "description": "The full path to a file within backendBucket . For example: /errors/defaultError.html path must start with a leading slash. path cannot have trailing slashes. If the file is not available in backendBucket or the load balancer cannot reach the BackendBucket, a simple Not Found Error is returned to the client. The value must be from 1 to 1024 characters", + "type": "string" + } + }, + "type": "object" + }, "CustomerEncryptionKey": { "id": "CustomerEncryptionKey", "properties": { @@ -44452,6 +44744,10 @@ "description": "Internal use only.", "type": "string" }, + "params": { + "$ref": "DiskParams", + "description": "Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload." + }, "physicalBlockSizeBytes": { "description": "Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. The currently supported size is 4096, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project.", "format": "int64", @@ -44929,6 +45225,20 @@ }, "type": "object" }, + "DiskParams": { + "description": "Additional disk params.", + "id": "DiskParams", + "properties": { + "resourceManagerTags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource manager tags to be bound to the disk. Tag keys and values have the same definition as resource manager tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values are in the format `tagValues/456`. The field is ignored (both PUT \u0026 PATCH) when empty.", + "type": "object" + } + }, + "type": "object" + }, "DiskResourceStatus": { "id": "DiskResourceStatus", "properties": { @@ -49967,6 +50277,10 @@ "description": "The HttpRouteRule setting specifies how to match an HTTP request and the corresponding routing action that load balancing proxies perform.", "id": "HttpRouteRule", "properties": { + "customErrorResponsePolicy": { + "$ref": "CustomErrorResponsePolicy", + "description": "customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the RouteRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with routeRules.routeAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the customErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the customErrorResponsePolicy is ignored and the response from the service is returned to the client. customErrorResponsePolicy is supported only for Global External HTTP(S) load balancing." + }, "description": { "description": "The short description conveying the intent of this routeRule. The description can have a maximum length of 1024 characters.", "type": "string" @@ -57355,7 +57669,7 @@ "description": "Constraints that the caller requires on the result distribution in this zone." }, "preference": { - "description": "Preference for a given location.", + "description": "Preference for a given location. Set to either ALLOW or DENY.", "enum": [ "ALLOW", "DENY", @@ -63575,6 +63889,10 @@ "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default service is used.", "id": "PathMatcher", "properties": { + "defaultCustomErrorResponsePolicy": { + "$ref": "CustomErrorResponsePolicy", + "description": "defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. This policy takes effect at the PathMatcher level and applies only when no policy has been defined for the error code at lower levels like RouteRule and PathRule within this PathMatcher. If an error code does not have a policy defined in defaultCustomErrorResponsePolicy, then a policy defined for the error code in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy is configured with policies for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in RouteRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client. defaultCustomErrorResponsePolicy is supported only for Global External HTTP(S) load balancing." + }, "defaultRouteAction": { "$ref": "HttpRouteAction", "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within a path matcher's defaultRouteAction." @@ -63620,6 +63938,10 @@ "description": "A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.", "id": "PathRule", "properties": { + "customErrorResponsePolicy": { + "$ref": "CustomErrorResponsePolicy", + "description": "customErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. If a policy for an error code is not configured for the PathRule, a policy for the error code configured in pathMatcher.defaultCustomErrorResponsePolicy is applied. If one is not specified in pathMatcher.defaultCustomErrorResponsePolicy, the policy configured in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, consider a UrlMap with the following configuration: - UrlMap.defaultCustomErrorResponsePolicy are configured with policies for 5xx and 4xx errors - A PathRule for /coming_soon/ is configured for the error code 404. If the request is for www.myotherdomain.com and a 404 is encountered, the policy under UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 response is encountered for the request www.example.com/current_events/, the pathMatcher's policy takes effect. If however, the request for www.example.com/coming_soon/ encounters a 404, the policy in PathRule.customErrorResponsePolicy takes effect. If any of the requests in this example encounter a 500 error code, the policy at UrlMap.defaultCustomErrorResponsePolicy takes effect. customErrorResponsePolicy is supported only for Global External HTTP(S) load balancing." + }, "paths": { "description": "The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.", "items": { @@ -64916,6 +65238,292 @@ }, "type": "object" }, + "QueuedResource": { + "description": "QueuedResource represents a request for future capacity. The capacity is delivered in the form of other GCE resources, either Instances or Reservations.", + "id": "QueuedResource", + "properties": { + "bulkInsertInstanceResource": { + "$ref": "BulkInsertInstanceResource", + "description": "Specification of VM instances to create." + }, + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#queuedResource", + "description": "[Output Only] Type of the resource. Always compute#queuedResource for QueuedResources.", + "type": "string" + }, + "name": { + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "queuingPolicy": { + "$ref": "QueuingPolicy", + "description": "Queuing parameters for the requested capacity." + }, + "region": { + "description": "[Output Only] URL of the region where the resource resides. Only applicable for regional resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + }, + "selfLink": { + "description": "[Output only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + }, + "state": { + "description": "[Output only] High-level status of the request.", + "enum": [ + "ACCEPTED", + "CANCELLED", + "CREATING", + "DELETING", + "FAILED", + "PROVISIONING", + "STATE_UNSPECIFIED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "The request was created successfully and was accepted for provisioning when the capacity becomes available.", + "The request was canceled by the user.", + "QueuedResource is being created and may still fail creation.", + "The request is being deleted.", + "The request failed before or during provisioning.", + "The target resource(s) are being provisioned.", + "", + "The request succeeded." + ], + "type": "string" + }, + "status": { + "$ref": "QueuedResourceStatus", + "description": "[Output only] Result of queuing and provisioning based on deferred capacity." + }, + "zone": { + "description": "[Output Only] URL of the zone where the resource resides. Only applicable for zonal resources. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.", + "type": "string" + } + }, + "type": "object" + }, + "QueuedResourceList": { + "id": "QueuedResourceList", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of QueuedResource resources.", + "items": { + "$ref": "QueuedResource" + }, + "type": "array" + }, + "kind": { + "default": "compute#queuedResourceList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "This token allows you to get the next page of results for maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "LARGE_DEPLOYMENT_WARNING", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "When deploying a deployment with a exceedingly large number of resources", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "QueuedResourceStatus": { + "description": "[Output only] Result of queuing and provisioning based on deferred capacity.", + "id": "QueuedResourceStatus", + "properties": { + "failedData": { + "$ref": "QueuedResourceStatusFailedData", + "description": "Additional status detail for the FAILED state." + }, + "provisioningOperations": { + "description": "[Output only] Fully qualified URL of the provisioning GCE operation to track the provisioning along with provisioning errors. The referenced operation may not exist after having been deleted or expired.", + "items": { + "type": "string" + }, + "type": "array" + }, + "queuingPolicy": { + "$ref": "QueuingPolicy", + "description": "Constraints for the time when the resource(s) start provisioning. Always exposed as absolute times." + } + }, + "type": "object" + }, + "QueuedResourceStatusFailedData": { + "description": "Additional status detail for the FAILED state.", + "id": "QueuedResourceStatusFailedData", + "properties": { + "error": { + "description": "The error(s) that caused the QueuedResource to enter the FAILED state.", + "properties": { + "errors": { + "description": "[Output Only] The array of errors encountered while processing this operation.", + "items": { + "properties": { + "code": { + "description": "[Output Only] The error type identifier for this error.", + "type": "string" + }, + "errorDetails": { + "description": "[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.", + "items": { + "properties": { + "errorInfo": { + "$ref": "ErrorInfo" + }, + "help": { + "$ref": "Help" + }, + "localizedMessage": { + "$ref": "LocalizedMessage" + }, + "quotaInfo": { + "$ref": "QuotaExceededInfo" + } + }, + "type": "object" + }, + "type": "array" + }, + "location": { + "description": "[Output Only] Indicates the field in the request that caused the error. This property is optional.", + "type": "string" + }, + "message": { + "description": "[Output Only] An optional, human-readable error message.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "type": "object" + }, "QueuingPolicy": { "description": "Queuing parameters for the requested deferred capacity.", "id": "QueuingPolicy", @@ -77668,6 +78276,10 @@ "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, + "defaultCustomErrorResponsePolicy": { + "$ref": "CustomErrorResponsePolicy", + "description": "defaultCustomErrorResponsePolicy specifies how the Load Balancer returns error responses when BackendServiceor BackendBucket responds with an error. This policy takes effect at the Load Balancer level and applies only when no policy has been defined for the error code at lower levels like PathMatcher, RouteRule and PathRule within this UrlMap. For example, consider a UrlMap with the following configuration: - defaultCustomErrorResponsePolicy containing policies for responding to 5xx and 4xx errors - A PathMatcher configured for *.example.com has defaultCustomErrorResponsePolicy for 4xx. If a request for http://www.example.com/ encounters a 404, the policy in pathMatcher.defaultCustomErrorResponsePolicy will be enforced. When the request for http://www.example.com/ encounters a 502, the policy in UrlMap.defaultCustomErrorResponsePolicy will be enforced. When a request that does not match any host in *.example.com such as http://www.myotherexample.com/, encounters a 404, UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in conjunction with defaultRouteAction.retryPolicy, retries take precedence. Only once all retries are exhausted, the defaultCustomErrorResponsePolicy is applied. While attempting a retry, if load balancer is successful in reaching the service, the defaultCustomErrorResponsePolicy is ignored and the response from the service is returned to the client. defaultCustomErrorResponsePolicy is supported only for Global External HTTP(S) load balancing." + }, "defaultRouteAction": { "$ref": "HttpRouteAction", "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. UrlMaps for external HTTP(S) load balancers support only the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index faaed7a37be..bbb79f1ac8c 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -240,6 +240,7 @@ func New(client *http.Client) (*Service, error) { s.VpnGateways = NewVpnGatewaysService(s) s.VpnTunnels = NewVpnTunnelsService(s) s.ZoneOperations = NewZoneOperationsService(s) + s.ZoneQueuedResources = NewZoneQueuedResourcesService(s) s.Zones = NewZonesService(s) return s, nil } @@ -441,6 +442,8 @@ type Service struct { ZoneOperations *ZoneOperationsService + ZoneQueuedResources *ZoneQueuedResourcesService + Zones *ZonesService } @@ -1315,6 +1318,15 @@ type ZoneOperationsService struct { s *Service } +func NewZoneQueuedResourcesService(s *Service) *ZoneQueuedResourcesService { + rs := &ZoneQueuedResourcesService{s: s} + return rs +} + +type ZoneQueuedResourcesService struct { + s *Service +} + func NewZonesService(s *Service) *ZonesService { rs := &ZonesService{s: s} return rs @@ -3353,6 +3365,13 @@ type AttachedDiskInitializeParams struct { // to. Only applicable for regional resources. ReplicaZones []string `json:"replicaZones,omitempty"` + // ResourceManagerTags: Resource manager tags to be bound to the disk. + // Tag keys and values have the same definition as resource manager + // tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values + // are in the format `tagValues/456`. The field is ignored (both PUT & + // PATCH) when empty. + ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` + // ResourcePolicies: Resource policies applied to this disk for // automatic snapshot creations. Specified using the full or partial // URL. For instance template, specify only the resource policy name. @@ -4992,7 +5011,7 @@ type Backend struct { MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` // MaxUtilization: Optional parameter to define a target capacity for - // the UTILIZATIONbalancing mode. The valid range is [0.0, 1.0]. For + // the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For // usage guidelines, see Utilization balancing mode. MaxUtilization float64 `json:"maxUtilization,omitempty"` @@ -7633,7 +7652,8 @@ type BulkInsertInstanceResource struct { // to be created. Required if sourceInstanceTemplate is not provided. InstanceProperties *InstanceProperties `json:"instanceProperties,omitempty"` - // LocationPolicy: Policy for chosing target zone. + // LocationPolicy: Policy for chosing target zone. For more information, + // see Create VMs in bulk . LocationPolicy *LocationPolicy `json:"locationPolicy,omitempty"` // MinCount: The minimum number of instances to create. If no min_count @@ -9020,6 +9040,113 @@ func (s *CorsPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CustomErrorResponsePolicy: Specifies the custom error response policy +// that must be applied when the backend service or backend bucket +// responds with an error. +type CustomErrorResponsePolicy struct { + // ErrorResponseRules: Specifies rules for returning error responses. In + // a given policy, if you specify rules for both a range of error codes + // as well as rules for specific error codes then rules with specific + // error codes have a higher priority. For example, assume that you + // configure a rule for 401 (Un-authorized) code, and another for all 4 + // series error codes (4XX). If the backend service returns a 401, then + // the rule for 401 will be applied. However if the backend service + // returns a 403, the rule for 4xx takes effect. + ErrorResponseRules []*CustomErrorResponsePolicyCustomErrorResponseRule `json:"errorResponseRules,omitempty"` + + // ErrorService: The full or partial URL to the BackendBucket resource + // that contains the custom error content. Examples are: - + // https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket + // - compute/v1/projects/project/global/backendBuckets/myBackendBucket - + // global/backendBuckets/myBackendBucket If errorService is not + // specified at lower levels like pathMatcher, pathRule and routeRule, + // an errorService specified at a higher level in the UrlMap will be + // used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more + // errorResponseRules[], it must specify errorService. If load balancer + // cannot reach the backendBucket, a simple Not Found Error will be + // returned, with the original response code (or overrideResponseCode if + // configured). errorService is not supported for internal or regional + // HTTP/HTTPS load balancers. + ErrorService string `json:"errorService,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorResponseRules") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorResponseRules") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CustomErrorResponsePolicy) MarshalJSON() ([]byte, error) { + type NoMethod CustomErrorResponsePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CustomErrorResponsePolicyCustomErrorResponseRule: Specifies the +// mapping between the response code that will be returned along with +// the custom error content and the response code returned by the +// backend service. +type CustomErrorResponsePolicyCustomErrorResponseRule struct { + // MatchResponseCodes: Valid values include: - A number between 400 and + // 599: For example 401 or 503, in which case the load balancer applies + // the policy if the error code exactly matches this value. - 5xx: Load + // Balancer will apply the policy if the backend service responds with + // any response code in the range of 500 to 599. - 4xx: Load Balancer + // will apply the policy if the backend service responds with any + // response code in the range of 400 to 499. Values must be unique + // within matchResponseCodes and across all errorResponseRules of + // CustomErrorResponsePolicy. + MatchResponseCodes []string `json:"matchResponseCodes,omitempty"` + + // OverrideResponseCode: The HTTP status code returned with the response + // containing the custom error content. If overrideResponseCode is not + // supplied, the same response code returned by the original backend + // bucket or backend service is returned to the client. + OverrideResponseCode int64 `json:"overrideResponseCode,omitempty"` + + // Path: The full path to a file within backendBucket . For example: + // /errors/defaultError.html path must start with a leading slash. path + // cannot have trailing slashes. If the file is not available in + // backendBucket or the load balancer cannot reach the BackendBucket, a + // simple Not Found Error is returned to the client. The value must be + // from 1 to 1024 characters + Path string `json:"path,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MatchResponseCodes") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MatchResponseCodes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *CustomErrorResponsePolicyCustomErrorResponseRule) MarshalJSON() ([]byte, error) { + type NoMethod CustomErrorResponsePolicyCustomErrorResponseRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type CustomerEncryptionKey struct { // KmsKeyName: The name of the encryption key that is stored in Google // Cloud KMS. For example: "kmsKeyName": @@ -9339,6 +9466,10 @@ type Disk struct { // Options: Internal use only. Options string `json:"options,omitempty"` + // Params: Input only. [Input Only] Additional params passed with the + // request, but not persisted as part of resource payload. + Params *DiskParams `json:"params,omitempty"` + // PhysicalBlockSizeBytes: Physical block size of the persistent disk, // in bytes. If not present in a request, a default value is used. The // currently supported size is 4096, other sizes may be added in the @@ -10125,6 +10256,39 @@ func (s *DiskMoveRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DiskParams: Additional disk params. +type DiskParams struct { + // ResourceManagerTags: Resource manager tags to be bound to the disk. + // Tag keys and values have the same definition as resource manager + // tags. Keys must be in the format `tagKeys/{tag_key_id}`, and values + // are in the format `tagValues/456`. The field is ignored (both PUT & + // PATCH) when empty. + ResourceManagerTags map[string]string `json:"resourceManagerTags,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ResourceManagerTags") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ResourceManagerTags") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DiskParams) MarshalJSON() ([]byte, error) { + type NoMethod DiskParams + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type DiskResourceStatus struct { AsyncPrimaryDisk *DiskResourceStatusAsyncReplicationStatus `json:"asyncPrimaryDisk,omitempty"` @@ -18332,6 +18496,36 @@ func (s *HttpRouteAction) MarshalJSON() ([]byte, error) { // HTTP request and the corresponding routing action that load balancing // proxies perform. type HttpRouteRule struct { + // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how + // the Load Balancer returns error responses when BackendServiceor + // BackendBucket responds with an error. If a policy for an error code + // is not configured for the RouteRule, a policy for the error code + // configured in pathMatcher.defaultCustomErrorResponsePolicy is + // applied. If one is not specified in + // pathMatcher.defaultCustomErrorResponsePolicy, the policy configured + // in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, + // consider a UrlMap with the following configuration: - + // UrlMap.defaultCustomErrorResponsePolicy are configured with policies + // for 5xx and 4xx errors - A RouteRule for /coming_soon/ is configured + // for the error code 404. If the request is for www.myotherdomain.com + // and a 404 is encountered, the policy under + // UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 + // response is encountered for the request + // www.example.com/current_events/, the pathMatcher's policy takes + // effect. If however, the request for www.example.com/coming_soon/ + // encounters a 404, the policy in RouteRule.customErrorResponsePolicy + // takes effect. If any of the requests in this example encounter a 500 + // error code, the policy at UrlMap.defaultCustomErrorResponsePolicy + // takes effect. When used in conjunction with + // routeRules.routeAction.retryPolicy, retries take precedence. Only + // once all retries are exhausted, the customErrorResponsePolicy is + // applied. While attempting a retry, if load balancer is successful in + // reaching the service, the customErrorResponsePolicy is ignored and + // the response from the service is returned to the client. + // customErrorResponsePolicy is supported only for Global External + // HTTP(S) load balancing. + CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` + // Description: The short description conveying the intent of this // routeRule. The description can have a maximum length of 1024 // characters. @@ -18416,20 +18610,22 @@ type HttpRouteRule struct { // bound to a target gRPC proxy. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "CustomErrorResponsePolicy") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "CustomErrorResponsePolicy") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -29938,7 +30134,8 @@ type LocationPolicyLocation struct { // distribution in this zone. Constraints *LocationPolicyLocationConstraints `json:"constraints,omitempty"` - // Preference: Preference for a given location. + // Preference: Preference for a given location. Set to either ALLOW or + // DENY. // // Possible values: // "ALLOW" - Location is allowed for use. @@ -39640,6 +39837,36 @@ func (s *PacketMirroringsScopedListWarningData) MarshalJSON() ([]byte, error) { // BackendService from the longest-matched rule will serve the URL. If // no rule was matched, the default service is used. type PathMatcher struct { + // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy + // specifies how the Load Balancer returns error responses when + // BackendServiceor BackendBucket responds with an error. This policy + // takes effect at the PathMatcher level and applies only when no policy + // has been defined for the error code at lower levels like RouteRule + // and PathRule within this PathMatcher. If an error code does not have + // a policy defined in defaultCustomErrorResponsePolicy, then a policy + // defined for the error code in UrlMap.defaultCustomErrorResponsePolicy + // takes effect. For example, consider a UrlMap with the following + // configuration: - UrlMap.defaultCustomErrorResponsePolicy is + // configured with policies for 5xx and 4xx errors - A RouteRule for + // /coming_soon/ is configured for the error code 404. If the request is + // for www.myotherdomain.com and a 404 is encountered, the policy under + // UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 + // response is encountered for the request + // www.example.com/current_events/, the pathMatcher's policy takes + // effect. If however, the request for www.example.com/coming_soon/ + // encounters a 404, the policy in RouteRule.customErrorResponsePolicy + // takes effect. If any of the requests in this example encounter a 500 + // error code, the policy at UrlMap.defaultCustomErrorResponsePolicy + // takes effect. When used in conjunction with + // pathMatcher.defaultRouteAction.retryPolicy, retries take precedence. + // Only once all retries are exhausted, the + // defaultCustomErrorResponsePolicy is applied. While attempting a + // retry, if load balancer is successful in reaching the service, the + // defaultCustomErrorResponsePolicy is ignored and the response from the + // service is returned to the client. defaultCustomErrorResponsePolicy + // is supported only for Global External HTTP(S) load balancing. + DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` + // DefaultRouteAction: defaultRouteAction takes effect when none of the // pathRules or routeRules match. The load balancer performs advanced // routing actions, such as URL rewrites and header transformations, @@ -39713,21 +39940,22 @@ type PathMatcher struct { // only one of pathRules or routeRules. RouteRules []*HttpRouteRule `json:"routeRules,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultRouteAction") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "DefaultCustomErrorResponsePolicy") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultRouteAction") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "DefaultCustomErrorResponsePolicy") to include in API requests with + // the JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -39740,6 +39968,30 @@ func (s *PathMatcher) MarshalJSON() ([]byte, error) { // PathRule: A path-matching rule for a URL. If matched, will use the // specified BackendService to handle the traffic arriving at this URL. type PathRule struct { + // CustomErrorResponsePolicy: customErrorResponsePolicy specifies how + // the Load Balancer returns error responses when BackendServiceor + // BackendBucket responds with an error. If a policy for an error code + // is not configured for the PathRule, a policy for the error code + // configured in pathMatcher.defaultCustomErrorResponsePolicy is + // applied. If one is not specified in + // pathMatcher.defaultCustomErrorResponsePolicy, the policy configured + // in UrlMap.defaultCustomErrorResponsePolicy takes effect. For example, + // consider a UrlMap with the following configuration: - + // UrlMap.defaultCustomErrorResponsePolicy are configured with policies + // for 5xx and 4xx errors - A PathRule for /coming_soon/ is configured + // for the error code 404. If the request is for www.myotherdomain.com + // and a 404 is encountered, the policy under + // UrlMap.defaultCustomErrorResponsePolicy takes effect. If a 404 + // response is encountered for the request + // www.example.com/current_events/, the pathMatcher's policy takes + // effect. If however, the request for www.example.com/coming_soon/ + // encounters a 404, the policy in PathRule.customErrorResponsePolicy + // takes effect. If any of the requests in this example encounter a 500 + // error code, the policy at UrlMap.defaultCustomErrorResponsePolicy + // takes effect. customErrorResponsePolicy is supported only for Global + // External HTTP(S) load balancing. + CustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"customErrorResponsePolicy,omitempty"` + // Paths: The list of path patterns to match. Each must start with / and // the only place a * is allowed is at the end following a /. The string // fed to the path matcher does not include any text after the first ? @@ -39773,20 +40025,22 @@ type PathRule struct { // the URL map is bound to a target gRPC proxy. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` - // ForceSendFields is a list of field names (e.g. "Paths") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "CustomErrorResponsePolicy") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Paths") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "CustomErrorResponsePolicy") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -41728,6 +41982,467 @@ func (s *PublicDelegatedPrefixesScopedListWarningData) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// QueuedResource: QueuedResource represents a request for future +// capacity. The capacity is delivered in the form of other GCE +// resources, either Instances or Reservations. +type QueuedResource struct { + // BulkInsertInstanceResource: Specification of VM instances to create. + BulkInsertInstanceResource *BulkInsertInstanceResource `json:"bulkInsertInstanceResource,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always + // compute#queuedResource for QueuedResources. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // QueuingPolicy: Queuing parameters for the requested capacity. + QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` + + // Region: [Output Only] URL of the region where the resource resides. + // Only applicable for regional resources. You must specify this field + // as part of the HTTP request URL. It is not settable as a field in the + // request body. + Region string `json:"region,omitempty"` + + // SelfLink: [Output only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // SelfLinkWithId: [Output Only] Server-defined URL for this resource + // with the resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + + // State: [Output only] High-level status of the request. + // + // Possible values: + // "ACCEPTED" - The request was created successfully and was accepted + // for provisioning when the capacity becomes available. + // "CANCELLED" - The request was canceled by the user. + // "CREATING" - QueuedResource is being created and may still fail + // creation. + // "DELETING" - The request is being deleted. + // "FAILED" - The request failed before or during provisioning. + // "PROVISIONING" - The target resource(s) are being provisioned. + // "STATE_UNSPECIFIED" + // "SUCCEEDED" - The request succeeded. + State string `json:"state,omitempty"` + + // Status: [Output only] Result of queuing and provisioning based on + // deferred capacity. + Status *QueuedResourceStatus `json:"status,omitempty"` + + // Zone: [Output Only] URL of the zone where the resource resides. Only + // applicable for zonal resources. You must specify this field as part + // of the HTTP request URL. It is not settable as a field in the request + // body. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "BulkInsertInstanceResource") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "BulkInsertInstanceResource") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueuedResource) MarshalJSON() ([]byte, error) { + type NoMethod QueuedResource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type QueuedResourceList struct { + Etag string `json:"etag,omitempty"` + + // Id: Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + + // Items: A list of QueuedResource resources. + Items []*QueuedResource `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: This token allows you to get the next page of results + // for maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // Unreachables: [Output only] Unreachable resources. + Unreachables []string `json:"unreachables,omitempty"` + + // Warning: Informational warning message. + Warning *QueuedResourceListWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueuedResourceList) MarshalJSON() ([]byte, error) { + type NoMethod QueuedResourceList + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueuedResourceListWarning: Informational warning message. +type QueuedResourceListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient + // changes made by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was + // created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk + // that is larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api + // call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an + // injected kernel, which is deprecated. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is + // not assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot + // ip forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's + // nextHopInstance URL refers to an instance that does not have an ipv6 + // interface on the same network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL + // refers to an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance + // URL refers to an instance that is not on the same network as the + // route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not + // have a status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to + // continue the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list + // page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be + // missing due to errors + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource + // that requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a + // resource is in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to + // auto-delete could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in + // instance group manager is valid as such, but its application does not + // make a lot of sense, because it allows only single instance in + // instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema + // are present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" + // } + Data []*QueuedResourceListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueuedResourceListWarning) MarshalJSON() ([]byte, error) { + type NoMethod QueuedResourceListWarning + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type QueuedResourceListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueuedResourceListWarningData) MarshalJSON() ([]byte, error) { + type NoMethod QueuedResourceListWarningData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueuedResourceStatus: [Output only] Result of queuing and +// provisioning based on deferred capacity. +type QueuedResourceStatus struct { + // FailedData: Additional status detail for the FAILED state. + FailedData *QueuedResourceStatusFailedData `json:"failedData,omitempty"` + + // ProvisioningOperations: [Output only] Fully qualified URL of the + // provisioning GCE operation to track the provisioning along with + // provisioning errors. The referenced operation may not exist after + // having been deleted or expired. + ProvisioningOperations []string `json:"provisioningOperations,omitempty"` + + // QueuingPolicy: Constraints for the time when the resource(s) start + // provisioning. Always exposed as absolute times. + QueuingPolicy *QueuingPolicy `json:"queuingPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FailedData") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FailedData") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueuedResourceStatus) MarshalJSON() ([]byte, error) { + type NoMethod QueuedResourceStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueuedResourceStatusFailedData: Additional status detail for the +// FAILED state. +type QueuedResourceStatusFailedData struct { + // Error: The error(s) that caused the QueuedResource to enter the + // FAILED state. + Error *QueuedResourceStatusFailedDataError `json:"error,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 omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueuedResourceStatusFailedData) MarshalJSON() ([]byte, error) { + type NoMethod QueuedResourceStatusFailedData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// QueuedResourceStatusFailedDataError: The error(s) that caused the +// QueuedResource to enter the FAILED state. +type QueuedResourceStatusFailedDataError struct { + // Errors: [Output Only] The array of errors encountered while + // processing this operation. + Errors []*QueuedResourceStatusFailedDataErrorErrors `json:"errors,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Errors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Errors") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueuedResourceStatusFailedDataError) MarshalJSON() ([]byte, error) { + type NoMethod QueuedResourceStatusFailedDataError + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type QueuedResourceStatusFailedDataErrorErrors struct { + // Code: [Output Only] The error type identifier for this error. + Code string `json:"code,omitempty"` + + // ErrorDetails: [Output Only] An optional list of messages that contain + // the error details. There is a set of defined message types to use for + // providing details.The syntax depends on the error code. For example, + // QuotaExceededInfo will have details when the error code is + // QUOTA_EXCEEDED. + ErrorDetails []*QueuedResourceStatusFailedDataErrorErrorsErrorDetails `json:"errorDetails,omitempty"` + + // Location: [Output Only] Indicates the field in the request that + // caused the error. This property is optional. + Location string `json:"location,omitempty"` + + // Message: [Output Only] An optional, human-readable error message. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueuedResourceStatusFailedDataErrorErrors) MarshalJSON() ([]byte, error) { + type NoMethod QueuedResourceStatusFailedDataErrorErrors + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type QueuedResourceStatusFailedDataErrorErrorsErrorDetails struct { + ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"` + + Help *Help `json:"help,omitempty"` + + LocalizedMessage *LocalizedMessage `json:"localizedMessage,omitempty"` + + QuotaInfo *QuotaExceededInfo `json:"quotaInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QueuedResourceStatusFailedDataErrorErrorsErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod QueuedResourceStatusFailedDataErrorErrorsErrorDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // QueuingPolicy: Queuing parameters for the requested deferred // capacity. type QueuingPolicy struct { @@ -61523,6 +62238,32 @@ type UrlMap struct { // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` + // DefaultCustomErrorResponsePolicy: defaultCustomErrorResponsePolicy + // specifies how the Load Balancer returns error responses when + // BackendServiceor BackendBucket responds with an error. This policy + // takes effect at the Load Balancer level and applies only when no + // policy has been defined for the error code at lower levels like + // PathMatcher, RouteRule and PathRule within this UrlMap. For example, + // consider a UrlMap with the following configuration: - + // defaultCustomErrorResponsePolicy containing policies for responding + // to 5xx and 4xx errors - A PathMatcher configured for *.example.com + // has defaultCustomErrorResponsePolicy for 4xx. If a request for + // http://www.example.com/ encounters a 404, the policy in + // pathMatcher.defaultCustomErrorResponsePolicy will be enforced. When + // the request for http://www.example.com/ encounters a 502, the policy + // in UrlMap.defaultCustomErrorResponsePolicy will be enforced. When a + // request that does not match any host in *.example.com such as + // http://www.myotherexample.com/, encounters a 404, + // UrlMap.defaultCustomErrorResponsePolicy takes effect. When used in + // conjunction with defaultRouteAction.retryPolicy, retries take + // precedence. Only once all retries are exhausted, the + // defaultCustomErrorResponsePolicy is applied. While attempting a + // retry, if load balancer is successful in reaching the service, the + // defaultCustomErrorResponsePolicy is ignored and the response from the + // service is returned to the client. defaultCustomErrorResponsePolicy + // is supported only for Global External HTTP(S) load balancing. + DefaultCustomErrorResponsePolicy *CustomErrorResponsePolicy `json:"defaultCustomErrorResponsePolicy,omitempty"` + // DefaultRouteAction: defaultRouteAction takes effect when none of the // hostRules match. The load balancer performs advanced routing actions, // such as URL rewrites and header transformations, before forwarding @@ -111557,7 +112298,8 @@ type InstancesBulkInsertCall struct { } // BulkInsert: Creates multiple instances. Count specifies the number of -// instances to create. +// instances to create. For more information, see About bulk creation of +// VMs. // // - project: Project ID for this request. // - zone: The name of the zone for this request. @@ -111677,7 +112419,7 @@ func (c *InstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates multiple instances. Count specifies the number of instances to create.", + // "description": "Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.", // "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", // "httpMethod": "POST", // "id": "compute.instances.bulkInsert", @@ -229821,6 +230563,1004 @@ func (c *ZoneOperationsWaitCall) Do(opts ...googleapi.CallOption) (*Operation, e } +// method id "compute.zoneQueuedResources.cancel": + +type ZoneQueuedResourcesCancelCall struct { + s *Service + project string + zone string + queuedResource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Cancels a QueuedResource. Only a resource in ACCEPTED state +// may be cancelled. +// +// - project: Project ID for this request. +// - queuedResource: Name of the QueuedResource to cancel. +// - zone: Name of the zone for this request. +func (r *ZoneQueuedResourcesService) Cancel(project string, zone string, queuedResource string) *ZoneQueuedResourcesCancelCall { + c := &ZoneQueuedResourcesCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.queuedResource = queuedResource + 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. 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 *ZoneQueuedResourcesCancelCall) RequestId(requestId string) *ZoneQueuedResourcesCancelCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ZoneQueuedResourcesCancelCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ZoneQueuedResourcesCancelCall) Context(ctx context.Context) *ZoneQueuedResourcesCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ZoneQueuedResourcesCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneQueuedResourcesCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources/{queuedResource}/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{ + "project": c.project, + "zone": c.zone, + "queuedResource": c.queuedResource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneQueuedResources.cancel" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ZoneQueuedResourcesCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Cancels a QueuedResource. Only a resource in ACCEPTED state may be cancelled.", + // "flatPath": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}/cancel", + // "httpMethod": "POST", + // "id": "compute.zoneQueuedResources.cancel", + // "parameterOrder": [ + // "project", + // "zone", + // "queuedResource" + // ], + // "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" + // }, + // "queuedResource": { + // "description": "Name of the QueuedResource to cancel.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "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. 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" + // }, + // "zone": { + // "description": "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}/queuedResources/{queuedResource}/cancel", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.zoneQueuedResources.delete": + +type ZoneQueuedResourcesDeleteCall struct { + s *Service + project string + zone string + queuedResource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a QueuedResource. For a QueuedResource in ACCEPTED +// state, call cancel on the resource before deleting, to make sure no +// VMs have been provisioned and may require cleaning up. For a +// QueuedResource in PROVISIONING state the request to delete is +// registered for execution following the provisioning. +// +// - project: Project ID for this request. +// - queuedResource: Name of the QueuedResource to delete. +// - zone: Name of the zone for this request. +func (r *ZoneQueuedResourcesService) Delete(project string, zone string, queuedResource string) *ZoneQueuedResourcesDeleteCall { + c := &ZoneQueuedResourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.queuedResource = queuedResource + 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. 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 *ZoneQueuedResourcesDeleteCall) RequestId(requestId string) *ZoneQueuedResourcesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ZoneQueuedResourcesDeleteCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ZoneQueuedResourcesDeleteCall) Context(ctx context.Context) *ZoneQueuedResourcesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ZoneQueuedResourcesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneQueuedResourcesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources/{queuedResource}") + 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{ + "project": c.project, + "zone": c.zone, + "queuedResource": c.queuedResource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneQueuedResources.delete" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ZoneQueuedResourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a QueuedResource. For a QueuedResource in ACCEPTED state, call cancel on the resource before deleting, to make sure no VMs have been provisioned and may require cleaning up. For a QueuedResource in PROVISIONING state the request to delete is registered for execution following the provisioning.", + // "flatPath": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}", + // "httpMethod": "DELETE", + // "id": "compute.zoneQueuedResources.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "queuedResource" + // ], + // "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" + // }, + // "queuedResource": { + // "description": "Name of the QueuedResource to delete.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "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. 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" + // }, + // "zone": { + // "description": "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}/queuedResources/{queuedResource}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.zoneQueuedResources.get": + +type ZoneQueuedResourcesGetCall struct { + s *Service + project string + zone string + queuedResource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified QueuedResource resource. +// +// - project: Project ID for this request. +// - queuedResource: Name of the QueuedResource resource to return. +// - zone: Name of the zone for this request. +func (r *ZoneQueuedResourcesService) Get(project string, zone string, queuedResource string) *ZoneQueuedResourcesGetCall { + c := &ZoneQueuedResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.queuedResource = queuedResource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ZoneQueuedResourcesGetCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ZoneQueuedResourcesGetCall) IfNoneMatch(entityTag string) *ZoneQueuedResourcesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ZoneQueuedResourcesGetCall) Context(ctx context.Context) *ZoneQueuedResourcesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ZoneQueuedResourcesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneQueuedResourcesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources/{queuedResource}") + 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, + "queuedResource": c.queuedResource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneQueuedResources.get" call. +// Exactly one of *QueuedResource or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *QueuedResource.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ZoneQueuedResourcesGetCall) Do(opts ...googleapi.CallOption) (*QueuedResource, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &QueuedResource{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified QueuedResource resource.", + // "flatPath": "projects/{project}/zones/{zone}/queuedResources/{queuedResource}", + // "httpMethod": "GET", + // "id": "compute.zoneQueuedResources.get", + // "parameterOrder": [ + // "project", + // "zone", + // "queuedResource" + // ], + // "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" + // }, + // "queuedResource": { + // "description": "Name of the QueuedResource resource to return.", + // "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": "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}/queuedResources/{queuedResource}", + // "response": { + // "$ref": "QueuedResource" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.zoneQueuedResources.insert": + +type ZoneQueuedResourcesInsertCall struct { + s *Service + project string + zone string + queuedresource *QueuedResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a QueuedResource. +// +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneQueuedResourcesService) Insert(project string, zone string, queuedresource *QueuedResource) *ZoneQueuedResourcesInsertCall { + c := &ZoneQueuedResourcesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.queuedresource = queuedresource + 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. 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 *ZoneQueuedResourcesInsertCall) RequestId(requestId string) *ZoneQueuedResourcesInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ZoneQueuedResourcesInsertCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ZoneQueuedResourcesInsertCall) Context(ctx context.Context) *ZoneQueuedResourcesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ZoneQueuedResourcesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneQueuedResourcesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.queuedresource) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneQueuedResources.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ZoneQueuedResourcesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a QueuedResource.", + // "flatPath": "projects/{project}/zones/{zone}/queuedResources", + // "httpMethod": "POST", + // "id": "compute.zoneQueuedResources.insert", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "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" + // }, + // "requestId": { + // "description": "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. 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" + // }, + // "zone": { + // "description": "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}/queuedResources", + // "request": { + // "$ref": "QueuedResource" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.zoneQueuedResources.list": + +type ZoneQueuedResourcesListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of QueuedResource resources. +// +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *ZoneQueuedResourcesService) List(project string, zone string) *ZoneQueuedResourcesListCall { + c := &ZoneQueuedResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources +// support two types of filter expressions: expressions that support +// regular expressions and expressions that follow API improvement +// proposal AIP-160. If you want to use AIP-160, your expression must +// specify the field name, an operator, and the value that you want to +// use for filtering. The value must be a string, a number, or a +// boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` +// or `:`. For example, if you are filtering Compute Engine instances, +// you can exclude instances named `example-instance` by specifying +// `name != example-instance`. The `:` operator can be used with string +// fields to match substrings. For non-string fields it is equivalent to +// the `=` operator. The `:*` comparison can be used to test whether a +// key has been defined. For example, to find all objects with `owner` +// label use: ``` labels.owner:* ``` You can also filter nested fields. +// For example, you could specify `scheduling.automaticRestart = false` +// to include instances only if they are not scheduled for automatic +// restarts. You can use filtering on nested fields to filter based on +// resource labels. To filter on multiple expressions, provide each +// separate expression within parentheses. For example: ``` +// (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") +// ``` By default, each expression is an `AND` expression. However, you +// can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") +// AND (scheduling.automaticRestart = true) ``` If you want to use a +// regular expression, use the `eq` (equal) or `ne` (not equal) operator +// against a single un-parenthesized expression with or without quotes +// or against multiple parenthesized expressions. Examples: `fieldname +// eq unquoted literal` `fieldname eq 'single quoted literal'` +// `fieldname eq "double quoted literal" `(fieldname1 eq literal) +// (fieldname2 ne "literal")` The literal value is interpreted as a +// regular expression using Google RE2 library syntax. The literal value +// must match the entire field. For example, to filter for instances +// that do not end with name "instance", you would use `name ne +// .*instance`. +func (c *ZoneQueuedResourcesListCall) Filter(filter string) *ZoneQueuedResourcesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than `maxResults`, Compute Engine returns +// a `nextPageToken` that can be used to get the next page of results in +// subsequent list requests. Acceptable values are `0` to `500`, +// inclusive. (Default: `500`) +func (c *ZoneQueuedResourcesListCall) MaxResults(maxResults int64) *ZoneQueuedResourcesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. You can also sort results in +// descending order based on the creation timestamp using +// `orderBy="creationTimestamp desc". This sorts results based on the +// `creationTimestamp` field in reverse chronological order (newest +// result first). Use this to sort resources like operations so that the +// newest operation is returned first. Currently, only sorting by `name` +// or `creationTimestamp desc` is supported. +func (c *ZoneQueuedResourcesListCall) OrderBy(orderBy string) *ZoneQueuedResourcesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set `pageToken` to the `nextPageToken` returned by a +// previous list request to get the next page of results. +func (c *ZoneQueuedResourcesListCall) PageToken(pageToken string) *ZoneQueuedResourcesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter +// "returnPartialSuccess": Opt-in for partial success behavior which +// provides partial results in case of failure. The default value is +// false. +func (c *ZoneQueuedResourcesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ZoneQueuedResourcesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ZoneQueuedResourcesListCall) Fields(s ...googleapi.Field) *ZoneQueuedResourcesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ZoneQueuedResourcesListCall) IfNoneMatch(entityTag string) *ZoneQueuedResourcesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ZoneQueuedResourcesListCall) Context(ctx context.Context) *ZoneQueuedResourcesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ZoneQueuedResourcesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ZoneQueuedResourcesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/queuedResources") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.zoneQueuedResources.list" call. +// Exactly one of *QueuedResourceList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *QueuedResourceList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ZoneQueuedResourcesListCall) Do(opts ...googleapi.CallOption) (*QueuedResourceList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &QueuedResourceList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of QueuedResource resources.", + // "flatPath": "projects/{project}/zones/{zone}/queuedResources", + // "httpMethod": "GET", + // "id": "compute.zoneQueuedResources.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "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" + // }, + // "returnPartialSuccess": { + // "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.", + // "location": "query", + // "type": "boolean" + // }, + // "zone": { + // "description": "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}/queuedResources", + // "response": { + // "$ref": "QueuedResourceList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ZoneQueuedResourcesListCall) Pages(ctx context.Context, f func(*QueuedResourceList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.zones.get": type ZonesGetCall struct { diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 0c523d9430b..22db57e921f 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -9747,7 +9747,7 @@ ] }, "bulkInsert": { - "description": "Creates multiple instances. Count specifies the number of instances to create.", + "description": "Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.", "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", "httpMethod": "POST", "id": "compute.instances.bulkInsert", @@ -35452,7 +35452,7 @@ } } }, - "revision": "20220621", + "revision": "20220705", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -37647,7 +37647,7 @@ "type": "number" }, "maxUtilization": { - "description": "Optional parameter to define a target capacity for the UTILIZATIONbalancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.", + "description": "Optional parameter to define a target capacity for the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.", "format": "float", "type": "number" } @@ -39173,7 +39173,7 @@ }, "locationPolicy": { "$ref": "LocationPolicy", - "description": "Policy for chosing target zone." + "description": "Policy for chosing target zone. For more information, see Create VMs in bulk ." }, "minCount": { "description": "The minimum number of instances to create. If no min_count is specified then count is used as the default value. If min_count instances cannot be created, then no instances will be created and instances already created will be deleted.", @@ -50394,7 +50394,7 @@ "description": "Constraints that the caller requires on the result distribution in this zone." }, "preference": { - "description": "Preference for a given location.", + "description": "Preference for a given location. Set to either ALLOW or DENY.", "enum": [ "ALLOW", "DENY", @@ -51514,6 +51514,10 @@ "description": "Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. .", "type": "boolean" }, + "firewallPolicy": { + "description": "[Output Only] URL of the firewall policy the network is associated with.", + "type": "string" + }, "gatewayIPv4": { "description": "[Output Only] The gateway address for default routing out of the network, selected by GCP.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}", diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index cf8a7f2cf37..1df9b6aca69 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -4728,7 +4728,7 @@ type Backend struct { MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` // MaxUtilization: Optional parameter to define a target capacity for - // the UTILIZATIONbalancing mode. The valid range is [0.0, 1.0]. For + // the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For // usage guidelines, see Utilization balancing mode. MaxUtilization float64 `json:"maxUtilization,omitempty"` @@ -7279,7 +7279,8 @@ type BulkInsertInstanceResource struct { // to be created. Required if sourceInstanceTemplate is not provided. InstanceProperties *InstanceProperties `json:"instanceProperties,omitempty"` - // LocationPolicy: Policy for chosing target zone. + // LocationPolicy: Policy for chosing target zone. For more information, + // see Create VMs in bulk . LocationPolicy *LocationPolicy `json:"locationPolicy,omitempty"` // MinCount: The minimum number of instances to create. If no min_count @@ -25098,7 +25099,8 @@ type LocationPolicyLocation struct { // distribution in this zone. Constraints *LocationPolicyLocationConstraints `json:"constraints,omitempty"` - // Preference: Preference for a given location. + // Preference: Preference for a given location. Set to either ALLOW or + // DENY. // // Possible values: // "ALLOW" - Location is allowed for use. @@ -26926,6 +26928,10 @@ type Network struct { // prefix fd20::/20. . EnableUlaInternalIpv6 bool `json:"enableUlaInternalIpv6,omitempty"` + // FirewallPolicy: [Output Only] URL of the firewall policy the network + // is associated with. + FirewallPolicy string `json:"firewallPolicy,omitempty"` + // GatewayIPv4: [Output Only] The gateway address for default routing // out of the network, selected by GCP. GatewayIPv4 string `json:"gatewayIPv4,omitempty"` @@ -99966,7 +99972,8 @@ type InstancesBulkInsertCall struct { } // BulkInsert: Creates multiple instances. Count specifies the number of -// instances to create. +// instances to create. For more information, see About bulk creation of +// VMs. // // - project: Project ID for this request. // - zone: The name of the zone for this request. @@ -100086,7 +100093,7 @@ func (c *InstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Creates multiple instances. Count specifies the number of instances to create.", + // "description": "Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.", // "flatPath": "projects/{project}/zones/{zone}/instances/bulkInsert", // "httpMethod": "POST", // "id": "compute.instances.bulkInsert", diff --git a/gkehub/v1alpha/gkehub-api.json b/gkehub/v1alpha/gkehub-api.json index bc430e5a61a..e53cee90e91 100644 --- a/gkehub/v1alpha/gkehub-api.json +++ b/gkehub/v1alpha/gkehub-api.json @@ -1151,7 +1151,7 @@ } } }, - "revision": "20220628", + "revision": "20220706", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2578,6 +2578,10 @@ "description": "Configuration of an auth method for a member/cluster. Only one authentication method (e.g., OIDC and LDAP) can be set per AuthMethod.", "id": "IdentityServiceAuthMethod", "properties": { + "azureadConfig": { + "$ref": "IdentityServiceAzureADConfig", + "description": "AzureAD specific Configuration." + }, "name": { "description": "Identifier for auth config.", "type": "string" @@ -2593,6 +2597,34 @@ }, "type": "object" }, + "IdentityServiceAzureADConfig": { + "description": "Configuration for the AzureAD Auth flow.", + "id": "IdentityServiceAzureADConfig", + "properties": { + "clientId": { + "description": "ID for the registered client application that makes authentication requests to the Azure AD identity provider.", + "type": "string" + }, + "clientSecret": { + "description": "Raw client secret will be passed to the GKE Hub CLH.", + "type": "string" + }, + "encryptedClientSecret": { + "description": "Encrypted AzureAD client secrets", + "format": "byte", + "type": "string" + }, + "kubectlRedirectUri": { + "description": "The redirect URL that kubectl uses for authorization.", + "type": "string" + }, + "tenant": { + "description": "Kind of Azure AD account to be authenticated. Supported values are or for accounts belonging to a specific tenant.", + "type": "string" + } + }, + "type": "object" + }, "IdentityServiceMembershipSpec": { "description": "**Anthos Identity Service**: Configuration for a single Membership.", "id": "IdentityServiceMembershipSpec", diff --git a/gkehub/v1alpha/gkehub-gen.go b/gkehub/v1alpha/gkehub-gen.go index 67286a08de7..d439e5963c6 100644 --- a/gkehub/v1alpha/gkehub-gen.go +++ b/gkehub/v1alpha/gkehub-gen.go @@ -2604,6 +2604,9 @@ func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { // member/cluster. Only one authentication method (e.g., OIDC and LDAP) // can be set per AuthMethod. type IdentityServiceAuthMethod struct { + // AzureadConfig: AzureAD specific Configuration. + AzureadConfig *IdentityServiceAzureADConfig `json:"azureadConfig,omitempty"` + // Name: Identifier for auth config. Name string `json:"name,omitempty"` @@ -2613,7 +2616,7 @@ type IdentityServiceAuthMethod struct { // Proxy: Proxy server address to use for auth method. Proxy string `json:"proxy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "AzureadConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2621,10 +2624,10 @@ type IdentityServiceAuthMethod struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AzureadConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` @@ -2636,6 +2639,50 @@ func (s *IdentityServiceAuthMethod) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IdentityServiceAzureADConfig: Configuration for the AzureAD Auth +// flow. +type IdentityServiceAzureADConfig struct { + // ClientId: ID for the registered client application that makes + // authentication requests to the Azure AD identity provider. + ClientId string `json:"clientId,omitempty"` + + // ClientSecret: Raw client secret will be passed to the GKE Hub CLH. + ClientSecret string `json:"clientSecret,omitempty"` + + // EncryptedClientSecret: Encrypted AzureAD client secrets + EncryptedClientSecret string `json:"encryptedClientSecret,omitempty"` + + // KubectlRedirectUri: The redirect URL that kubectl uses for + // authorization. + KubectlRedirectUri string `json:"kubectlRedirectUri,omitempty"` + + // Tenant: Kind of Azure AD account to be authenticated. Supported + // values are or for accounts belonging to a specific tenant. + Tenant string `json:"tenant,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClientId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClientId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IdentityServiceAzureADConfig) MarshalJSON() ([]byte, error) { + type NoMethod IdentityServiceAzureADConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // IdentityServiceMembershipSpec: **Anthos Identity Service**: // Configuration for a single Membership. type IdentityServiceMembershipSpec struct { diff --git a/gkehub/v1beta/gkehub-api.json b/gkehub/v1beta/gkehub-api.json index b504bb937a8..1bb4fe06607 100644 --- a/gkehub/v1beta/gkehub-api.json +++ b/gkehub/v1beta/gkehub-api.json @@ -670,7 +670,7 @@ } } }, - "revision": "20220628", + "revision": "20220706", "rootUrl": "https://gkehub.googleapis.com/", "schemas": { "AnthosObservabilityFeatureSpec": { @@ -2410,6 +2410,10 @@ "$ref": "PolicyControllerMonitoringConfig", "description": "Monitoring specifies the configuration of monitoring." }, + "mutationEnabled": { + "description": "Enables the ability to mutate resources using Policy Controller.", + "type": "boolean" + }, "referentialRulesEnabled": { "description": "Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated.", "type": "boolean" diff --git a/gkehub/v1beta/gkehub-gen.go b/gkehub/v1beta/gkehub-gen.go index 3e5a038c12c..55d3f10c696 100644 --- a/gkehub/v1beta/gkehub-gen.go +++ b/gkehub/v1beta/gkehub-gen.go @@ -3002,6 +3002,10 @@ type PolicyControllerHubConfig struct { // Monitoring: Monitoring specifies the configuration of monitoring. Monitoring *PolicyControllerMonitoringConfig `json:"monitoring,omitempty"` + // MutationEnabled: Enables the ability to mutate resources using Policy + // Controller. + MutationEnabled bool `json:"mutationEnabled,omitempty"` + // ReferentialRulesEnabled: Enables the ability to use Constraint // Templates that reference to objects other than the object currently // being evaluated. diff --git a/memcache/v1/memcache-api.json b/memcache/v1/memcache-api.json index 9ad464b361b..7bf96961abf 100644 --- a/memcache/v1/memcache-api.json +++ b/memcache/v1/memcache-api.json @@ -556,7 +556,7 @@ } } }, - "revision": "20220419", + "revision": "20220709", "rootUrl": "https://memcache.googleapis.com/", "schemas": { "ApplyParametersRequest": { @@ -768,7 +768,7 @@ "additionalProperties": { "type": "string" }, - "description": "Deprecated. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug.", + "description": "Optional. Deprecated. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug.", "type": "object" }, "maintenanceSchedules": { @@ -908,7 +908,7 @@ "additionalProperties": { "$ref": "MaintenancePolicy" }, - "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the embedded policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the name is needed (like in the deprecated Instance.maintenance_policy_names field) then only populate MaintenancePolicy.name.", + "description": "Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the embedded policy must define the same policy type. For complete details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the name is needed, then only populate MaintenancePolicy.name.", "type": "object" } }, diff --git a/memcache/v1/memcache-gen.go b/memcache/v1/memcache-gen.go index ebb283dba7b..5716d7efe6e 100644 --- a/memcache/v1/memcache-gen.go +++ b/memcache/v1/memcache-gen.go @@ -511,9 +511,9 @@ type GoogleCloudSaasacceleratorManagementProvidersV1Instance struct { // value are arbitrary strings provided by the user. Labels map[string]string `json:"labels,omitempty"` - // MaintenancePolicyNames: Deprecated. The MaintenancePolicies that have - // been attached to the instance. The key must be of the type name of - // the oneof policy name defined in MaintenancePolicy, and the + // MaintenancePolicyNames: Optional. Deprecated. The MaintenancePolicies + // that have been attached to the instance. The key must be of the type + // name of the oneof policy name defined in MaintenancePolicy, and the // referenced policy must define the same policy type. For complete // details of MaintenancePolicy, please refer to go/cloud-saas-mw-ug. MaintenancePolicyNames map[string]string `json:"maintenancePolicyNames,omitempty"` @@ -684,9 +684,7 @@ type GoogleCloudSaasacceleratorManagementProvidersV1MaintenanceSettings struct { // oneof policy name defined in MaintenancePolicy, and the embedded // policy must define the same policy type. For complete details of // MaintenancePolicy, please refer to go/cloud-saas-mw-ug. If only the - // name is needed (like in the deprecated - // Instance.maintenance_policy_names field) then only populate - // MaintenancePolicy.name. + // name is needed, then only populate MaintenancePolicy.name. MaintenancePolicies map[string]MaintenancePolicy `json:"maintenancePolicies,omitempty"` // ForceSendFields is a list of field names (e.g. "Exclude") to diff --git a/networksecurity/v1/networksecurity-api.json b/networksecurity/v1/networksecurity-api.json index beb28730d93..b2b3c83b48a 100644 --- a/networksecurity/v1/networksecurity-api.json +++ b/networksecurity/v1/networksecurity-api.json @@ -1037,7 +1037,7 @@ } } }, - "revision": "20220503", + "revision": "20220707", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AuthorizationPolicy": { @@ -1166,7 +1166,7 @@ "id": "Destination", "properties": { "hosts": { - "description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example // *.myorg.com\") or a presence(any) match \"*\".", + "description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example \"*.myorg.com\") or a presence (any) match \"*\".", "items": { "type": "string" }, @@ -1243,7 +1243,7 @@ "id": "GoogleCloudNetworksecurityV1GrpcEndpoint", "properties": { "targetUri": { - "description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with “unix:”.", + "description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with \"unix:\".", "type": "string" } }, @@ -1395,7 +1395,7 @@ "type": "object" }, "HttpHeaderMatch": { - "description": "Specification of HTTP header match atrributes.", + "description": "Specification of HTTP header match attributes.", "id": "HttpHeaderMatch", "properties": { "headerName": { @@ -1705,7 +1705,7 @@ "type": "array" }, "principals": { - "description": "Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, \"namespace/*\") or a suffix match (example, // */service-account\") or a presence match \"*\". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.", + "description": "Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, \"namespace/*\") or a suffix match (example, \"*/service-account\") or a presence match \"*\". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.", "items": { "type": "string" }, diff --git a/networksecurity/v1/networksecurity-gen.go b/networksecurity/v1/networksecurity-gen.go index 0d730c250ff..d8a43bdd8c2 100644 --- a/networksecurity/v1/networksecurity-gen.go +++ b/networksecurity/v1/networksecurity-gen.go @@ -384,8 +384,8 @@ type Destination struct { // Hosts: Required. List of host names to match. Matched against the // ":authority" header in http requests. At least one host should match. // Each host can be an exact match, or a prefix match (example - // "mydomain.*") or a suffix match (example // *.myorg.com") or a - // presence(any) match "*". + // "mydomain.*") or a suffix match (example "*.myorg.com") or a presence + // (any) match "*". Hosts []string `json:"hosts,omitempty"` // HttpHeaderMatch: Optional. Match against key:value pair in http @@ -540,7 +540,7 @@ func (s *GoogleCloudNetworksecurityV1CertificateProvider) MarshalJSON() ([]byte, // Endpoint. type GoogleCloudNetworksecurityV1GrpcEndpoint struct { // TargetUri: Required. The target URI of the gRPC endpoint. Only UDS - // path is supported, and should start with “unix:”. + // path is supported, and should start with "unix:". TargetUri string `json:"targetUri,omitempty"` // ForceSendFields is a list of field names (e.g. "TargetUri") to @@ -951,7 +951,7 @@ func (s *GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpHeaderMatch: Specification of HTTP header match atrributes. +// HttpHeaderMatch: Specification of HTTP header match attributes. type HttpHeaderMatch struct { // HeaderName: Required. The name of the HTTP header to match. For // matching against the HTTP request's authority, use a headerMatch with @@ -1501,8 +1501,8 @@ type Source struct { // Principals: Optional. List of peer identities to match for // authorization. At least one principal should match. Each peer can be // an exact match, or a prefix match (example, "namespace/*") or a - // suffix match (example, // */service-account") or a presence match - // "*". Authorization based on the principal name without certificate + // suffix match (example, "*/service-account") or a presence match "*". + // Authorization based on the principal name without certificate // validation (configured by ServerTlsPolicy resource) is considered // insecure. Principals []string `json:"principals,omitempty"` diff --git a/networksecurity/v1beta1/networksecurity-api.json b/networksecurity/v1beta1/networksecurity-api.json index 4f61625a0b0..4de80784553 100644 --- a/networksecurity/v1beta1/networksecurity-api.json +++ b/networksecurity/v1beta1/networksecurity-api.json @@ -1037,7 +1037,7 @@ } } }, - "revision": "20220503", + "revision": "20220707", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AuthorizationPolicy": { @@ -1166,7 +1166,7 @@ "id": "Destination", "properties": { "hosts": { - "description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example // *.myorg.com\") or a presence(any) match \"*\".", + "description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example \"*.myorg.com\") or a presence (any) match \"*\".", "items": { "type": "string" }, @@ -1243,7 +1243,7 @@ "id": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", "properties": { "targetUri": { - "description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with “unix:”.", + "description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with \"unix:\".", "type": "string" } }, @@ -1395,7 +1395,7 @@ "type": "object" }, "HttpHeaderMatch": { - "description": "Specification of HTTP header match atrributes.", + "description": "Specification of HTTP header match attributes.", "id": "HttpHeaderMatch", "properties": { "headerName": { @@ -1705,7 +1705,7 @@ "type": "array" }, "principals": { - "description": "Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, \"namespace/*\") or a suffix match (example, // */service-account\") or a presence match \"*\". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.", + "description": "Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, \"namespace/*\") or a suffix match (example, \"*/service-account\") or a presence match \"*\". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.", "items": { "type": "string" }, diff --git a/networksecurity/v1beta1/networksecurity-gen.go b/networksecurity/v1beta1/networksecurity-gen.go index 54d50aa0d5b..eef391c11c4 100644 --- a/networksecurity/v1beta1/networksecurity-gen.go +++ b/networksecurity/v1beta1/networksecurity-gen.go @@ -384,8 +384,8 @@ type Destination struct { // Hosts: Required. List of host names to match. Matched against the // ":authority" header in http requests. At least one host should match. // Each host can be an exact match, or a prefix match (example - // "mydomain.*") or a suffix match (example // *.myorg.com") or a - // presence(any) match "*". + // "mydomain.*") or a suffix match (example "*.myorg.com") or a presence + // (any) match "*". Hosts []string `json:"hosts,omitempty"` // HttpHeaderMatch: Optional. Match against key:value pair in http @@ -540,7 +540,7 @@ func (s *GoogleCloudNetworksecurityV1beta1CertificateProvider) MarshalJSON() ([] // GRPC Endpoint. type GoogleCloudNetworksecurityV1beta1GrpcEndpoint struct { // TargetUri: Required. The target URI of the gRPC endpoint. Only UDS - // path is supported, and should start with “unix:”. + // path is supported, and should start with "unix:". TargetUri string `json:"targetUri,omitempty"` // ForceSendFields is a list of field names (e.g. "TargetUri") to @@ -951,7 +951,7 @@ func (s *GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// HttpHeaderMatch: Specification of HTTP header match atrributes. +// HttpHeaderMatch: Specification of HTTP header match attributes. type HttpHeaderMatch struct { // HeaderName: Required. The name of the HTTP header to match. For // matching against the HTTP request's authority, use a headerMatch with @@ -1501,8 +1501,8 @@ type Source struct { // Principals: Optional. List of peer identities to match for // authorization. At least one principal should match. Each peer can be // an exact match, or a prefix match (example, "namespace/*") or a - // suffix match (example, // */service-account") or a presence match - // "*". Authorization based on the principal name without certificate + // suffix match (example, "*/service-account") or a presence match "*". + // Authorization based on the principal name without certificate // validation (configured by ServerTlsPolicy resource) is considered // insecure. Principals []string `json:"principals,omitempty"` From 9e8aeece29778f75f6ace907ac26726d95a4d7a6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 19 Jul 2022 06:31:31 -0700 Subject: [PATCH 5/6] feat(all): auto-regenerate discovery clients (#1624) --- api-list.json | 8 +- .../v1/bigquerydatatransfer-api.json | 4 +- .../v1/bigquerydatatransfer-gen.go | 9 +- .../v1/certificatemanager-api.json | 23 +- .../v1/certificatemanager-gen.go | 46 -- chromepolicy/v1/chromepolicy-api.json | 68 ++- chromepolicy/v1/chromepolicy-gen.go | 301 +++++++++++++ content/v2.1/content-api.json | 44 +- content/v2.1/content-gen.go | 185 -------- dataplex/v1/dataplex-api.json | 64 +-- dataplex/v1/dataplex-gen.go | 115 ++--- documentai/v1/documentai-api.json | 6 +- documentai/v1/documentai-gen.go | 6 +- documentai/v1beta2/documentai-api.json | 6 +- documentai/v1beta2/documentai-gen.go | 6 +- documentai/v1beta3/documentai-api.json | 6 +- documentai/v1beta3/documentai-gen.go | 6 +- domains/v1alpha2/domains-api.json | 4 +- domains/v1alpha2/domains-gen.go | 6 +- securitycenter/v1/securitycenter-api.json | 296 ++++++++++++- securitycenter/v1/securitycenter-gen.go | 404 ++++++++++++++++- .../v1beta1/securitycenter-api.json | 296 ++++++++++++- securitycenter/v1beta1/securitycenter-gen.go | 404 ++++++++++++++++- .../v1beta2/securitycenter-api.json | 304 ++++++++++++- securitycenter/v1beta2/securitycenter-gen.go | 415 +++++++++++++++++- storagetransfer/v1/storagetransfer-api.json | 98 ++++- storagetransfer/v1/storagetransfer-gen.go | 147 ++++++- tpu/v1/tpu-api.json | 8 +- tpu/v1/tpu-gen.go | 7 +- tpu/v1alpha1/tpu-api.json | 8 +- tpu/v1alpha1/tpu-gen.go | 7 +- tpu/v2alpha1/tpu-api.json | 8 +- tpu/v2alpha1/tpu-gen.go | 7 +- 33 files changed, 2851 insertions(+), 471 deletions(-) diff --git a/api-list.json b/api-list.json index eca48c62249..0c01d3f443d 100644 --- a/api-list.json +++ b/api-list.json @@ -5578,13 +5578,13 @@ "name": "vmmigration", "version": "v1alpha1", "title": "VM Migration API", - "description": "Use the Migrate for Compute Engine API to programmatically migrate workloads.", + "description": "Use the Migrate to Virtual Machines API to programmatically migrate workloads.", "discoveryRestUrl": "https://vmmigration.googleapis.com/$discovery/rest?version=v1alpha1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, - "documentationLink": "https://cloud.google.com/migrate/compute-engine", + "documentationLink": "https://cloud.google.com/migrate/virtual-machines", "preferred": false }, { @@ -5593,13 +5593,13 @@ "name": "vmmigration", "version": "v1", "title": "VM Migration API", - "description": "Use the Migrate for Compute Engine API to programmatically migrate workloads.", + "description": "Use the Migrate to Virtual Machines API to programmatically migrate workloads.", "discoveryRestUrl": "https://vmmigration.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" }, - "documentationLink": "https://cloud.google.com/migrate/compute-engine", + "documentationLink": "https://cloud.google.com/migrate/virtual-machines", "preferred": true }, { diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json index d6989b8b523..b9f26aab8ef 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json @@ -1340,7 +1340,7 @@ } } }, - "revision": "20220409", + "revision": "20220709", "rootUrl": "https://bigquerydatatransfer.googleapis.com/", "schemas": { "CheckValidCredsRequest": { @@ -1876,7 +1876,7 @@ "type": "integer" }, "dataSourceId": { - "description": "Data source id. Cannot be changed once data transfer is created.", + "description": "Data source id. Cannot be changed once data transfer is created. The full list of available data source ids can be returned through API call: https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list The individual data source id can also be found in the bq tab in the 'Setting up a data transfer' section for each data source. For example, the data source id for Cloud Storage transfers is listed here: https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq", "type": "string" }, "datasetRegion": { diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go index dbb9e68a1da..e4759f25e4b 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go @@ -1140,7 +1140,14 @@ type TransferConfig struct { DataRefreshWindowDays int64 `json:"dataRefreshWindowDays,omitempty"` // DataSourceId: Data source id. Cannot be changed once data transfer is - // created. + // created. The full list of available data source ids can be returned + // through API call: + // https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list + // The individual data source id can also be found in the bq tab in the + // 'Setting up a data transfer' section for each data source. For + // example, the data source id for Cloud Storage transfers is listed + // here: + // https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq DataSourceId string `json:"dataSourceId,omitempty"` // DatasetRegion: Output only. Region in which BigQuery dataset is diff --git a/certificatemanager/v1/certificatemanager-api.json b/certificatemanager/v1/certificatemanager-api.json index 6f064ea2206..234c4087bba 100644 --- a/certificatemanager/v1/certificatemanager-api.json +++ b/certificatemanager/v1/certificatemanager-api.json @@ -975,7 +975,7 @@ } } }, - "revision": "20220602", + "revision": "20220707", "rootUrl": "https://certificatemanager.googleapis.com/", "schemas": { "AuthorizationAttemptInfo": { @@ -1648,27 +1648,6 @@ }, "type": "object" }, - "ResourcesCount": { - "description": "ResourcesCount represents the resource that stores aggregated project's info in the given location, e.g.: total number of certificates assigned to the project.", - "id": "ResourcesCount", - "properties": { - "certificates": { - "description": "The count of certificates.", - "format": "uint64", - "type": "string" - }, - "computeTime": { - "description": "Required. Input only. The time of the computation. The field is input only, used in Create and Update calls. For Update call, new values of selected resources are set if their compute_time is younger than the persisted ones, e.g.: If you support 3 types of resources: A, B and C, and you have: 'A' resource count computed at timestamp = 3 'B' resource count computed at timestamp = 10 'C' resource count computed at timestamp = 5 And you're going to update all of them with compute_time = 8, only 'A' and 'C' will be updated, as 'B' already has fresher data. For Get call a ResourcesCount instance contains the freshest values for every type.", - "format": "google-datetime", - "type": "string" - }, - "name": { - "description": "The singleton resource of the resources count. Must be in the format `projects/*/locations/*/resourcesCounts/single`.", - "type": "string" - } - }, - "type": "object" - }, "SelfManagedCertificate": { "description": "Certificate data for a SelfManaged Certificate. SelfManaged Certificates are uploaded by the user. Updating such certificates before they expire remains the user's responsibility.", "id": "SelfManagedCertificate", diff --git a/certificatemanager/v1/certificatemanager-gen.go b/certificatemanager/v1/certificatemanager-gen.go index 5c783c9e327..f931ec48bcc 100644 --- a/certificatemanager/v1/certificatemanager-gen.go +++ b/certificatemanager/v1/certificatemanager-gen.go @@ -1183,52 +1183,6 @@ func (s *ProvisioningIssue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourcesCount: ResourcesCount represents the resource that stores -// aggregated project's info in the given location, e.g.: total number -// of certificates assigned to the project. -type ResourcesCount struct { - // Certificates: The count of certificates. - Certificates uint64 `json:"certificates,omitempty,string"` - - // ComputeTime: Required. Input only. The time of the computation. The - // field is input only, used in Create and Update calls. For Update - // call, new values of selected resources are set if their compute_time - // is younger than the persisted ones, e.g.: If you support 3 types of - // resources: A, B and C, and you have: 'A' resource count computed at - // timestamp = 3 'B' resource count computed at timestamp = 10 'C' - // resource count computed at timestamp = 5 And you're going to update - // all of them with compute_time = 8, only 'A' and 'C' will be updated, - // as 'B' already has fresher data. For Get call a ResourcesCount - // instance contains the freshest values for every type. - ComputeTime string `json:"computeTime,omitempty"` - - // Name: The singleton resource of the resources count. Must be in the - // format `projects/*/locations/*/resourcesCounts/single`. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Certificates") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Certificates") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *ResourcesCount) MarshalJSON() ([]byte, error) { - type NoMethod ResourcesCount - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // SelfManagedCertificate: Certificate data for a SelfManaged // Certificate. SelfManaged Certificates are uploaded by the user. // Updating such certificates before they expire remains the user's diff --git a/chromepolicy/v1/chromepolicy-api.json b/chromepolicy/v1/chromepolicy-api.json index 7917c422d16..9ec9f1794a6 100644 --- a/chromepolicy/v1/chromepolicy-api.json +++ b/chromepolicy/v1/chromepolicy-api.json @@ -278,9 +278,53 @@ } } } + }, + "media": { + "methods": { + "upload": { + "description": "Creates an enterprise file from the content provided by user. Returns a public download url for end user.", + "flatPath": "v1/customers/{customersId}/policies/files:uploadPolicyFile", + "httpMethod": "POST", + "id": "chromepolicy.media.upload", + "mediaUpload": { + "accept": [ + "*/*" + ], + "protocols": { + "simple": { + "multipart": true, + "path": "/upload/v1/{+customer}/policies/files:uploadPolicyFile" + } + } + }, + "parameterOrder": [ + "customer" + ], + "parameters": { + "customer": { + "description": "Required. The customer for which the file upload will apply.", + "location": "path", + "pattern": "^customers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+customer}/policies/files:uploadPolicyFile", + "request": { + "$ref": "GoogleChromePolicyV1UploadPolicyFileRequest" + }, + "response": { + "$ref": "GoogleChromePolicyV1UploadPolicyFileResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/chrome.management.policy" + ], + "supportsMediaUpload": true + } + } } }, - "revision": "20220706", + "revision": "20220718", "rootUrl": "https://chromepolicy.googleapis.com/", "schemas": { "ChromeCrosDpanelAutosettingsProtoPolicyApiLifecycle": { @@ -736,6 +780,28 @@ }, "type": "object" }, + "GoogleChromePolicyV1UploadPolicyFileRequest": { + "description": "Request message for uploading a file for a policy. Next ID: 5", + "id": "GoogleChromePolicyV1UploadPolicyFileRequest", + "properties": { + "policyField": { + "description": "Required. The fully qualified policy schema and field name this file is uploaded for. This information will be used to validate the content type of the file.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleChromePolicyV1UploadPolicyFileResponse": { + "description": "Response message for downloading an uploaded file. Next ID: 2", + "id": "GoogleChromePolicyV1UploadPolicyFileResponse", + "properties": { + "downloadUri": { + "description": "The uri for end user to download the file.", + "type": "string" + } + }, + "type": "object" + }, "GoogleProtobufEmpty": { "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": "GoogleProtobufEmpty", diff --git a/chromepolicy/v1/chromepolicy-gen.go b/chromepolicy/v1/chromepolicy-gen.go index 9a36894b462..3c7732021d4 100644 --- a/chromepolicy/v1/chromepolicy-gen.go +++ b/chromepolicy/v1/chromepolicy-gen.go @@ -128,6 +128,7 @@ func New(client *http.Client) (*Service, error) { } s := &Service{client: client, BasePath: basePath} s.Customers = NewCustomersService(s) + s.Media = NewMediaService(s) return s, nil } @@ -137,6 +138,8 @@ type Service struct { UserAgent string // optional additional User-Agent fragment Customers *CustomersService + + Media *MediaService } func (s *Service) userAgent() string { @@ -191,6 +194,15 @@ type CustomersPolicySchemasService struct { s *Service } +func NewMediaService(s *Service) *MediaService { + rs := &MediaService{s: s} + return rs +} + +type MediaService struct { + s *Service +} + type ChromeCrosDpanelAutosettingsProtoPolicyApiLifecycle struct { // Description: Description about current life cycle. Description string `json:"description,omitempty"` @@ -960,6 +972,70 @@ func (s *GoogleChromePolicyV1ResolvedPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromePolicyV1UploadPolicyFileRequest: Request message for +// uploading a file for a policy. Next ID: 5 +type GoogleChromePolicyV1UploadPolicyFileRequest struct { + // PolicyField: Required. The fully qualified policy schema and field + // name this file is uploaded for. This information will be used to + // validate the content type of the file. + PolicyField string `json:"policyField,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PolicyField") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PolicyField") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromePolicyV1UploadPolicyFileRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromePolicyV1UploadPolicyFileRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleChromePolicyV1UploadPolicyFileResponse: Response message for +// downloading an uploaded file. Next ID: 2 +type GoogleChromePolicyV1UploadPolicyFileResponse struct { + // DownloadUri: The uri for end user to download the file. + DownloadUri string `json:"downloadUri,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DownloadUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DownloadUri") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromePolicyV1UploadPolicyFileResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromePolicyV1UploadPolicyFileResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleProtobufEmpty: 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 @@ -2109,3 +2185,228 @@ func (c *CustomersPolicySchemasListCall) Pages(ctx context.Context, f func(*Goog c.PageToken(x.NextPageToken) } } + +// method id "chromepolicy.media.upload": + +type MediaUploadCall struct { + s *Service + customer string + googlechromepolicyv1uploadpolicyfilerequest *GoogleChromePolicyV1UploadPolicyFileRequest + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header +} + +// Upload: Creates an enterprise file from the content provided by user. +// Returns a public download url for end user. +// +// - customer: The customer for which the file upload will apply. +func (r *MediaService) Upload(customer string, googlechromepolicyv1uploadpolicyfilerequest *GoogleChromePolicyV1UploadPolicyFileRequest) *MediaUploadCall { + c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.customer = customer + c.googlechromepolicyv1uploadpolicyfilerequest = googlechromepolicyv1uploadpolicyfilerequest + return c +} + +// Media specifies the media to upload in one or more chunks. The chunk +// size may be controlled by supplying a MediaOption generated by +// googleapi.ChunkSize. The chunk size defaults to +// googleapi.DefaultUploadChunkSize.The Content-Type header used in the +// upload request will be determined by sniffing the contents of r, +// unless a MediaOption generated by googleapi.ContentType is +// supplied. +// At most one of Media and ResumableMedia may be set. +func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) + return c +} + +// ResumableMedia specifies the media to upload in chunks and can be +// canceled with ctx. +// +// Deprecated: use Media instead. +// +// At most one of Media and ResumableMedia may be set. mediaType +// identifies the MIME media type of the upload, such as "image/png". If +// mediaType is "", it will be auto-detected. The provided ctx will +// supersede any context previously provided to the Context method. +func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { + c.ctx_ = ctx + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) + return c +} + +// ProgressUpdater provides a callback function that will be called +// after every chunk. It should be a low-latency function in order to +// not slow down the upload operation. This should only be called when +// using ResumableMedia (as opposed to Media). +func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { + c.mediaInfo_.SetProgressUpdater(pu) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +// This context will supersede any context previously provided to the +// ResumableMedia method. +func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *MediaUploadCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlechromepolicyv1uploadpolicyfilerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+customer}/policies/files:uploadPolicyFile") + if c.mediaInfo_ != nil { + urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+customer}/policies/files:uploadPolicyFile") + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) + } + if body == nil { + body = new(bytes.Buffer) + reqHeaders.Set("Content-Type", "application/json") + } + body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + req.GetBody = getBody + googleapi.Expand(req.URL, map[string]string{ + "customer": c.customer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "chromepolicy.media.upload" call. +// Exactly one of *GoogleChromePolicyV1UploadPolicyFileResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleChromePolicyV1UploadPolicyFileResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleChromePolicyV1UploadPolicyFileResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() + ctx := c.ctx_ + if ctx == nil { + ctx = context.TODO() + } + res, err = rx.Upload(ctx) + if err != nil { + return nil, err + } + defer res.Body.Close() + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + } + ret := &GoogleChromePolicyV1UploadPolicyFileResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an enterprise file from the content provided by user. Returns a public download url for end user.", + // "flatPath": "v1/customers/{customersId}/policies/files:uploadPolicyFile", + // "httpMethod": "POST", + // "id": "chromepolicy.media.upload", + // "mediaUpload": { + // "accept": [ + // "*/*" + // ], + // "protocols": { + // "simple": { + // "multipart": true, + // "path": "/upload/v1/{+customer}/policies/files:uploadPolicyFile" + // } + // } + // }, + // "parameterOrder": [ + // "customer" + // ], + // "parameters": { + // "customer": { + // "description": "Required. The customer for which the file upload will apply.", + // "location": "path", + // "pattern": "^customers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+customer}/policies/files:uploadPolicyFile", + // "request": { + // "$ref": "GoogleChromePolicyV1UploadPolicyFileRequest" + // }, + // "response": { + // "$ref": "GoogleChromePolicyV1UploadPolicyFileResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/chrome.management.policy" + // ], + // "supportsMediaUpload": true + // } + +} diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index c7f464e353d..5dfaeaac3a4 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -973,48 +973,6 @@ } } }, - "accountstatusesbyexternalsellerid": { - "methods": { - "get": { - "description": "Gets status of the account with the specified external_seller_id belonging to the MCA with the specified merchant_id.", - "flatPath": "{merchantId}/accountstatusesbyexternalsellerid/{externalSellerId}", - "httpMethod": "GET", - "id": "content.accountstatusesbyexternalsellerid.get", - "parameterOrder": [ - "merchantId", - "externalSellerId" - ], - "parameters": { - "destinations": { - "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", - "location": "query", - "repeated": true, - "type": "string" - }, - "externalSellerId": { - "description": "Required. The External Seller ID of the seller account to be retrieved.", - "location": "path", - "required": true, - "type": "string" - }, - "merchantId": { - "description": "Required. The ID of the MCA containing the seller.", - "format": "int64", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "{merchantId}/accountstatusesbyexternalsellerid/{externalSellerId}", - "response": { - "$ref": "AccountStatus" - }, - "scopes": [ - "https://www.googleapis.com/auth/content" - ] - } - } - }, "accounttax": { "methods": { "custombatch": { @@ -5950,7 +5908,7 @@ } } }, - "revision": "20220701", + "revision": "20220713", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 2efc91845d7..6b51da9f200 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -119,7 +119,6 @@ func New(client *http.Client) (*APIService, error) { s := &APIService{client: client, BasePath: basePath} s.Accounts = NewAccountsService(s) s.Accountstatuses = NewAccountstatusesService(s) - s.Accountstatusesbyexternalsellerid = NewAccountstatusesbyexternalselleridService(s) s.Accounttax = NewAccounttaxService(s) s.Buyongoogleprograms = NewBuyongoogleprogramsService(s) s.Collections = NewCollectionsService(s) @@ -164,8 +163,6 @@ type APIService struct { Accountstatuses *AccountstatusesService - Accountstatusesbyexternalsellerid *AccountstatusesbyexternalselleridService - Accounttax *AccounttaxService Buyongoogleprograms *BuyongoogleprogramsService @@ -292,15 +289,6 @@ type AccountstatusesService struct { s *APIService } -func NewAccountstatusesbyexternalselleridService(s *APIService) *AccountstatusesbyexternalselleridService { - rs := &AccountstatusesbyexternalselleridService{s: s} - return rs -} - -type AccountstatusesbyexternalselleridService struct { - s *APIService -} - func NewAccounttaxService(s *APIService) *AccounttaxService { rs := &AccounttaxService{s: s} return rs @@ -22343,179 +22331,6 @@ func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*Accountstat } } -// method id "content.accountstatusesbyexternalsellerid.get": - -type AccountstatusesbyexternalselleridGetCall struct { - s *APIService - merchantId int64 - externalSellerId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets status of the account with the specified external_seller_id -// belonging to the MCA with the specified merchant_id. -// -// - externalSellerId: The External Seller ID of the seller account to -// be retrieved. -// - merchantId: The ID of the MCA containing the seller. -func (r *AccountstatusesbyexternalselleridService) Get(merchantId int64, externalSellerId string) *AccountstatusesbyexternalselleridGetCall { - c := &AccountstatusesbyexternalselleridGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.merchantId = merchantId - c.externalSellerId = externalSellerId - return c -} - -// Destinations sets the optional parameter "destinations": If set, only -// issues for the specified destinations are returned, otherwise only -// issues for the Shopping destination. -func (c *AccountstatusesbyexternalselleridGetCall) Destinations(destinations ...string) *AccountstatusesbyexternalselleridGetCall { - c.urlParams_.SetMulti("destinations", append([]string{}, destinations...)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *AccountstatusesbyexternalselleridGetCall) Fields(s ...googleapi.Field) *AccountstatusesbyexternalselleridGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *AccountstatusesbyexternalselleridGetCall) IfNoneMatch(entityTag string) *AccountstatusesbyexternalselleridGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *AccountstatusesbyexternalselleridGetCall) Context(ctx context.Context) *AccountstatusesbyexternalselleridGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *AccountstatusesbyexternalselleridGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *AccountstatusesbyexternalselleridGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatusesbyexternalsellerid/{externalSellerId}") - 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{ - "merchantId": strconv.FormatInt(c.merchantId, 10), - "externalSellerId": c.externalSellerId, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "content.accountstatusesbyexternalsellerid.get" call. -// Exactly one of *AccountStatus or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AccountStatus.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *AccountstatusesbyexternalselleridGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - } - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, err - } - ret := &AccountStatus{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets status of the account with the specified external_seller_id belonging to the MCA with the specified merchant_id.", - // "flatPath": "{merchantId}/accountstatusesbyexternalsellerid/{externalSellerId}", - // "httpMethod": "GET", - // "id": "content.accountstatusesbyexternalsellerid.get", - // "parameterOrder": [ - // "merchantId", - // "externalSellerId" - // ], - // "parameters": { - // "destinations": { - // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "externalSellerId": { - // "description": "Required. The External Seller ID of the seller account to be retrieved.", - // "location": "path", - // "required": true, - // "type": "string" - // }, - // "merchantId": { - // "description": "Required. The ID of the MCA containing the seller.", - // "format": "int64", - // "location": "path", - // "required": true, - // "type": "string" - // } - // }, - // "path": "{merchantId}/accountstatusesbyexternalsellerid/{externalSellerId}", - // "response": { - // "$ref": "AccountStatus" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/content" - // ] - // } - -} - // method id "content.accounttax.custombatch": type AccounttaxCustombatchCall struct { diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index 06f37994785..0571d059d72 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -227,7 +227,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", "required": true, @@ -252,7 +252,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", "required": true, @@ -464,7 +464,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", "required": true, @@ -1036,7 +1036,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", "required": true, @@ -1069,7 +1069,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`", + "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", "required": true, @@ -1094,7 +1094,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}", + "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", "required": true, @@ -1171,7 +1171,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", "required": true, @@ -1311,7 +1311,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}", + "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", "required": true, @@ -1342,7 +1342,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", "required": true, @@ -1380,7 +1380,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /task/{task_id}`", + "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", "required": true, @@ -1405,7 +1405,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /tasks/{tasks_id}", + "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", "required": true, @@ -1482,7 +1482,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", "required": true, @@ -1606,7 +1606,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /task/{task_id}/job/{job_id}`", + "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+$", "required": true, @@ -1634,7 +1634,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /tasks/{task_id}/jobs/{job_id}", + "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+$", "required": true, @@ -1670,7 +1670,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}", + "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", "required": true, @@ -1701,7 +1701,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", "required": true, @@ -1739,7 +1739,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", "required": true, @@ -1764,7 +1764,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}", + "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", "required": true, @@ -1841,7 +1841,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", "required": true, @@ -1976,7 +1976,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}", + "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", "required": true, @@ -2010,7 +2010,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", "required": true, @@ -2043,7 +2043,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}/assets/{asset_id}", + "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", "required": true, @@ -2068,7 +2068,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}/assets/{asset_id}", + "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", "required": true, @@ -2145,7 +2145,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", "required": true, @@ -2280,7 +2280,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the parent asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}", + "description": "Required. The resource name of the parent asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", "required": true, @@ -2764,7 +2764,7 @@ } } }, - "revision": "20220531", + "revision": "20220711", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -3921,12 +3921,12 @@ "type": "string" }, "name": { - "description": "Output only. The relative resource name of the job, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ tasks/{task_id}/jobs/{job_id}.", + "description": "Output only. The relative resource name of the job, of the form: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}.", "readOnly": true, "type": "string" }, "retryCount": { - "description": "Output only. . The number of times the job has been retried (excluding the initial attempt).", + "description": "Output only. The number of times the job has been retried (excluding the initial attempt).", "format": "uint32", "readOnly": true, "type": "integer" @@ -4962,6 +4962,10 @@ "description": "Optional. The arguments to pass to the task. The args can use placeholders of the format ${placeholder} as part of key/value string. These will be interpolated before passing the args to the driver. Currently supported placeholders: - ${task_id} - ${job_time} To pass positional args, set the key as TASK_ARGS. The value should be a comma-separated string of all the positional arguments. To use a delimiter other than comma, refer to https://cloud.google.com/sdk/gcloud/reference/topic/escaping. In case of other keys being present in the args, then TASK_ARGS will be passed as the last argument.", "type": "object" }, + "kmsKey": { + "description": "Optional. The Cloud KMS key to use for encryption, of the form: projects/{project_number}/locations/{location_id}/keyRings/{key-ring-name}/cryptoKeys/{key-name}.", + "type": "string" + }, "maxJobExecutionLifetime": { "description": "Optional. The maximum duration after which the job execution is expired.", "format": "google-duration", @@ -5036,6 +5040,10 @@ "description": "Container Image Runtime Configuration used with Batch execution.", "id": "GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime", "properties": { + "image": { + "description": "Optional. Container image to use.", + "type": "string" + }, "javaJars": { "description": "Optional. A list of Java JARS to add to the classpath. Valid input includes Cloud Storage URIs to Jar binaries. For example, gs://bucket-name/my/path/to/file.jar", "items": { diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index babf2b05da4..8efcab7be95 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -1964,12 +1964,12 @@ type GoogleCloudDataplexV1Job struct { // Name: Output only. The relative resource name of the job, of the // form: - // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ - // tasks/{task_id}/jobs/{job_id}. + // projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task + // s/{task_id}/jobs/{job_id}. Name string `json:"name,omitempty"` - // RetryCount: Output only. . The number of times the job has been - // retried (excluding the initial attempt). + // RetryCount: Output only. The number of times the job has been retried + // (excluding the initial attempt). RetryCount int64 `json:"retryCount,omitempty"` // Service: Output only. The underlying service running a job. @@ -3341,6 +3341,12 @@ type GoogleCloudDataplexV1TaskExecutionSpec struct { // passed as the last argument. Args map[string]string `json:"args,omitempty"` + // KmsKey: Optional. The Cloud KMS key to use for encryption, of the + // form: + // projects/{project_number}/locations/{location_id}/keyRings/{key-ring-n + // ame}/cryptoKeys/{key-name}. + KmsKey string `json:"kmsKey,omitempty"` + // MaxJobExecutionLifetime: Optional. The maximum duration after which // the job execution is expired. MaxJobExecutionLifetime string `json:"maxJobExecutionLifetime,omitempty"` @@ -3485,6 +3491,9 @@ func (s *GoogleCloudDataplexV1TaskInfrastructureSpecBatchComputeResources) Marsh // GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime: // Container Image Runtime Configuration used with Batch execution. type GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime struct { + // Image: Optional. Container image to use. + Image string `json:"image,omitempty"` + // JavaJars: Optional. A list of Java JARS to add to the classpath. // Valid input includes Cloud Storage URIs to Jar binaries. For example, // gs://bucket-name/my/path/to/file.jar @@ -3503,7 +3512,7 @@ type GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime struct { // For example, gs://bucket-name/my/path/to/lib.tar.gz PythonPackages []string `json:"pythonPackages,omitempty"` - // ForceSendFields is a list of field names (e.g. "JavaJars") to + // ForceSendFields is a list of field names (e.g. "Image") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3511,8 +3520,8 @@ type GoogleCloudDataplexV1TaskInfrastructureSpecContainerImageRuntime struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JavaJars") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Image") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5285,7 +5294,7 @@ func (c *ProjectsLocationsLakesDeleteCall) Do(opts ...googleapi.CallOption) (*Go // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, @@ -5432,7 +5441,7 @@ func (c *ProjectsLocationsLakesGetCall) Do(opts ...googleapi.CallOption) (*Googl // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "description": "Required. The resource name of the lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, @@ -6476,7 +6485,7 @@ func (c *ProjectsLocationsLakesActionsListCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, @@ -9312,7 +9321,7 @@ func (c *ProjectsLocationsLakesEnvironmentsCreateCall) Do(opts ...googleapi.Call // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, @@ -9353,7 +9362,7 @@ type ProjectsLocationsLakesEnvironmentsDeleteCall struct { // // - name: The resource name of the environment: // projects/{project_id}/locations/{location_id}/lakes/{lake_id}/enviro -// nments/{environment_id}`. +// nments/{environment_id}. func (r *ProjectsLocationsLakesEnvironmentsService) Delete(name string) *ProjectsLocationsLakesEnvironmentsDeleteCall { c := &ProjectsLocationsLakesEnvironmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -9455,7 +9464,7 @@ func (c *ProjectsLocationsLakesEnvironmentsDeleteCall) Do(opts ...googleapi.Call // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`", + // "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", // "required": true, @@ -9603,7 +9612,7 @@ func (c *ProjectsLocationsLakesEnvironmentsGetCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}", + // "description": "Required. The resource name of the environment: projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", // "required": true, @@ -9980,7 +9989,7 @@ func (c *ProjectsLocationsLakesEnvironmentsListCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}", + // "description": "Required. The resource name of the parent lake: projects/{project_id}/locations/{location_id}/lakes/{lake_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, @@ -10667,7 +10676,7 @@ func (c *ProjectsLocationsLakesEnvironmentsSessionsListCall) Do(opts ...googleap // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}", + // "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/environments/[^/]+$", // "required": true, @@ -10843,7 +10852,7 @@ func (c *ProjectsLocationsLakesTasksCreateCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, @@ -10887,8 +10896,8 @@ type ProjectsLocationsLakesTasksDeleteCall struct { // Delete: Delete the task resource. // // - name: The resource name of the task: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /task/{task_id}`. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ta +// sk/{task_id}. func (r *ProjectsLocationsLakesTasksService) Delete(name string) *ProjectsLocationsLakesTasksDeleteCall { c := &ProjectsLocationsLakesTasksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -10990,7 +10999,7 @@ func (c *ProjectsLocationsLakesTasksDeleteCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /task/{task_id}`", + // "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", // "required": true, @@ -11022,8 +11031,8 @@ type ProjectsLocationsLakesTasksGetCall struct { // Get: Get task resource. // // - name: The resource name of the task: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /tasks/{tasks_id}. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ta +// sks/{tasks_id}. func (r *ProjectsLocationsLakesTasksService) Get(name string) *ProjectsLocationsLakesTasksGetCall { c := &ProjectsLocationsLakesTasksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -11138,7 +11147,7 @@ func (c *ProjectsLocationsLakesTasksGetCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /tasks/{tasks_id}", + // "description": "Required. The resource name of the task: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", // "required": true, @@ -11513,7 +11522,7 @@ func (c *ProjectsLocationsLakesTasksListCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, @@ -12035,8 +12044,8 @@ type ProjectsLocationsLakesTasksJobsCancelCall struct { // Cancel: Cancel jobs running for the task resource. // // - name: The resource name of the job: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /task/{task_id}/job/{job_id}`. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ta +// sk/{task_id}/job/{job_id}. func (r *ProjectsLocationsLakesTasksJobsService) Cancel(name string, googleclouddataplexv1canceljobrequest *GoogleCloudDataplexV1CancelJobRequest) *ProjectsLocationsLakesTasksJobsCancelCall { c := &ProjectsLocationsLakesTasksJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -12144,7 +12153,7 @@ func (c *ProjectsLocationsLakesTasksJobsCancelCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /task/{task_id}/job/{job_id}`", + // "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+$", // "required": true, @@ -12179,8 +12188,8 @@ type ProjectsLocationsLakesTasksJobsGetCall struct { // Get: Get job resource. // // - name: The resource name of the job: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /tasks/{task_id}/jobs/{job_id}. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/ta +// sks/{task_id}/jobs/{job_id}. func (r *ProjectsLocationsLakesTasksJobsService) Get(name string) *ProjectsLocationsLakesTasksJobsGetCall { c := &ProjectsLocationsLakesTasksJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -12295,7 +12304,7 @@ func (c *ProjectsLocationsLakesTasksJobsGetCall) Do(opts ...googleapi.CallOption // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /tasks/{task_id}/jobs/{job_id}", + // "description": "Required. The resource name of the job: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+/jobs/[^/]+$", // "required": true, @@ -12473,7 +12482,7 @@ func (c *ProjectsLocationsLakesTasksJobsListCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}", + // "description": "Required. The resource name of the parent environment: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/tasks/[^/]+$", // "required": true, @@ -12655,7 +12664,7 @@ func (c *ProjectsLocationsLakesZonesCreateCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, @@ -12700,8 +12709,8 @@ type ProjectsLocationsLakesZonesDeleteCall struct { // deleted before the zone can be deleted. // // - name: The resource name of the zone: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /zones/{zone_id}`. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_id}. func (r *ProjectsLocationsLakesZonesService) Delete(name string) *ProjectsLocationsLakesZonesDeleteCall { c := &ProjectsLocationsLakesZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -12803,7 +12812,7 @@ func (c *ProjectsLocationsLakesZonesDeleteCall) Do(opts ...googleapi.CallOption) // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + // "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", // "required": true, @@ -12835,8 +12844,8 @@ type ProjectsLocationsLakesZonesGetCall struct { // Get: Retrieves a zone resource. // // - name: The resource name of the zone: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /zones/{zone_id}. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_id}. func (r *ProjectsLocationsLakesZonesService) Get(name string) *ProjectsLocationsLakesZonesGetCall { c := &ProjectsLocationsLakesZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -12951,7 +12960,7 @@ func (c *ProjectsLocationsLakesZonesGetCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}", + // "description": "Required. The resource name of the zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", // "required": true, @@ -13326,7 +13335,7 @@ func (c *ProjectsLocationsLakesZonesListCall) Do(opts ...googleapi.CallOption) ( // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}", + // "description": "Required. The resource name of the parent lake: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+$", // "required": true, @@ -13996,7 +14005,7 @@ func (c *ProjectsLocationsLakesZonesActionsListCall) Do(opts ...googleapi.CallOp // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}", + // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", // "required": true, @@ -14049,8 +14058,8 @@ type ProjectsLocationsLakesZonesAssetsCreateCall struct { // Create: Creates an asset resource. // // - parent: The resource name of the parent zone: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /zones/{zone_id}`. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_id}. func (r *ProjectsLocationsLakesZonesAssetsService) Create(parent string, googleclouddataplexv1asset *GoogleCloudDataplexV1Asset) *ProjectsLocationsLakesZonesAssetsCreateCall { c := &ProjectsLocationsLakesZonesAssetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -14182,7 +14191,7 @@ func (c *ProjectsLocationsLakesZonesAssetsCreateCall) Do(opts ...googleapi.CallO // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", // "required": true, @@ -14223,8 +14232,8 @@ type ProjectsLocationsLakesZonesAssetsDeleteCall struct { // policy. // // - name: The resource name of the asset: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /zones/{zone_id}/assets/{asset_id}. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_id}/assets/{asset_id}. func (r *ProjectsLocationsLakesZonesAssetsService) Delete(name string) *ProjectsLocationsLakesZonesAssetsDeleteCall { c := &ProjectsLocationsLakesZonesAssetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -14326,7 +14335,7 @@ func (c *ProjectsLocationsLakesZonesAssetsDeleteCall) Do(opts ...googleapi.CallO // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}/assets/{asset_id}", + // "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", // "required": true, @@ -14358,8 +14367,8 @@ type ProjectsLocationsLakesZonesAssetsGetCall struct { // Get: Retrieves an asset resource. // // - name: The resource name of the asset: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /zones/{zone_id}/assets/{asset_id}. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_id}/assets/{asset_id}. func (r *ProjectsLocationsLakesZonesAssetsService) Get(name string) *ProjectsLocationsLakesZonesAssetsGetCall { c := &ProjectsLocationsLakesZonesAssetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -14474,7 +14483,7 @@ func (c *ProjectsLocationsLakesZonesAssetsGetCall) Do(opts ...googleapi.CallOpti // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}/assets/{asset_id}", + // "description": "Required. The resource name of the asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", // "required": true, @@ -14681,8 +14690,8 @@ type ProjectsLocationsLakesZonesAssetsListCall struct { // List: Lists asset resources in a zone. // // - parent: The resource name of the parent zone: -// projects/{project_number}/locations/{location_id}/lakes/{lake_id} -// /zones/{zone_id}`. +// projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zo +// nes/{zone_id}. func (r *ProjectsLocationsLakesZonesAssetsService) List(parent string) *ProjectsLocationsLakesZonesAssetsListCall { c := &ProjectsLocationsLakesZonesAssetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -14850,7 +14859,7 @@ func (c *ProjectsLocationsLakesZonesAssetsListCall) Do(opts ...googleapi.CallOpt // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id} /zones/{zone_id}`", + // "description": "Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+$", // "required": true, @@ -15520,7 +15529,7 @@ func (c *ProjectsLocationsLakesZonesAssetsActionsListCall) Do(opts ...googleapi. // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the parent asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}", + // "description": "Required. The resource name of the parent asset: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/lakes/[^/]+/zones/[^/]+/assets/[^/]+$", // "required": true, diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index fb4d7d234ad..e4b55ecdd7c 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1069,7 +1069,7 @@ } } }, - "revision": "20220711", + "revision": "20220713", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1748,7 +1748,7 @@ }, "status": { "$ref": "GoogleRpcStatus", - "description": "The status of the processing of the document." + "description": "The error encountered while attempting to process the document. Empty if there are no errors." } }, "type": "object" @@ -6298,7 +6298,7 @@ }, "status": { "$ref": "GoogleRpcStatus", - "description": "The status of the processing of the document." + "description": "The error encountered while attempting to process the document. Empty if there are no errors." } }, "type": "object" diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index a1d29f00d4a..06284aa3945 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -1570,7 +1570,8 @@ type GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus struct { // successful, otherwise empty. OutputGcsDestination string `json:"outputGcsDestination,omitempty"` - // Status: The status of the processing of the document. + // Status: The error encountered while attempting to process the + // document. Empty if there are no errors. Status *GoogleRpcStatus `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "HumanReviewStatus") @@ -9009,7 +9010,8 @@ type GoogleCloudDocumentaiV1beta3BatchProcessMetadataIndividualProcessStatus str // successful, otherwise empty. OutputGcsDestination string `json:"outputGcsDestination,omitempty"` - // Status: The status of the processing of the document. + // Status: The error encountered while attempting to process the + // document. Empty if there are no errors. Status *GoogleRpcStatus `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index da82b627b25..471ca0ba2ad 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20220711", + "revision": "20220713", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -937,7 +937,7 @@ }, "status": { "$ref": "GoogleRpcStatus", - "description": "The status of the processing of the document." + "description": "The error encountered while attempting to process the document. Empty if there are no errors." } }, "type": "object" @@ -3981,7 +3981,7 @@ }, "status": { "$ref": "GoogleRpcStatus", - "description": "The status of the processing of the document." + "description": "The error encountered while attempting to process the document. Empty if there are no errors." } }, "type": "object" diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 11a45e9b970..57d93f868ca 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -1406,7 +1406,8 @@ type GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus struct { // successful, otherwise empty. OutputGcsDestination string `json:"outputGcsDestination,omitempty"` - // Status: The status of the processing of the document. + // Status: The error encountered while attempting to process the + // document. Empty if there are no errors. Status *GoogleRpcStatus `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "HumanReviewStatus") @@ -6434,7 +6435,8 @@ type GoogleCloudDocumentaiV1beta3BatchProcessMetadataIndividualProcessStatus str // successful, otherwise empty. OutputGcsDestination string `json:"outputGcsDestination,omitempty"` - // Status: The status of the processing of the document. + // Status: The error encountered while attempting to process the + // document. Empty if there are no errors. Status *GoogleRpcStatus `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index 2c846a664b2..2ad029e2998 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -836,7 +836,7 @@ } } }, - "revision": "20220711", + "revision": "20220713", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata": { @@ -1481,7 +1481,7 @@ }, "status": { "$ref": "GoogleRpcStatus", - "description": "The status of the processing of the document." + "description": "The error encountered while attempting to process the document. Empty if there are no errors." } }, "type": "object" @@ -4377,7 +4377,7 @@ }, "status": { "$ref": "GoogleRpcStatus", - "description": "The status of the processing of the document." + "description": "The error encountered while attempting to process the document. Empty if there are no errors." } }, "type": "object" diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index e82254b2d1d..bc8f8ad4038 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -1418,7 +1418,8 @@ type GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus struct { // successful, otherwise empty. OutputGcsDestination string `json:"outputGcsDestination,omitempty"` - // Status: The status of the processing of the document. + // Status: The error encountered while attempting to process the + // document. Empty if there are no errors. Status *GoogleRpcStatus `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "HumanReviewStatus") @@ -6175,7 +6176,8 @@ type GoogleCloudDocumentaiV1beta3BatchProcessMetadataIndividualProcessStatus str // successful, otherwise empty. OutputGcsDestination string `json:"outputGcsDestination,omitempty"` - // Status: The status of the processing of the document. + // Status: The error encountered while attempting to process the + // document. Empty if there are no errors. Status *GoogleRpcStatus `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. diff --git a/domains/v1alpha2/domains-api.json b/domains/v1alpha2/domains-api.json index c801e50c474..424f5cafe9a 100644 --- a/domains/v1alpha2/domains-api.json +++ b/domains/v1alpha2/domains-api.json @@ -843,7 +843,7 @@ } } }, - "revision": "20220616", + "revision": "20220712", "rootUrl": "https://domains.googleapis.com/", "schemas": { "AuditConfig": { @@ -1566,7 +1566,7 @@ "type": "object" }, "PostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an i18n-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", "id": "PostalAddress", "properties": { "addressLines": { diff --git a/domains/v1alpha2/domains-gen.go b/domains/v1alpha2/domains-gen.go index 5c68ce96f4b..1ae5d5a4fa9 100644 --- a/domains/v1alpha2/domains-gen.go +++ b/domains/v1alpha2/domains-gen.go @@ -1487,9 +1487,9 @@ func (s *Policy) MarshalJSON() ([]byte, error) { // to model geographical locations (roads, towns, mountains). In typical // usage an address would be created via user input or from importing // existing data, depending on the type of process. Advice on address -// input / editing: - Use an i18n-ready address widget such as -// https://github.com/google/libaddressinput) - Users should not be -// presented with UI elements for input or editing of fields outside +// input / editing: - Use an internationalization-ready address widget +// such as https://github.com/google/libaddressinput) - Users should not +// be presented with UI elements for input or editing of fields outside // countries where that field is used. For more guidance on how to use // this schema, please see: // https://support.google.com/business/answer/6397478 diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 373397bfc03..bae903ffdd3 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -3058,7 +3058,7 @@ } } }, - "revision": "20220707", + "revision": "20220713", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -3092,6 +3092,41 @@ }, "type": "object" }, + "AccessReview": { + "description": "Conveys information about a Kubernetes access review (e.g. kubectl auth can-i ...) that was involved in a finding.", + "id": "AccessReview", + "properties": { + "group": { + "description": "Group is the API Group of the Resource. \"*\" means all.", + "type": "string" + }, + "name": { + "description": "Name is the name of the resource being requested. Empty means all.", + "type": "string" + }, + "ns": { + "description": "Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by \"\" (empty).", + "type": "string" + }, + "resource": { + "description": "Resource is the optional resource type requested. \"*\" means all.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the optional subresource type.", + "type": "string" + }, + "verb": { + "description": "Verb is a Kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "string" + }, + "version": { + "description": "Version is the API Version of the Resource. \"*\" means all.", + "type": "string" + } + }, + "type": "object" + }, "Asset": { "description": "Security Command Center representation of a Google Cloud resource. The Asset is a Security Command Center resource that captures information about a single Google Cloud resource. All modifications to an Asset are only within the context of Security Command Center and don't affect the referenced Google Cloud resource.", "id": "Asset", @@ -3348,6 +3383,32 @@ }, "type": "object" }, + "Container": { + "description": "Container associated with the finding.", + "id": "Container", + "properties": { + "imageId": { + "description": "Optional container image id, when provided by the container runtime. Uniquely identifies the container image launched using a container image digest.", + "type": "string" + }, + "labels": { + "description": "Container labels, as provided by the container runtime.", + "items": { + "$ref": "Label" + }, + "type": "array" + }, + "name": { + "description": "Container name.", + "type": "string" + }, + "uri": { + "description": "Container image URI provided when configuring a pod/container. May identify a container image version using mutable tags.", + "type": "string" + } + }, + "type": "object" + }, "Cve": { "description": "CVE stands for Common Vulnerabilities and Exposures. More information: https://cve.mitre.org", "id": "Cve", @@ -3676,10 +3737,17 @@ "additionalProperties": { "$ref": "ContactDetails" }, - "description": "Output only. Map containing the point of contacts for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\":[ { \"contact\":{ \"email\":\"person1@company.com\" } }, { \"contact\":{ \"email\":“person2@company.com” } } ] }", + "description": "Output only. Map containing the point of contacts for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] }", "readOnly": true, "type": "object" }, + "containers": { + "description": "Containers associated with the finding. containers provides information for both Kubernetes and non-Kubernetes containers.", + "items": { + "$ref": "Container" + }, + "type": "array" + }, "createTime": { "description": "The time at which the finding was created in Security Command Center.", "format": "google-datetime", @@ -3741,6 +3809,10 @@ "$ref": "Indicator", "description": "Represents what's commonly known as an Indicator of compromise (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise" }, + "kubernetes": { + "$ref": "Kubernetes", + "description": "Kubernetes resources associated with the finding." + }, "mitreAttack": { "$ref": "MitreAttack", "description": "MITRE ATT\u0026CK tactics and techniques related to this finding. See: https://attack.mitre.org" @@ -3939,6 +4011,32 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV1Binding": { + "description": "Represents a Kubernetes RoleBinding or ClusterRoleBinding.", + "id": "GoogleCloudSecuritycenterV1Binding", + "properties": { + "name": { + "description": "Name for binding.", + "type": "string" + }, + "ns": { + "description": "Namespace for binding.", + "type": "string" + }, + "role": { + "$ref": "Role", + "description": "The Role or ClusterRole referenced by the binding." + }, + "subjects": { + "description": "Represents the subjects(s) bound to the role. Not always available for PATCH requests.", + "items": { + "$ref": "Subject" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV1BulkMuteFindingsResponse": { "description": "The response to a BulkMute request. Contains the LRO information.", "id": "GoogleCloudSecuritycenterV1BulkMuteFindingsResponse", @@ -4549,6 +4647,70 @@ }, "type": "object" }, + "Kubernetes": { + "description": "Kubernetes related attributes.", + "id": "Kubernetes", + "properties": { + "accessReviews": { + "description": "Provides information on any Kubernetes access reviews (i.e. privilege checks) relevant to the finding.", + "items": { + "$ref": "AccessReview" + }, + "type": "array" + }, + "bindings": { + "description": "Provides Kubernetes role binding information for findings that involve RoleBindings or ClusterRoleBindings.", + "items": { + "$ref": "GoogleCloudSecuritycenterV1Binding" + }, + "type": "array" + }, + "nodePools": { + "description": "GKE Node Pools associated with the finding. This field will contain NodePool information for each Node, when it is available.", + "items": { + "$ref": "NodePool" + }, + "type": "array" + }, + "nodes": { + "description": "Provides Kubernetes Node information.", + "items": { + "$ref": "Node" + }, + "type": "array" + }, + "pods": { + "description": "Kubernetes Pods associated with the finding. This field will contain Pod records for each container that is owned by a Pod.", + "items": { + "$ref": "Pod" + }, + "type": "array" + }, + "roles": { + "description": "Provides Kubernetes role information for findings that involve Roles or ClusterRoles.", + "items": { + "$ref": "Role" + }, + "type": "array" + } + }, + "type": "object" + }, + "Label": { + "description": "Label represents a generic name=value label. Label has separate name and value fields to support filtering with contains().", + "id": "Label", + "properties": { + "name": { + "description": "Label name.", + "type": "string" + }, + "value": { + "description": "Label value.", + "type": "string" + } + }, + "type": "object" + }, "ListAssetsResponse": { "description": "Response message for listing assets.", "id": "ListAssetsResponse", @@ -4854,7 +5016,8 @@ "MODIFY_AUTHENTICATION_PROCESS", "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", - "IMPAIR_DEFENSES" + "IMPAIR_DEFENSES", + "NETWORK_SERVICE_DISCOVERY" ], "enumDescriptions": [ "Unspecified value.", @@ -4888,7 +5051,8 @@ "T1556", "T1485", "T1484", - "T1562" + "T1562", + "T1046" ], "type": "string" }, @@ -4967,7 +5131,8 @@ "MODIFY_AUTHENTICATION_PROCESS", "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", - "IMPAIR_DEFENSES" + "IMPAIR_DEFENSES", + "NETWORK_SERVICE_DISCOVERY" ], "enumDescriptions": [ "Unspecified value.", @@ -5001,7 +5166,8 @@ "T1556", "T1485", "T1484", - "T1562" + "T1562", + "T1046" ], "type": "string" }, @@ -5014,6 +5180,35 @@ }, "type": "object" }, + "Node": { + "description": "Kubernetes Nodes associated with the finding.", + "id": "Node", + "properties": { + "name": { + "description": "Full Resource name of the Compute Engine VM running the cluster node.", + "type": "string" + } + }, + "type": "object" + }, + "NodePool": { + "description": "Provides GKE Node Pool information.", + "id": "NodePool", + "properties": { + "name": { + "description": "Kubernetes Node pool name.", + "type": "string" + }, + "nodes": { + "description": "Nodes associated with the finding.", + "items": { + "$ref": "Node" + }, + "type": "array" + } + }, + "type": "object" + }, "NotificationConfig": { "description": "Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.", "id": "NotificationConfig", @@ -5096,6 +5291,35 @@ }, "type": "object" }, + "Pod": { + "description": "Kubernetes Pod.", + "id": "Pod", + "properties": { + "containers": { + "description": "Pod containers associated with this finding, if any.", + "items": { + "$ref": "Container" + }, + "type": "array" + }, + "labels": { + "description": "Pod labels. For Kubernetes containers, these are applied to the container.", + "items": { + "$ref": "Label" + }, + "type": "array" + }, + "name": { + "description": "Kubernetes Pod name.", + "type": "string" + }, + "ns": { + "description": "Kubernetes Pod namespace.", + "type": "string" + } + }, + "type": "object" + }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -5257,6 +5481,35 @@ }, "type": "object" }, + "Role": { + "description": "Kubernetes Role or ClusterRole.", + "id": "Role", + "properties": { + "kind": { + "description": "Role type.", + "enum": [ + "KIND_UNSPECIFIED", + "ROLE", + "CLUSTER_ROLE" + ], + "enumDescriptions": [ + "Role type is not specified.", + "Kubernetes Role.", + "Kubernetes ClusterRole." + ], + "type": "string" + }, + "name": { + "description": "Role name.", + "type": "string" + }, + "ns": { + "description": "Role namespace.", + "type": "string" + } + }, + "type": "object" + }, "RunAssetDiscoveryRequest": { "description": "Request message for running asset discovery for an organization.", "id": "RunAssetDiscoveryRequest", @@ -5460,6 +5713,37 @@ }, "type": "object" }, + "Subject": { + "description": "Represents a Kubernetes Subject.", + "id": "Subject", + "properties": { + "kind": { + "description": "Authentication type for subject.", + "enum": [ + "AUTH_TYPE_UNSPECIFIED", + "USER", + "SERVICEACCOUNT", + "GROUP" + ], + "enumDescriptions": [ + "Authentication is not specified.", + "User with valid certificate.", + "Users managed by Kubernetes API with credentials stored as Secrets.", + "Collection of users." + ], + "type": "string" + }, + "name": { + "description": "Name for subject.", + "type": "string" + }, + "ns": { + "description": "Namespace for subject.", + "type": "string" + } + }, + "type": "object" + }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index 66f215bc8be..3bc08f91558 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -493,6 +493,58 @@ func (s *Access) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AccessReview: Conveys information about a Kubernetes access review +// (e.g. kubectl auth can-i ...) that was involved in a finding. +type AccessReview struct { + // Group: Group is the API Group of the Resource. "*" means all. + Group string `json:"group,omitempty"` + + // Name: Name is the name of the resource being requested. Empty means + // all. + Name string `json:"name,omitempty"` + + // Ns: Namespace of the action being requested. Currently, there is no + // distinction between no namespace and all namespaces. Both are + // represented by "" (empty). + Ns string `json:"ns,omitempty"` + + // Resource: Resource is the optional resource type requested. "*" means + // all. + Resource string `json:"resource,omitempty"` + + // Subresource: Subresource is the optional subresource type. + Subresource string `json:"subresource,omitempty"` + + // Verb: Verb is a Kubernetes resource API verb, like: get, list, watch, + // create, update, delete, proxy. "*" means all. + Verb string `json:"verb,omitempty"` + + // Version: Version is the API Version of the Resource. "*" means all. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Group") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Group") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AccessReview) MarshalJSON() ([]byte, error) { + type NoMethod AccessReview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Asset: Security Command Center representation of a Google Cloud // resource. The Asset is a Security Command Center resource that // captures information about a single Google Cloud resource. All @@ -966,6 +1018,46 @@ func (s *ContactDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Container: Container associated with the finding. +type Container struct { + // ImageId: Optional container image id, when provided by the container + // runtime. Uniquely identifies the container image launched using a + // container image digest. + ImageId string `json:"imageId,omitempty"` + + // Labels: Container labels, as provided by the container runtime. + Labels []*Label `json:"labels,omitempty"` + + // Name: Container name. + Name string `json:"name,omitempty"` + + // Uri: Container image URI provided when configuring a pod/container. + // May identify a container image version using mutable tags. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ImageId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ImageId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Container) MarshalJSON() ([]byte, error) { + type NoMethod Container + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Cve: CVE stands for Common Vulnerabilities and Exposures. More // information: https://cve.mitre.org type Cve struct { @@ -1475,10 +1567,15 @@ type Finding struct { // value contains a list of all the contacts that pertain. Please refer // to: // https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - // { "security":[ { "contact":{ "email":"person1@company.com" } }, { - // "contact":{ "email":“person2@company.com” } } ] } + // { "security": { "contacts": [ { "email": "person1@company.com" }, { + // "email": "person2@company.com" } ] } Contacts map[string]ContactDetails `json:"contacts,omitempty"` + // Containers: Containers associated with the finding. containers + // provides information for both Kubernetes and non-Kubernetes + // containers. + Containers []*Container `json:"containers,omitempty"` + // CreateTime: The time at which the finding was created in Security // Command Center. CreateTime string `json:"createTime,omitempty"` @@ -1534,6 +1631,9 @@ type Finding struct { // https://en.wikipedia.org/wiki/Indicator_of_compromise Indicator *Indicator `json:"indicator,omitempty"` + // Kubernetes: Kubernetes resources associated with the finding. + Kubernetes *Kubernetes `json:"kubernetes,omitempty"` + // MitreAttack: MITRE ATT&CK tactics and techniques related to this // finding. See: https://attack.mitre.org MitreAttack *MitreAttack `json:"mitreAttack,omitempty"` @@ -1899,6 +1999,45 @@ func (s *GoogleCloudSecuritycenterV1BigQueryExport) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV1Binding: Represents a Kubernetes +// RoleBinding or ClusterRoleBinding. +type GoogleCloudSecuritycenterV1Binding struct { + // Name: Name for binding. + Name string `json:"name,omitempty"` + + // Ns: Namespace for binding. + Ns string `json:"ns,omitempty"` + + // Role: The Role or ClusterRole referenced by the binding. + Role *Role `json:"role,omitempty"` + + // Subjects: Represents the subjects(s) bound to the role. Not always + // available for PATCH requests. + Subjects []*Subject `json:"subjects,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudSecuritycenterV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV1BulkMuteFindingsResponse: The response to // a BulkMute request. Contains the LRO information. type GoogleCloudSecuritycenterV1BulkMuteFindingsResponse struct { @@ -2992,6 +3131,87 @@ func (s *Indicator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Kubernetes: Kubernetes related attributes. +type Kubernetes struct { + // AccessReviews: Provides information on any Kubernetes access reviews + // (i.e. privilege checks) relevant to the finding. + AccessReviews []*AccessReview `json:"accessReviews,omitempty"` + + // Bindings: Provides Kubernetes role binding information for findings + // that involve RoleBindings or ClusterRoleBindings. + Bindings []*GoogleCloudSecuritycenterV1Binding `json:"bindings,omitempty"` + + // NodePools: GKE Node Pools associated with the finding. This field + // will contain NodePool information for each Node, when it is + // available. + NodePools []*NodePool `json:"nodePools,omitempty"` + + // Nodes: Provides Kubernetes Node information. + Nodes []*Node `json:"nodes,omitempty"` + + // Pods: Kubernetes Pods associated with the finding. This field will + // contain Pod records for each container that is owned by a Pod. + Pods []*Pod `json:"pods,omitempty"` + + // Roles: Provides Kubernetes role information for findings that involve + // Roles or ClusterRoles. + Roles []*Role `json:"roles,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessReviews") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessReviews") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Kubernetes) MarshalJSON() ([]byte, error) { + type NoMethod Kubernetes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Label: Label represents a generic name=value label. Label has +// separate name and value fields to support filtering with contains(). +type Label struct { + // Name: Label name. + Name string `json:"name,omitempty"` + + // Value: Label 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Label) MarshalJSON() ([]byte, error) { + type NoMethod Label + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListAssetsResponse: Response message for listing assets. type ListAssetsResponse struct { // ListAssetsResults: Assets matching the list request. @@ -3442,6 +3662,7 @@ type MitreAttack struct { // "DATA_DESTRUCTION" - T1485 // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 + // "NETWORK_SERVICE_DISCOVERY" - T1046 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -3506,6 +3727,7 @@ type MitreAttack struct { // "DATA_DESTRUCTION" - T1485 // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 + // "NETWORK_SERVICE_DISCOVERY" - T1046 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. @@ -3536,6 +3758,66 @@ func (s *MitreAttack) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Node: Kubernetes Nodes associated with the finding. +type Node struct { + // Name: Full Resource name of the Compute Engine VM running the cluster + // node. + Name string `json:"name,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Node) MarshalJSON() ([]byte, error) { + type NoMethod Node + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodePool: Provides GKE Node Pool information. +type NodePool struct { + // Name: Kubernetes Node pool name. + Name string `json:"name,omitempty"` + + // Nodes: Nodes associated with the finding. + Nodes []*Node `json:"nodes,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodePool) MarshalJSON() ([]byte, error) { + type NoMethod NodePool + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NotificationConfig: Cloud Security Command Center (Cloud SCC) // notification configs. A notification config is a Cloud SCC resource // that contains the configuration to send notifications for @@ -3700,6 +3982,44 @@ func (s *OrganizationSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Pod: Kubernetes Pod. +type Pod struct { + // Containers: Pod containers associated with this finding, if any. + Containers []*Container `json:"containers,omitempty"` + + // Labels: Pod labels. For Kubernetes containers, these are applied to + // the container. + Labels []*Label `json:"labels,omitempty"` + + // Name: Kubernetes Pod name. + Name string `json:"name,omitempty"` + + // Ns: Kubernetes Pod namespace. + Ns string `json:"ns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Containers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Containers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Pod) MarshalJSON() ([]byte, error) { + type NoMethod Pod + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Policy: An Identity and Access Management (IAM) policy, which // specifies access controls for Google Cloud resources. A `Policy` is a // collection of `bindings`. A `binding` binds one or more `members`, or @@ -3989,6 +4309,45 @@ func (s *Resource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Role: Kubernetes Role or ClusterRole. +type Role struct { + // Kind: Role type. + // + // Possible values: + // "KIND_UNSPECIFIED" - Role type is not specified. + // "ROLE" - Kubernetes Role. + // "CLUSTER_ROLE" - Kubernetes ClusterRole. + Kind string `json:"kind,omitempty"` + + // Name: Role name. + Name string `json:"name,omitempty"` + + // Ns: Role namespace. + Ns string `json:"ns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Role) MarshalJSON() ([]byte, error) { + type NoMethod Role + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RunAssetDiscoveryRequest: Request message for running asset discovery // for an organization. type RunAssetDiscoveryRequest struct { @@ -4376,6 +4735,47 @@ func (s *StreamingConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Subject: Represents a Kubernetes Subject. +type Subject struct { + // Kind: Authentication type for subject. + // + // Possible values: + // "AUTH_TYPE_UNSPECIFIED" - Authentication is not specified. + // "USER" - User with valid certificate. + // "SERVICEACCOUNT" - Users managed by Kubernetes API with credentials + // stored as Secrets. + // "GROUP" - Collection of users. + Kind string `json:"kind,omitempty"` + + // Name: Name for subject. + Name string `json:"name,omitempty"` + + // Ns: Namespace for subject. + Ns string `json:"ns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Subject) MarshalJSON() ([]byte, error) { + type NoMethod Subject + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TestIamPermissionsRequest: Request message for `TestIamPermissions` // method. type TestIamPermissionsRequest struct { diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index cad5783197e..56d3a80a543 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20220707", + "revision": "20220713", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -930,6 +930,41 @@ }, "type": "object" }, + "AccessReview": { + "description": "Conveys information about a Kubernetes access review (e.g. kubectl auth can-i ...) that was involved in a finding.", + "id": "AccessReview", + "properties": { + "group": { + "description": "Group is the API Group of the Resource. \"*\" means all.", + "type": "string" + }, + "name": { + "description": "Name is the name of the resource being requested. Empty means all.", + "type": "string" + }, + "ns": { + "description": "Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by \"\" (empty).", + "type": "string" + }, + "resource": { + "description": "Resource is the optional resource type requested. \"*\" means all.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the optional subresource type.", + "type": "string" + }, + "verb": { + "description": "Verb is a Kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "string" + }, + "version": { + "description": "Version is the API Version of the Resource. \"*\" means all.", + "type": "string" + } + }, + "type": "object" + }, "Asset": { "description": "Security Command Center representation of a Google Cloud resource. The Asset is a Security Command Center resource that captures information about a single Google Cloud resource. All modifications to an Asset are only within the context of Security Command Center and don't affect the referenced Google Cloud resource.", "id": "Asset", @@ -1162,6 +1197,32 @@ }, "type": "object" }, + "Container": { + "description": "Container associated with the finding.", + "id": "Container", + "properties": { + "imageId": { + "description": "Optional container image id, when provided by the container runtime. Uniquely identifies the container image launched using a container image digest.", + "type": "string" + }, + "labels": { + "description": "Container labels, as provided by the container runtime.", + "items": { + "$ref": "Label" + }, + "type": "array" + }, + "name": { + "description": "Container name.", + "type": "string" + }, + "uri": { + "description": "Container image URI provided when configuring a pod/container. May identify a container image version using mutable tags.", + "type": "string" + } + }, + "type": "object" + }, "Cve": { "description": "CVE stands for Common Vulnerabilities and Exposures. More information: https://cve.mitre.org", "id": "Cve", @@ -1490,10 +1551,17 @@ "additionalProperties": { "$ref": "ContactDetails" }, - "description": "Output only. Map containing the point of contacts for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\":[ { \"contact\":{ \"email\":\"person1@company.com\" } }, { \"contact\":{ \"email\":“person2@company.com” } } ] }", + "description": "Output only. Map containing the point of contacts for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] }", "readOnly": true, "type": "object" }, + "containers": { + "description": "Containers associated with the finding. containers provides information for both Kubernetes and non-Kubernetes containers.", + "items": { + "$ref": "Container" + }, + "type": "array" + }, "createTime": { "description": "The time at which the finding was created in Security Command Center.", "format": "google-datetime", @@ -1555,6 +1623,10 @@ "$ref": "Indicator", "description": "Represents what's commonly known as an Indicator of compromise (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise" }, + "kubernetes": { + "$ref": "Kubernetes", + "description": "Kubernetes resources associated with the finding." + }, "mitreAttack": { "$ref": "MitreAttack", "description": "MITRE ATT\u0026CK tactics and techniques related to this finding. See: https://attack.mitre.org" @@ -1753,6 +1825,32 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV1Binding": { + "description": "Represents a Kubernetes RoleBinding or ClusterRoleBinding.", + "id": "GoogleCloudSecuritycenterV1Binding", + "properties": { + "name": { + "description": "Name for binding.", + "type": "string" + }, + "ns": { + "description": "Namespace for binding.", + "type": "string" + }, + "role": { + "$ref": "Role", + "description": "The Role or ClusterRole referenced by the binding." + }, + "subjects": { + "description": "Represents the subjects(s) bound to the role. Not always available for PATCH requests.", + "items": { + "$ref": "Subject" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV1BulkMuteFindingsResponse": { "description": "The response to a BulkMute request. Contains the LRO information.", "id": "GoogleCloudSecuritycenterV1BulkMuteFindingsResponse", @@ -2418,6 +2516,70 @@ }, "type": "object" }, + "Kubernetes": { + "description": "Kubernetes related attributes.", + "id": "Kubernetes", + "properties": { + "accessReviews": { + "description": "Provides information on any Kubernetes access reviews (i.e. privilege checks) relevant to the finding.", + "items": { + "$ref": "AccessReview" + }, + "type": "array" + }, + "bindings": { + "description": "Provides Kubernetes role binding information for findings that involve RoleBindings or ClusterRoleBindings.", + "items": { + "$ref": "GoogleCloudSecuritycenterV1Binding" + }, + "type": "array" + }, + "nodePools": { + "description": "GKE Node Pools associated with the finding. This field will contain NodePool information for each Node, when it is available.", + "items": { + "$ref": "NodePool" + }, + "type": "array" + }, + "nodes": { + "description": "Provides Kubernetes Node information.", + "items": { + "$ref": "Node" + }, + "type": "array" + }, + "pods": { + "description": "Kubernetes Pods associated with the finding. This field will contain Pod records for each container that is owned by a Pod.", + "items": { + "$ref": "Pod" + }, + "type": "array" + }, + "roles": { + "description": "Provides Kubernetes role information for findings that involve Roles or ClusterRoles.", + "items": { + "$ref": "Role" + }, + "type": "array" + } + }, + "type": "object" + }, + "Label": { + "description": "Label represents a generic name=value label. Label has separate name and value fields to support filtering with contains().", + "id": "Label", + "properties": { + "name": { + "description": "Label name.", + "type": "string" + }, + "value": { + "description": "Label value.", + "type": "string" + } + }, + "type": "object" + }, "ListAssetsResponse": { "description": "Response message for listing assets.", "id": "ListAssetsResponse", @@ -2637,7 +2799,8 @@ "MODIFY_AUTHENTICATION_PROCESS", "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", - "IMPAIR_DEFENSES" + "IMPAIR_DEFENSES", + "NETWORK_SERVICE_DISCOVERY" ], "enumDescriptions": [ "Unspecified value.", @@ -2671,7 +2834,8 @@ "T1556", "T1485", "T1484", - "T1562" + "T1562", + "T1046" ], "type": "string" }, @@ -2750,7 +2914,8 @@ "MODIFY_AUTHENTICATION_PROCESS", "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", - "IMPAIR_DEFENSES" + "IMPAIR_DEFENSES", + "NETWORK_SERVICE_DISCOVERY" ], "enumDescriptions": [ "Unspecified value.", @@ -2784,7 +2949,8 @@ "T1556", "T1485", "T1484", - "T1562" + "T1562", + "T1046" ], "type": "string" }, @@ -2797,6 +2963,35 @@ }, "type": "object" }, + "Node": { + "description": "Kubernetes Nodes associated with the finding.", + "id": "Node", + "properties": { + "name": { + "description": "Full Resource name of the Compute Engine VM running the cluster node.", + "type": "string" + } + }, + "type": "object" + }, + "NodePool": { + "description": "Provides GKE Node Pool information.", + "id": "NodePool", + "properties": { + "name": { + "description": "Kubernetes Node pool name.", + "type": "string" + }, + "nodes": { + "description": "Nodes associated with the finding.", + "items": { + "$ref": "Node" + }, + "type": "array" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -2851,6 +3046,35 @@ }, "type": "object" }, + "Pod": { + "description": "Kubernetes Pod.", + "id": "Pod", + "properties": { + "containers": { + "description": "Pod containers associated with this finding, if any.", + "items": { + "$ref": "Container" + }, + "type": "array" + }, + "labels": { + "description": "Pod labels. For Kubernetes containers, these are applied to the container.", + "items": { + "$ref": "Label" + }, + "type": "array" + }, + "name": { + "description": "Kubernetes Pod name.", + "type": "string" + }, + "ns": { + "description": "Kubernetes Pod namespace.", + "type": "string" + } + }, + "type": "object" + }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -2970,6 +3194,35 @@ }, "type": "object" }, + "Role": { + "description": "Kubernetes Role or ClusterRole.", + "id": "Role", + "properties": { + "kind": { + "description": "Role type.", + "enum": [ + "KIND_UNSPECIFIED", + "ROLE", + "CLUSTER_ROLE" + ], + "enumDescriptions": [ + "Role type is not specified.", + "Kubernetes Role.", + "Kubernetes ClusterRole." + ], + "type": "string" + }, + "name": { + "description": "Role name.", + "type": "string" + }, + "ns": { + "description": "Role namespace.", + "type": "string" + } + }, + "type": "object" + }, "RunAssetDiscoveryRequest": { "description": "Request message for running asset discovery for an organization.", "id": "RunAssetDiscoveryRequest", @@ -3116,6 +3369,37 @@ }, "type": "object" }, + "Subject": { + "description": "Represents a Kubernetes Subject.", + "id": "Subject", + "properties": { + "kind": { + "description": "Authentication type for subject.", + "enum": [ + "AUTH_TYPE_UNSPECIFIED", + "USER", + "SERVICEACCOUNT", + "GROUP" + ], + "enumDescriptions": [ + "Authentication is not specified.", + "User with valid certificate.", + "Users managed by Kubernetes API with credentials stored as Secrets.", + "Collection of users." + ], + "type": "string" + }, + "name": { + "description": "Name for subject.", + "type": "string" + }, + "ns": { + "description": "Namespace for subject.", + "type": "string" + } + }, + "type": "object" + }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index 136f4594347..2118b8ae786 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -241,6 +241,58 @@ func (s *Access) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AccessReview: Conveys information about a Kubernetes access review +// (e.g. kubectl auth can-i ...) that was involved in a finding. +type AccessReview struct { + // Group: Group is the API Group of the Resource. "*" means all. + Group string `json:"group,omitempty"` + + // Name: Name is the name of the resource being requested. Empty means + // all. + Name string `json:"name,omitempty"` + + // Ns: Namespace of the action being requested. Currently, there is no + // distinction between no namespace and all namespaces. Both are + // represented by "" (empty). + Ns string `json:"ns,omitempty"` + + // Resource: Resource is the optional resource type requested. "*" means + // all. + Resource string `json:"resource,omitempty"` + + // Subresource: Subresource is the optional subresource type. + Subresource string `json:"subresource,omitempty"` + + // Verb: Verb is a Kubernetes resource API verb, like: get, list, watch, + // create, update, delete, proxy. "*" means all. + Verb string `json:"verb,omitempty"` + + // Version: Version is the API Version of the Resource. "*" means all. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Group") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Group") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AccessReview) MarshalJSON() ([]byte, error) { + type NoMethod AccessReview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Asset: Security Command Center representation of a Google Cloud // resource. The Asset is a Security Command Center resource that // captures information about a single Google Cloud resource. All @@ -657,6 +709,46 @@ func (s *ContactDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Container: Container associated with the finding. +type Container struct { + // ImageId: Optional container image id, when provided by the container + // runtime. Uniquely identifies the container image launched using a + // container image digest. + ImageId string `json:"imageId,omitempty"` + + // Labels: Container labels, as provided by the container runtime. + Labels []*Label `json:"labels,omitempty"` + + // Name: Container name. + Name string `json:"name,omitempty"` + + // Uri: Container image URI provided when configuring a pod/container. + // May identify a container image version using mutable tags. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ImageId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ImageId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Container) MarshalJSON() ([]byte, error) { + type NoMethod Container + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Cve: CVE stands for Common Vulnerabilities and Exposures. More // information: https://cve.mitre.org type Cve struct { @@ -1166,10 +1258,15 @@ type Finding struct { // value contains a list of all the contacts that pertain. Please refer // to: // https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - // { "security":[ { "contact":{ "email":"person1@company.com" } }, { - // "contact":{ "email":“person2@company.com” } } ] } + // { "security": { "contacts": [ { "email": "person1@company.com" }, { + // "email": "person2@company.com" } ] } Contacts map[string]ContactDetails `json:"contacts,omitempty"` + // Containers: Containers associated with the finding. containers + // provides information for both Kubernetes and non-Kubernetes + // containers. + Containers []*Container `json:"containers,omitempty"` + // CreateTime: The time at which the finding was created in Security // Command Center. CreateTime string `json:"createTime,omitempty"` @@ -1225,6 +1322,9 @@ type Finding struct { // https://en.wikipedia.org/wiki/Indicator_of_compromise Indicator *Indicator `json:"indicator,omitempty"` + // Kubernetes: Kubernetes resources associated with the finding. + Kubernetes *Kubernetes `json:"kubernetes,omitempty"` + // MitreAttack: MITRE ATT&CK tactics and techniques related to this // finding. See: https://attack.mitre.org MitreAttack *MitreAttack `json:"mitreAttack,omitempty"` @@ -1582,6 +1682,45 @@ func (s *GoogleCloudSecuritycenterV1BigQueryExport) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV1Binding: Represents a Kubernetes +// RoleBinding or ClusterRoleBinding. +type GoogleCloudSecuritycenterV1Binding struct { + // Name: Name for binding. + Name string `json:"name,omitempty"` + + // Ns: Namespace for binding. + Ns string `json:"ns,omitempty"` + + // Role: The Role or ClusterRole referenced by the binding. + Role *Role `json:"role,omitempty"` + + // Subjects: Represents the subjects(s) bound to the role. Not always + // available for PATCH requests. + Subjects []*Subject `json:"subjects,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudSecuritycenterV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV1BulkMuteFindingsResponse: The response to // a BulkMute request. Contains the LRO information. type GoogleCloudSecuritycenterV1BulkMuteFindingsResponse struct { @@ -2707,6 +2846,87 @@ func (s *Indicator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Kubernetes: Kubernetes related attributes. +type Kubernetes struct { + // AccessReviews: Provides information on any Kubernetes access reviews + // (i.e. privilege checks) relevant to the finding. + AccessReviews []*AccessReview `json:"accessReviews,omitempty"` + + // Bindings: Provides Kubernetes role binding information for findings + // that involve RoleBindings or ClusterRoleBindings. + Bindings []*GoogleCloudSecuritycenterV1Binding `json:"bindings,omitempty"` + + // NodePools: GKE Node Pools associated with the finding. This field + // will contain NodePool information for each Node, when it is + // available. + NodePools []*NodePool `json:"nodePools,omitempty"` + + // Nodes: Provides Kubernetes Node information. + Nodes []*Node `json:"nodes,omitempty"` + + // Pods: Kubernetes Pods associated with the finding. This field will + // contain Pod records for each container that is owned by a Pod. + Pods []*Pod `json:"pods,omitempty"` + + // Roles: Provides Kubernetes role information for findings that involve + // Roles or ClusterRoles. + Roles []*Role `json:"roles,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessReviews") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessReviews") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Kubernetes) MarshalJSON() ([]byte, error) { + type NoMethod Kubernetes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Label: Label represents a generic name=value label. Label has +// separate name and value fields to support filtering with contains(). +type Label struct { + // Name: Label name. + Name string `json:"name,omitempty"` + + // Value: Label 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Label) MarshalJSON() ([]byte, error) { + type NoMethod Label + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListAssetsResponse: Response message for listing assets. type ListAssetsResponse struct { // ListAssetsResults: Assets matching the list request. @@ -2996,6 +3216,7 @@ type MitreAttack struct { // "DATA_DESTRUCTION" - T1485 // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 + // "NETWORK_SERVICE_DISCOVERY" - T1046 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -3060,6 +3281,7 @@ type MitreAttack struct { // "DATA_DESTRUCTION" - T1485 // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 + // "NETWORK_SERVICE_DISCOVERY" - T1046 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. @@ -3090,6 +3312,66 @@ func (s *MitreAttack) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Node: Kubernetes Nodes associated with the finding. +type Node struct { + // Name: Full Resource name of the Compute Engine VM running the cluster + // node. + Name string `json:"name,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Node) MarshalJSON() ([]byte, error) { + type NoMethod Node + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodePool: Provides GKE Node Pool information. +type NodePool struct { + // Name: Kubernetes Node pool name. + Name string `json:"name,omitempty"` + + // Nodes: Nodes associated with the finding. + Nodes []*Node `json:"nodes,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodePool) MarshalJSON() ([]byte, error) { + type NoMethod NodePool + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is // the result of a network API call. type Operation struct { @@ -3199,6 +3481,44 @@ func (s *OrganizationSettings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Pod: Kubernetes Pod. +type Pod struct { + // Containers: Pod containers associated with this finding, if any. + Containers []*Container `json:"containers,omitempty"` + + // Labels: Pod labels. For Kubernetes containers, these are applied to + // the container. + Labels []*Label `json:"labels,omitempty"` + + // Name: Kubernetes Pod name. + Name string `json:"name,omitempty"` + + // Ns: Kubernetes Pod namespace. + Ns string `json:"ns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Containers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Containers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Pod) MarshalJSON() ([]byte, error) { + type NoMethod Pod + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Policy: An Identity and Access Management (IAM) policy, which // specifies access controls for Google Cloud resources. A `Policy` is a // collection of `bindings`. A `binding` binds one or more `members`, or @@ -3434,6 +3754,45 @@ func (s *Reference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Role: Kubernetes Role or ClusterRole. +type Role struct { + // Kind: Role type. + // + // Possible values: + // "KIND_UNSPECIFIED" - Role type is not specified. + // "ROLE" - Kubernetes Role. + // "CLUSTER_ROLE" - Kubernetes ClusterRole. + Kind string `json:"kind,omitempty"` + + // Name: Role name. + Name string `json:"name,omitempty"` + + // Ns: Role namespace. + Ns string `json:"ns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Role) MarshalJSON() ([]byte, error) { + type NoMethod Role + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RunAssetDiscoveryRequest: Request message for running asset discovery // for an organization. type RunAssetDiscoveryRequest struct { @@ -3720,6 +4079,47 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Subject: Represents a Kubernetes Subject. +type Subject struct { + // Kind: Authentication type for subject. + // + // Possible values: + // "AUTH_TYPE_UNSPECIFIED" - Authentication is not specified. + // "USER" - User with valid certificate. + // "SERVICEACCOUNT" - Users managed by Kubernetes API with credentials + // stored as Secrets. + // "GROUP" - Collection of users. + Kind string `json:"kind,omitempty"` + + // Name: Name for subject. + Name string `json:"name,omitempty"` + + // Ns: Namespace for subject. + Ns string `json:"ns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Subject) MarshalJSON() ([]byte, error) { + type NoMethod Subject + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TestIamPermissionsRequest: Request message for `TestIamPermissions` // method. type TestIamPermissionsRequest struct { diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index e2923940a82..d12a2c07276 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -1981,7 +1981,7 @@ } } }, - "revision": "20220707", + "revision": "20220713", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2015,6 +2015,41 @@ }, "type": "object" }, + "AccessReview": { + "description": "Conveys information about a Kubernetes access review (e.g. kubectl auth can-i ...) that was involved in a finding.", + "id": "AccessReview", + "properties": { + "group": { + "description": "Group is the API Group of the Resource. \"*\" means all.", + "type": "string" + }, + "name": { + "description": "Name is the name of the resource being requested. Empty means all.", + "type": "string" + }, + "ns": { + "description": "Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by \"\" (empty).", + "type": "string" + }, + "resource": { + "description": "Resource is the optional resource type requested. \"*\" means all.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the optional subresource type.", + "type": "string" + }, + "verb": { + "description": "Verb is a Kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", + "type": "string" + }, + "version": { + "description": "Version is the API Version of the Resource. \"*\" means all.", + "type": "string" + } + }, + "type": "object" + }, "Compliance": { "description": "Contains compliance information about a security standard indicating unmet recommendations.", "id": "Compliance", @@ -2138,6 +2173,32 @@ }, "type": "object" }, + "Container": { + "description": "Container associated with the finding.", + "id": "Container", + "properties": { + "imageId": { + "description": "Optional container image id, when provided by the container runtime. Uniquely identifies the container image launched using a container image digest.", + "type": "string" + }, + "labels": { + "description": "Container labels, as provided by the container runtime.", + "items": { + "$ref": "Label" + }, + "type": "array" + }, + "name": { + "description": "Container name.", + "type": "string" + }, + "uri": { + "description": "Container image URI provided when configuring a pod/container. May identify a container image version using mutable tags.", + "type": "string" + } + }, + "type": "object" + }, "ContainerThreatDetectionSettings": { "description": "Resource capturing the settings for the Container Threat Detection service.", "id": "ContainerThreatDetectionSettings", @@ -2557,10 +2618,17 @@ "additionalProperties": { "$ref": "ContactDetails" }, - "description": "Output only. Map containing the point of contacts for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\":[ { \"contact\":{ \"email\":\"person1@company.com\" } }, { \"contact\":{ \"email\":“person2@company.com” } } ] }", + "description": "Output only. Map containing the point of contacts for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] }", "readOnly": true, "type": "object" }, + "containers": { + "description": "Containers associated with the finding. containers provides information for both Kubernetes and non-Kubernetes containers.", + "items": { + "$ref": "Container" + }, + "type": "array" + }, "createTime": { "description": "The time at which the finding was created in Security Command Center.", "format": "google-datetime", @@ -2622,6 +2690,10 @@ "$ref": "Indicator", "description": "Represents what's commonly known as an Indicator of compromise (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise" }, + "kubernetes": { + "$ref": "Kubernetes", + "description": "Kubernetes resources associated with the finding." + }, "mitreAttack": { "$ref": "MitreAttack", "description": "MITRE ATT\u0026CK tactics and techniques related to this finding. See: https://attack.mitre.org" @@ -2797,6 +2869,32 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV1Binding": { + "description": "Represents a Kubernetes RoleBinding or ClusterRoleBinding.", + "id": "GoogleCloudSecuritycenterV1Binding", + "properties": { + "name": { + "description": "Name for binding.", + "type": "string" + }, + "ns": { + "description": "Namespace for binding.", + "type": "string" + }, + "role": { + "$ref": "Role", + "description": "The Role or ClusterRole referenced by the binding." + }, + "subjects": { + "description": "Represents the subjects(s) bound to the role. Not always available for PATCH requests.", + "items": { + "$ref": "Subject" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV1BulkMuteFindingsResponse": { "description": "The response to a BulkMute request. Contains the LRO information.", "id": "GoogleCloudSecuritycenterV1BulkMuteFindingsResponse", @@ -3253,6 +3351,70 @@ }, "type": "object" }, + "Kubernetes": { + "description": "Kubernetes related attributes.", + "id": "Kubernetes", + "properties": { + "accessReviews": { + "description": "Provides information on any Kubernetes access reviews (i.e. privilege checks) relevant to the finding.", + "items": { + "$ref": "AccessReview" + }, + "type": "array" + }, + "bindings": { + "description": "Provides Kubernetes role binding information for findings that involve RoleBindings or ClusterRoleBindings.", + "items": { + "$ref": "GoogleCloudSecuritycenterV1Binding" + }, + "type": "array" + }, + "nodePools": { + "description": "GKE Node Pools associated with the finding. This field will contain NodePool information for each Node, when it is available.", + "items": { + "$ref": "NodePool" + }, + "type": "array" + }, + "nodes": { + "description": "Provides Kubernetes Node information.", + "items": { + "$ref": "Node" + }, + "type": "array" + }, + "pods": { + "description": "Kubernetes Pods associated with the finding. This field will contain Pod records for each container that is owned by a Pod.", + "items": { + "$ref": "Pod" + }, + "type": "array" + }, + "roles": { + "description": "Provides Kubernetes role information for findings that involve Roles or ClusterRoles.", + "items": { + "$ref": "Role" + }, + "type": "array" + } + }, + "type": "object" + }, + "Label": { + "description": "Label represents a generic name=value label. Label has separate name and value fields to support filtering with contains().", + "id": "Label", + "properties": { + "name": { + "description": "Label name.", + "type": "string" + }, + "value": { + "description": "Label value.", + "type": "string" + } + }, + "type": "object" + }, "MemoryHashSignature": { "description": "A signature corresponding to memory page hashes.", "id": "MemoryHashSignature", @@ -3351,7 +3513,8 @@ "MODIFY_AUTHENTICATION_PROCESS", "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", - "IMPAIR_DEFENSES" + "IMPAIR_DEFENSES", + "NETWORK_SERVICE_DISCOVERY" ], "enumDescriptions": [ "Unspecified value.", @@ -3385,7 +3548,8 @@ "T1556", "T1485", "T1484", - "T1562" + "T1562", + "T1046" ], "type": "string" }, @@ -3464,7 +3628,8 @@ "MODIFY_AUTHENTICATION_PROCESS", "DATA_DESTRUCTION", "DOMAIN_POLICY_MODIFICATION", - "IMPAIR_DEFENSES" + "IMPAIR_DEFENSES", + "NETWORK_SERVICE_DISCOVERY" ], "enumDescriptions": [ "Unspecified value.", @@ -3498,7 +3663,8 @@ "T1556", "T1485", "T1484", - "T1562" + "T1562", + "T1046" ], "type": "string" }, @@ -3511,6 +3677,35 @@ }, "type": "object" }, + "Node": { + "description": "Kubernetes Nodes associated with the finding.", + "id": "Node", + "properties": { + "name": { + "description": "Full Resource name of the Compute Engine VM running the cluster node.", + "type": "string" + } + }, + "type": "object" + }, + "NodePool": { + "description": "Provides GKE Node Pool information.", + "id": "NodePool", + "properties": { + "name": { + "description": "Kubernetes Node pool name.", + "type": "string" + }, + "nodes": { + "description": "Nodes associated with the finding.", + "items": { + "$ref": "Node" + }, + "type": "array" + } + }, + "type": "object" + }, "OnboardingState": { "description": "Resource capturing onboarding information for a given CRM resource.", "id": "OnboardingState", @@ -3536,6 +3731,35 @@ }, "type": "object" }, + "Pod": { + "description": "Kubernetes Pod.", + "id": "Pod", + "properties": { + "containers": { + "description": "Pod containers associated with this finding, if any.", + "items": { + "$ref": "Container" + }, + "type": "array" + }, + "labels": { + "description": "Pod labels. For Kubernetes containers, these are applied to the container.", + "items": { + "$ref": "Label" + }, + "type": "array" + }, + "name": { + "description": "Kubernetes Pod name.", + "type": "string" + }, + "ns": { + "description": "Kubernetes Pod namespace.", + "type": "string" + } + }, + "type": "object" + }, "Process": { "description": "Represents an operating system process.", "id": "Process", @@ -3664,12 +3888,41 @@ }, "type": "object" }, + "Role": { + "description": "Kubernetes Role or ClusterRole.", + "id": "Role", + "properties": { + "kind": { + "description": "Role type.", + "enum": [ + "KIND_UNSPECIFIED", + "ROLE", + "CLUSTER_ROLE" + ], + "enumDescriptions": [ + "Role type is not specified.", + "Kubernetes Role.", + "Kubernetes ClusterRole." + ], + "type": "string" + }, + "name": { + "description": "Role name.", + "type": "string" + }, + "ns": { + "description": "Role namespace.", + "type": "string" + } + }, + "type": "object" + }, "SecurityCenterSettings": { "description": "Resource capturing the settings for Security Center.", "id": "SecurityCenterSettings", "properties": { "logSinkProject": { - "description": "The resource name of the project to send logs to. This project must be part of the organization this resource resides in. The format is `projects/{project_id}`. An empty value disables logging. This value is only referenced by services that support log sink. Please refer to the documentation for an updated list of compatible services.", + "description": "The resource name of the project to send logs to. This project must be part of the organization this resource resides in. The format is `projects/{project_id}`. An empty value disables logging. This value is only referenced by services that support log sink. Please refer to the documentation for an updated list of compatible services. This may only be specified for organization level onboarding.", "type": "string" }, "name": { @@ -3677,12 +3930,14 @@ "type": "string" }, "onboardingTime": { - "description": "Timestamp of when the customer organization was onboarded to SCC.", + "description": "Output only. Timestamp of when the customer organization was onboarded to SCC.", "format": "google-datetime", + "readOnly": true, "type": "string" }, "orgServiceAccount": { - "description": "The organization level service account to be used for security center components.", + "description": "Output only. The organization level service account to be used for security center components.", + "readOnly": true, "type": "string" } }, @@ -3755,6 +4010,37 @@ }, "type": "object" }, + "Subject": { + "description": "Represents a Kubernetes Subject.", + "id": "Subject", + "properties": { + "kind": { + "description": "Authentication type for subject.", + "enum": [ + "AUTH_TYPE_UNSPECIFIED", + "USER", + "SERVICEACCOUNT", + "GROUP" + ], + "enumDescriptions": [ + "Authentication is not specified.", + "User with valid certificate.", + "Users managed by Kubernetes API with credentials stored as Secrets.", + "Collection of users." + ], + "type": "string" + }, + "name": { + "description": "Name for subject.", + "type": "string" + }, + "ns": { + "description": "Namespace for subject.", + "type": "string" + } + }, + "type": "object" + }, "Subscription": { "description": "Resource capturing the state of an organization's subscription.", "id": "Subscription", diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index dc374ea4106..3f4fc13db79 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -469,6 +469,58 @@ func (s *Access) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AccessReview: Conveys information about a Kubernetes access review +// (e.g. kubectl auth can-i ...) that was involved in a finding. +type AccessReview struct { + // Group: Group is the API Group of the Resource. "*" means all. + Group string `json:"group,omitempty"` + + // Name: Name is the name of the resource being requested. Empty means + // all. + Name string `json:"name,omitempty"` + + // Ns: Namespace of the action being requested. Currently, there is no + // distinction between no namespace and all namespaces. Both are + // represented by "" (empty). + Ns string `json:"ns,omitempty"` + + // Resource: Resource is the optional resource type requested. "*" means + // all. + Resource string `json:"resource,omitempty"` + + // Subresource: Subresource is the optional subresource type. + Subresource string `json:"subresource,omitempty"` + + // Verb: Verb is a Kubernetes resource API verb, like: get, list, watch, + // create, update, delete, proxy. "*" means all. + Verb string `json:"verb,omitempty"` + + // Version: Version is the API Version of the Resource. "*" means all. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Group") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Group") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AccessReview) MarshalJSON() ([]byte, error) { + type NoMethod AccessReview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Compliance: Contains compliance information about a security standard // indicating unmet recommendations. type Compliance struct { @@ -654,6 +706,46 @@ func (s *ContactDetails) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Container: Container associated with the finding. +type Container struct { + // ImageId: Optional container image id, when provided by the container + // runtime. Uniquely identifies the container image launched using a + // container image digest. + ImageId string `json:"imageId,omitempty"` + + // Labels: Container labels, as provided by the container runtime. + Labels []*Label `json:"labels,omitempty"` + + // Name: Container name. + Name string `json:"name,omitempty"` + + // Uri: Container image URI provided when configuring a pod/container. + // May identify a container image version using mutable tags. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ImageId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ImageId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Container) MarshalJSON() ([]byte, error) { + type NoMethod Container + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ContainerThreatDetectionSettings: Resource capturing the settings for // the Container Threat Detection service. type ContainerThreatDetectionSettings struct { @@ -1254,10 +1346,15 @@ type Finding struct { // value contains a list of all the contacts that pertain. Please refer // to: // https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories - // { "security":[ { "contact":{ "email":"person1@company.com" } }, { - // "contact":{ "email":“person2@company.com” } } ] } + // { "security": { "contacts": [ { "email": "person1@company.com" }, { + // "email": "person2@company.com" } ] } Contacts map[string]ContactDetails `json:"contacts,omitempty"` + // Containers: Containers associated with the finding. containers + // provides information for both Kubernetes and non-Kubernetes + // containers. + Containers []*Container `json:"containers,omitempty"` + // CreateTime: The time at which the finding was created in Security // Command Center. CreateTime string `json:"createTime,omitempty"` @@ -1313,6 +1410,9 @@ type Finding struct { // https://en.wikipedia.org/wiki/Indicator_of_compromise Indicator *Indicator `json:"indicator,omitempty"` + // Kubernetes: Kubernetes resources associated with the finding. + Kubernetes *Kubernetes `json:"kubernetes,omitempty"` + // MitreAttack: MITRE ATT&CK tactics and techniques related to this // finding. See: https://attack.mitre.org MitreAttack *MitreAttack `json:"mitreAttack,omitempty"` @@ -1600,6 +1700,45 @@ func (s *GoogleCloudSecuritycenterV1BigQueryExport) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV1Binding: Represents a Kubernetes +// RoleBinding or ClusterRoleBinding. +type GoogleCloudSecuritycenterV1Binding struct { + // Name: Name for binding. + Name string `json:"name,omitempty"` + + // Ns: Namespace for binding. + Ns string `json:"ns,omitempty"` + + // Role: The Role or ClusterRole referenced by the binding. + Role *Role `json:"role,omitempty"` + + // Subjects: Represents the subjects(s) bound to the role. Not always + // available for PATCH requests. + Subjects []*Subject `json:"subjects,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudSecuritycenterV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV1BulkMuteFindingsResponse: The response to // a BulkMute request. Contains the LRO information. type GoogleCloudSecuritycenterV1BulkMuteFindingsResponse struct { @@ -2309,6 +2448,87 @@ func (s *Indicator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Kubernetes: Kubernetes related attributes. +type Kubernetes struct { + // AccessReviews: Provides information on any Kubernetes access reviews + // (i.e. privilege checks) relevant to the finding. + AccessReviews []*AccessReview `json:"accessReviews,omitempty"` + + // Bindings: Provides Kubernetes role binding information for findings + // that involve RoleBindings or ClusterRoleBindings. + Bindings []*GoogleCloudSecuritycenterV1Binding `json:"bindings,omitempty"` + + // NodePools: GKE Node Pools associated with the finding. This field + // will contain NodePool information for each Node, when it is + // available. + NodePools []*NodePool `json:"nodePools,omitempty"` + + // Nodes: Provides Kubernetes Node information. + Nodes []*Node `json:"nodes,omitempty"` + + // Pods: Kubernetes Pods associated with the finding. This field will + // contain Pod records for each container that is owned by a Pod. + Pods []*Pod `json:"pods,omitempty"` + + // Roles: Provides Kubernetes role information for findings that involve + // Roles or ClusterRoles. + Roles []*Role `json:"roles,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessReviews") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessReviews") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Kubernetes) MarshalJSON() ([]byte, error) { + type NoMethod Kubernetes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Label: Label represents a generic name=value label. Label has +// separate name and value fields to support filtering with contains(). +type Label struct { + // Name: Label name. + Name string `json:"name,omitempty"` + + // Value: Label 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Label) MarshalJSON() ([]byte, error) { + type NoMethod Label + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MemoryHashSignature: A signature corresponding to memory page hashes. type MemoryHashSignature struct { // BinaryFamily: The binary family. @@ -2402,6 +2622,7 @@ type MitreAttack struct { // "DATA_DESTRUCTION" - T1485 // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 + // "NETWORK_SERVICE_DISCOVERY" - T1046 AdditionalTechniques []string `json:"additionalTechniques,omitempty"` // PrimaryTactic: The MITRE ATT&CK tactic most closely represented by @@ -2466,6 +2687,7 @@ type MitreAttack struct { // "DATA_DESTRUCTION" - T1485 // "DOMAIN_POLICY_MODIFICATION" - T1484 // "IMPAIR_DEFENSES" - T1562 + // "NETWORK_SERVICE_DISCOVERY" - T1046 PrimaryTechniques []string `json:"primaryTechniques,omitempty"` // Version: The MITRE ATT&CK version referenced by the above fields. @@ -2496,6 +2718,66 @@ func (s *MitreAttack) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Node: Kubernetes Nodes associated with the finding. +type Node struct { + // Name: Full Resource name of the Compute Engine VM running the cluster + // node. + Name string `json:"name,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Node) MarshalJSON() ([]byte, error) { + type NoMethod Node + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NodePool: Provides GKE Node Pool information. +type NodePool struct { + // Name: Kubernetes Node pool name. + Name string `json:"name,omitempty"` + + // Nodes: Nodes associated with the finding. + Nodes []*Node `json:"nodes,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NodePool) MarshalJSON() ([]byte, error) { + type NoMethod NodePool + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // OnboardingState: Resource capturing onboarding information for a // given CRM resource. type OnboardingState struct { @@ -2545,6 +2827,44 @@ func (s *OnboardingState) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Pod: Kubernetes Pod. +type Pod struct { + // Containers: Pod containers associated with this finding, if any. + Containers []*Container `json:"containers,omitempty"` + + // Labels: Pod labels. For Kubernetes containers, these are applied to + // the container. + Labels []*Label `json:"labels,omitempty"` + + // Name: Kubernetes Pod name. + Name string `json:"name,omitempty"` + + // Ns: Kubernetes Pod namespace. + Ns string `json:"ns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Containers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Containers") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Pod) MarshalJSON() ([]byte, error) { + type NoMethod Pod + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Process: Represents an operating system process. type Process struct { // Args: Process arguments as JSON encoded strings. @@ -2727,6 +3047,45 @@ func (s *Reference) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Role: Kubernetes Role or ClusterRole. +type Role struct { + // Kind: Role type. + // + // Possible values: + // "KIND_UNSPECIFIED" - Role type is not specified. + // "ROLE" - Kubernetes Role. + // "CLUSTER_ROLE" - Kubernetes ClusterRole. + Kind string `json:"kind,omitempty"` + + // Name: Role name. + Name string `json:"name,omitempty"` + + // Ns: Role namespace. + Ns string `json:"ns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Role) MarshalJSON() ([]byte, error) { + type NoMethod Role + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SecurityCenterSettings: Resource capturing the settings for Security // Center. type SecurityCenterSettings struct { @@ -2735,7 +3094,8 @@ type SecurityCenterSettings struct { // in. The format is `projects/{project_id}`. An empty value disables // logging. This value is only referenced by services that support log // sink. Please refer to the documentation for an updated list of - // compatible services. + // compatible services. This may only be specified for organization + // level onboarding. LogSinkProject string `json:"logSinkProject,omitempty"` // Name: The resource name of the SecurityCenterSettings. Format: @@ -2744,12 +3104,12 @@ type SecurityCenterSettings struct { // projects/{project}/securityCenterSettings Name string `json:"name,omitempty"` - // OnboardingTime: Timestamp of when the customer organization was - // onboarded to SCC. + // OnboardingTime: Output only. Timestamp of when the customer + // organization was onboarded to SCC. OnboardingTime string `json:"onboardingTime,omitempty"` - // OrgServiceAccount: The organization level service account to be used - // for security center components. + // OrgServiceAccount: Output only. The organization level service + // account to be used for security center components. OrgServiceAccount string `json:"orgServiceAccount,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -2898,6 +3258,47 @@ func (s *SecurityMarks) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Subject: Represents a Kubernetes Subject. +type Subject struct { + // Kind: Authentication type for subject. + // + // Possible values: + // "AUTH_TYPE_UNSPECIFIED" - Authentication is not specified. + // "USER" - User with valid certificate. + // "SERVICEACCOUNT" - Users managed by Kubernetes API with credentials + // stored as Secrets. + // "GROUP" - Collection of users. + Kind string `json:"kind,omitempty"` + + // Name: Name for subject. + Name string `json:"name,omitempty"` + + // Ns: Namespace for subject. + Ns string `json:"ns,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Kind") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Kind") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Subject) MarshalJSON() ([]byte, error) { + type NoMethod Subject + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Subscription: Resource capturing the state of an organization's // subscription. type Subscription struct { diff --git a/storagetransfer/v1/storagetransfer-api.json b/storagetransfer/v1/storagetransfer-api.json index 5550b7ccff4..ea352eb1085 100644 --- a/storagetransfer/v1/storagetransfer-api.json +++ b/storagetransfer/v1/storagetransfer-api.json @@ -600,7 +600,7 @@ } } }, - "revision": "20220511", + "revision": "20220714", "rootUrl": "https://storagetransfer.googleapis.com/", "schemas": { "AgentPool": { @@ -654,6 +654,33 @@ }, "type": "object" }, + "AwsS3CompatibleData": { + "description": "An AwsS3CompatibleData resource.", + "id": "AwsS3CompatibleData", + "properties": { + "bucketName": { + "description": "Required. Specifies the name of the bucket.", + "type": "string" + }, + "endpoint": { + "description": "Required. Specifies the endpoint of the storage service.", + "type": "string" + }, + "path": { + "description": "Specifies the root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.", + "type": "string" + }, + "region": { + "description": "Specifies the region to sign requests with. This can be left blank if requests should be signed with an empty region.", + "type": "string" + }, + "s3Metadata": { + "$ref": "S3CompatibleMetadata", + "description": "A S3 compatible metadata." + } + }, + "type": "object" + }, "AwsS3Data": { "description": "An AwsS3Data resource can be a data source, but not a data sink. In an AwsS3Data resource, an object's name is the S3 object's key name.", "id": "AwsS3Data", @@ -1273,6 +1300,69 @@ }, "type": "object" }, + "S3CompatibleMetadata": { + "description": "S3CompatibleMetadata contains the metadata fields that apply to the basic types of S3-compatible data providers.", + "id": "S3CompatibleMetadata", + "properties": { + "authMethod": { + "description": "Specifies the authentication and authorization method used by the storage service. When not specified, Transfer Service will attempt to determine right auth method to use.", + "enum": [ + "AUTH_METHOD_UNSPECIFIED", + "AUTH_METHOD_AWS_SIGNATURE_V4", + "AUTH_METHOD_AWS_SIGNATURE_V2" + ], + "enumDescriptions": [ + "AuthMethod is not specified.", + "Auth requests with AWS SigV4.", + "Auth requests with AWS SigV2." + ], + "type": "string" + }, + "listApi": { + "description": "The Listing API to use for discovering objects. When not specified, Transfer Service will attempt to determine the right API to use.", + "enum": [ + "LIST_API_UNSPECIFIED", + "LIST_OBJECTS_V2", + "LIST_OBJECTS" + ], + "enumDescriptions": [ + "ListApi is not specified.", + "Perform listing using ListObjectsV2 API.", + "Legacy ListObjects API." + ], + "type": "string" + }, + "protocol": { + "description": "Specifies the network protocol of the agent. When not specified, the default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used.", + "enum": [ + "NETWORK_PROTOCOL_UNSPECIFIED", + "NETWORK_PROTOCOL_HTTPS", + "NETWORK_PROTOCOL_HTTP" + ], + "enumDescriptions": [ + "NetworkProtocol is not specified.", + "Perform requests using HTTPS.", + "Not recommended: This sends data in clear-text. This is only appropriate within a closed network or for publicly available data. Perform requests using HTTP." + ], + "type": "string" + }, + "requestModel": { + "description": "Specifies the API request model used to call the storage service. When not specified, the default value of RequestModel REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used.", + "enum": [ + "REQUEST_MODEL_UNSPECIFIED", + "REQUEST_MODEL_VIRTUAL_HOSTED_STYLE", + "REQUEST_MODEL_PATH_STYLE" + ], + "enumDescriptions": [ + "RequestModel is not specified.", + "Perform requests using Virtual Hosted Style. Example: https://bucket-name.s3.region.amazonaws.com/key-name", + "Perform requests using Path Style. Example: https://s3.region.amazonaws.com/bucket-name/key-name" + ], + "type": "string" + } + }, + "type": "object" + }, "Schedule": { "description": "Transfers can be scheduled to recur or to run just once.", "id": "Schedule", @@ -1635,7 +1725,7 @@ }, "metadataOptions": { "$ref": "MetadataOptions", - "description": "Represents the selected metadata options for a transfer job. This feature is in Preview." + "description": "Represents the selected metadata options for a transfer job." }, "overwriteObjectsAlreadyExistingInSink": { "description": "When to overwrite objects that already exist in the sink. The default is that only objects that are different from the source are ovewritten. If true, all objects in the sink whose name matches an object in the source are overwritten with the source object.", @@ -1664,6 +1754,10 @@ "description": "Configuration for running a transfer.", "id": "TransferSpec", "properties": { + "awsS3CompatibleDataSource": { + "$ref": "AwsS3CompatibleData", + "description": "An AWS S3 compatible data source." + }, "awsS3DataSource": { "$ref": "AwsS3Data", "description": "An AWS S3 data source." diff --git a/storagetransfer/v1/storagetransfer-gen.go b/storagetransfer/v1/storagetransfer-gen.go index 23373aace8b..80d93ad90f4 100644 --- a/storagetransfer/v1/storagetransfer-gen.go +++ b/storagetransfer/v1/storagetransfer-gen.go @@ -285,6 +285,50 @@ func (s *AwsAccessKey) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AwsS3CompatibleData: An AwsS3CompatibleData resource. +type AwsS3CompatibleData struct { + // BucketName: Required. Specifies the name of the bucket. + BucketName string `json:"bucketName,omitempty"` + + // Endpoint: Required. Specifies the endpoint of the storage service. + Endpoint string `json:"endpoint,omitempty"` + + // Path: Specifies the root path to transfer objects. Must be an empty + // string or full path name that ends with a '/'. This field is treated + // as an object prefix. As such, it should generally not begin with a + // '/'. + Path string `json:"path,omitempty"` + + // Region: Specifies the region to sign requests with. This can be left + // blank if requests should be signed with an empty region. + Region string `json:"region,omitempty"` + + // S3Metadata: A S3 compatible metadata. + S3Metadata *S3CompatibleMetadata `json:"s3Metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BucketName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BucketName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AwsS3CompatibleData) MarshalJSON() ([]byte, error) { + type NoMethod AwsS3CompatibleData + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AwsS3Data: An AwsS3Data resource can be a data source, but not a data // sink. In an AwsS3Data resource, an object's name is the S3 object's // key name. @@ -1420,6 +1464,77 @@ func (s *RunTransferJobRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// S3CompatibleMetadata: S3CompatibleMetadata contains the metadata +// fields that apply to the basic types of S3-compatible data providers. +type S3CompatibleMetadata struct { + // AuthMethod: Specifies the authentication and authorization method + // used by the storage service. When not specified, Transfer Service + // will attempt to determine right auth method to use. + // + // Possible values: + // "AUTH_METHOD_UNSPECIFIED" - AuthMethod is not specified. + // "AUTH_METHOD_AWS_SIGNATURE_V4" - Auth requests with AWS SigV4. + // "AUTH_METHOD_AWS_SIGNATURE_V2" - Auth requests with AWS SigV2. + AuthMethod string `json:"authMethod,omitempty"` + + // ListApi: The Listing API to use for discovering objects. When not + // specified, Transfer Service will attempt to determine the right API + // to use. + // + // Possible values: + // "LIST_API_UNSPECIFIED" - ListApi is not specified. + // "LIST_OBJECTS_V2" - Perform listing using ListObjectsV2 API. + // "LIST_OBJECTS" - Legacy ListObjects API. + ListApi string `json:"listApi,omitempty"` + + // Protocol: Specifies the network protocol of the agent. When not + // specified, the default value of NetworkProtocol + // NETWORK_PROTOCOL_HTTPS is used. + // + // Possible values: + // "NETWORK_PROTOCOL_UNSPECIFIED" - NetworkProtocol is not specified. + // "NETWORK_PROTOCOL_HTTPS" - Perform requests using HTTPS. + // "NETWORK_PROTOCOL_HTTP" - Not recommended: This sends data in + // clear-text. This is only appropriate within a closed network or for + // publicly available data. Perform requests using HTTP. + Protocol string `json:"protocol,omitempty"` + + // RequestModel: Specifies the API request model used to call the + // storage service. When not specified, the default value of + // RequestModel REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used. + // + // Possible values: + // "REQUEST_MODEL_UNSPECIFIED" - RequestModel is not specified. + // "REQUEST_MODEL_VIRTUAL_HOSTED_STYLE" - Perform requests using + // Virtual Hosted Style. Example: + // https://bucket-name.s3.region.amazonaws.com/key-name + // "REQUEST_MODEL_PATH_STYLE" - Perform requests using Path Style. + // Example: https://s3.region.amazonaws.com/bucket-name/key-name + RequestModel string `json:"requestModel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuthMethod") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuthMethod") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *S3CompatibleMetadata) MarshalJSON() ([]byte, error) { + type NoMethod S3CompatibleMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Schedule: Transfers can be scheduled to recur or to run just once. type Schedule struct { // EndTimeOfDay: The time in UTC that no further transfer operations are @@ -1916,7 +2031,7 @@ type TransferOptions struct { DeleteObjectsUniqueInSink bool `json:"deleteObjectsUniqueInSink,omitempty"` // MetadataOptions: Represents the selected metadata options for a - // transfer job. This feature is in Preview. + // transfer job. MetadataOptions *MetadataOptions `json:"metadataOptions,omitempty"` // OverwriteObjectsAlreadyExistingInSink: When to overwrite objects that @@ -1969,6 +2084,9 @@ func (s *TransferOptions) MarshalJSON() ([]byte, error) { // TransferSpec: Configuration for running a transfer. type TransferSpec struct { + // AwsS3CompatibleDataSource: An AWS S3 compatible data source. + AwsS3CompatibleDataSource *AwsS3CompatibleData `json:"awsS3CompatibleDataSource,omitempty"` + // AwsS3DataSource: An AWS S3 data source. AwsS3DataSource *AwsS3Data `json:"awsS3DataSource,omitempty"` @@ -2020,21 +2138,22 @@ type TransferSpec struct { // error. TransferOptions *TransferOptions `json:"transferOptions,omitempty"` - // ForceSendFields is a list of field names (e.g. "AwsS3DataSource") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AwsS3CompatibleDataSource") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AwsS3DataSource") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "AwsS3CompatibleDataSource") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } diff --git a/tpu/v1/tpu-api.json b/tpu/v1/tpu-api.json index 345816125a7..16b700e9ef6 100644 --- a/tpu/v1/tpu-api.json +++ b/tpu/v1/tpu-api.json @@ -659,7 +659,7 @@ } } }, - "revision": "20220412", + "revision": "20220714", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorType": { @@ -861,7 +861,7 @@ "V2_ALPHA1" ], "enumDescriptions": [ - "API version is unknown.", + "LINT.IfChange API version is unknown.", "TPU API V1Alpha1 version.", "TPU API V1 version.", "TPU API V2Alpha1 version." @@ -969,7 +969,7 @@ "UNHIDING" ], "enumDescriptions": [ - "TPU node state is not known/set.", + "LINT.IfChange TPU node state is not known/set.", "TPU node is being created.", "TPU node has been created.", "TPU node is restarting.", @@ -983,7 +983,7 @@ "TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", "TPU node is currently hiding.", "TPU node has been hidden.", - "TPU node is currently unhiding." + "TPU node is currently unhiding. LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tpu/api/gce_tpu.proto)" ], "readOnly": true, "type": "string" diff --git a/tpu/v1/tpu-gen.go b/tpu/v1/tpu-gen.go index 9aba5ded5b3..8e852e4966d 100644 --- a/tpu/v1/tpu-gen.go +++ b/tpu/v1/tpu-gen.go @@ -533,7 +533,7 @@ type Node struct { // ApiVersion: Output only. The API version that created this Node. // // Possible values: - // "API_VERSION_UNSPECIFIED" - API version is unknown. + // "API_VERSION_UNSPECIFIED" - LINT.IfChange API version is unknown. // "V1_ALPHA1" - TPU API V1Alpha1 version. // "V1" - TPU API V1 version. // "V2_ALPHA1" - TPU API V2Alpha1 version. @@ -612,7 +612,8 @@ type Node struct { // State: Output only. The current state for the TPU Node. // // Possible values: - // "STATE_UNSPECIFIED" - TPU node state is not known/set. + // "STATE_UNSPECIFIED" - LINT.IfChange TPU node state is not + // known/set. // "CREATING" - TPU node is being created. // "READY" - TPU node has been created. // "RESTARTING" - TPU node is restarting. @@ -630,6 +631,8 @@ type Node struct { // "HIDING" - TPU node is currently hiding. // "HIDDEN" - TPU node has been hidden. // "UNHIDING" - TPU node is currently unhiding. + // LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tp + // u/api/gce_tpu.proto) State string `json:"state,omitempty"` // Symptoms: Output only. The Symptoms that have occurred to the TPU diff --git a/tpu/v1alpha1/tpu-api.json b/tpu/v1alpha1/tpu-api.json index 5d9598451b1..2439f9b90cf 100644 --- a/tpu/v1alpha1/tpu-api.json +++ b/tpu/v1alpha1/tpu-api.json @@ -669,7 +669,7 @@ } } }, - "revision": "20220412", + "revision": "20220714", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorType": { @@ -871,7 +871,7 @@ "V2_ALPHA1" ], "enumDescriptions": [ - "API version is unknown.", + "LINT.IfChange API version is unknown.", "TPU API V1Alpha1 version.", "TPU API V1 version.", "TPU API V2Alpha1 version." @@ -979,7 +979,7 @@ "UNHIDING" ], "enumDescriptions": [ - "TPU node state is not known/set.", + "LINT.IfChange TPU node state is not known/set.", "TPU node is being created.", "TPU node has been created.", "TPU node is restarting.", @@ -993,7 +993,7 @@ "TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", "TPU node is currently hiding.", "TPU node has been hidden.", - "TPU node is currently unhiding." + "TPU node is currently unhiding. LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tpu/api/gce_tpu.proto)" ], "readOnly": true, "type": "string" diff --git a/tpu/v1alpha1/tpu-gen.go b/tpu/v1alpha1/tpu-gen.go index 3c8181db5f5..25437abf6d1 100644 --- a/tpu/v1alpha1/tpu-gen.go +++ b/tpu/v1alpha1/tpu-gen.go @@ -533,7 +533,7 @@ type Node struct { // ApiVersion: Output only. The API version that created this Node. // // Possible values: - // "API_VERSION_UNSPECIFIED" - API version is unknown. + // "API_VERSION_UNSPECIFIED" - LINT.IfChange API version is unknown. // "V1_ALPHA1" - TPU API V1Alpha1 version. // "V1" - TPU API V1 version. // "V2_ALPHA1" - TPU API V2Alpha1 version. @@ -612,7 +612,8 @@ type Node struct { // State: Output only. The current state for the TPU Node. // // Possible values: - // "STATE_UNSPECIFIED" - TPU node state is not known/set. + // "STATE_UNSPECIFIED" - LINT.IfChange TPU node state is not + // known/set. // "CREATING" - TPU node is being created. // "READY" - TPU node has been created. // "RESTARTING" - TPU node is restarting. @@ -630,6 +631,8 @@ type Node struct { // "HIDING" - TPU node is currently hiding. // "HIDDEN" - TPU node has been hidden. // "UNHIDING" - TPU node is currently unhiding. + // LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tp + // u/api/gce_tpu.proto) State string `json:"state,omitempty"` // Symptoms: Output only. The Symptoms that have occurred to the TPU diff --git a/tpu/v2alpha1/tpu-api.json b/tpu/v2alpha1/tpu-api.json index b126aa0a155..b42f5f98eb5 100644 --- a/tpu/v2alpha1/tpu-api.json +++ b/tpu/v2alpha1/tpu-api.json @@ -759,7 +759,7 @@ } } }, - "revision": "20220629", + "revision": "20220714", "rootUrl": "https://tpu.googleapis.com/", "schemas": { "AcceleratorType": { @@ -1122,7 +1122,7 @@ "V2_ALPHA1" ], "enumDescriptions": [ - "API version is unknown.", + "LINT.IfChange API version is unknown.", "TPU API V1Alpha1 version.", "TPU API V1 version.", "TPU API V2Alpha1 version." @@ -1243,7 +1243,7 @@ "UNHIDING" ], "enumDescriptions": [ - "TPU node state is not known/set.", + "LINT.IfChange TPU node state is not known/set.", "TPU node is being created.", "TPU node has been created.", "TPU node is restarting.", @@ -1257,7 +1257,7 @@ "TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", "TPU node is currently hiding.", "TPU node has been hidden.", - "TPU node is currently unhiding." + "TPU node is currently unhiding. LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tpu/api/gce_tpu.proto)" ], "readOnly": true, "type": "string" diff --git a/tpu/v2alpha1/tpu-gen.go b/tpu/v2alpha1/tpu-gen.go index 96694af1837..ab1b356f2ed 100644 --- a/tpu/v2alpha1/tpu-gen.go +++ b/tpu/v2alpha1/tpu-gen.go @@ -847,7 +847,7 @@ type Node struct { // ApiVersion: Output only. The API version that created this Node. // // Possible values: - // "API_VERSION_UNSPECIFIED" - API version is unknown. + // "API_VERSION_UNSPECIFIED" - LINT.IfChange API version is unknown. // "V1_ALPHA1" - TPU API V1Alpha1 version. // "V1" - TPU API V1 version. // "V2_ALPHA1" - TPU API V2Alpha1 version. @@ -924,7 +924,8 @@ type Node struct { // State: Output only. The current state for the TPU Node. // // Possible values: - // "STATE_UNSPECIFIED" - TPU node state is not known/set. + // "STATE_UNSPECIFIED" - LINT.IfChange TPU node state is not + // known/set. // "CREATING" - TPU node is being created. // "READY" - TPU node has been created. // "RESTARTING" - TPU node is restarting. @@ -942,6 +943,8 @@ type Node struct { // "HIDING" - TPU node is currently hiding. // "HIDDEN" - TPU node has been hidden. // "UNHIDING" - TPU node is currently unhiding. + // LINT.ThenChange(//depot/google3/java/com/google/cloud/boq/clientapi/tp + // u/api/gce_tpu.proto) State string `json:"state,omitempty"` // Symptoms: Output only. The Symptoms that have occurred to the TPU From ed487e60821cda07a2ee77e52e8a8c71d4d0152f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Jul 2022 16:06:46 -0600 Subject: [PATCH 6/6] chore(main): release 0.88.0 (#1617) --- CHANGES.md | 7 +++++++ internal/version.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index bc5f2a030c1..2771bc1f01d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [0.88.0](https://github.com/googleapis/google-api-go-client/compare/v0.87.0...v0.88.0) (2022-07-19) + + +### Features + +* **all:** auto-regenerate discovery clients, refs [#1624](https://github.com/googleapis/google-api-go-client/issues/1624) [#1622](https://github.com/googleapis/google-api-go-client/issues/1622) [#1620](https://github.com/googleapis/google-api-go-client/issues/1620) [#1619](https://github.com/googleapis/google-api-go-client/issues/1619) [#1616](https://github.com/googleapis/google-api-go-client/issues/1616) + ## [0.87.0](https://github.com/googleapis/google-api-go-client/compare/v0.86.0...v0.87.0) (2022-07-12) diff --git a/internal/version.go b/internal/version.go index e04d8dac7f3..a0ec7adb4c1 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.87.0" +const Version = "0.88.0"