diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index 2fe13357d35..5862702f900 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -4630,7 +4630,7 @@ } } }, - "revision": "20221018", + "revision": "20221020", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -7955,10 +7955,6 @@ "UserName": { "id": "UserName", "properties": { - "displayName": { - "description": "The user's display name. Limit: 256 characters.", - "type": "string" - }, "familyName": { "annotations": { "required": [ diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index fceb54a6292..4c4a112220a 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -5735,9 +5735,6 @@ func (s *UserMakeAdmin) MarshalJSON() ([]byte, error) { } type UserName struct { - // DisplayName: The user's display name. Limit: 256 characters. - DisplayName string `json:"displayName,omitempty"` - // FamilyName: The user's last name. Required when creating a user // account. FamilyName string `json:"familyName,omitempty"` @@ -5750,7 +5747,7 @@ type UserName struct { // account. GivenName string `json:"givenName,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "FamilyName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5758,10 +5755,10 @@ type UserName struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "FamilyName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if 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/admob/v1/admob-api.json b/admob/v1/admob-api.json index a8a864b4949..bb6a1183f49 100644 --- a/admob/v1/admob-api.json +++ b/admob/v1/admob-api.json @@ -321,7 +321,7 @@ } } }, - "revision": "20220520", + "revision": "20221024", "rootUrl": "https://admob.googleapis.com/", "schemas": { "AdUnit": { @@ -329,7 +329,7 @@ "id": "AdUnit", "properties": { "adFormat": { - "description": "AdFormat of the ad unit. Possible values are as follows: \"BANNER\" - Banner ad format. \"BANNER_INTERSTITIAL\" - Legacy format that can be used as either banner or interstitial. This format can no longer be created but can be targeted by mediation groups. \"INTERSTITIAL\" - A full screen ad. Supported ad types are \"RICH_MEDIA\" and \"VIDEO\". \"NATIVE\" - Native ad format. \"REWARDED\" - An ad that, once viewed, gets a callback verifying the view so that a reward can be given to the user. Supported ad types are \"RICH_MEDIA\" (interactive) and video where video can not be excluded.", + "description": "AdFormat of the ad unit. Possible values are as follows: \"APP_OPEN\" - App Open ad format. \"BANNER\" - Banner ad format. \"BANNER_INTERSTITIAL\" - Legacy format that can be used as either banner or interstitial. This format can no longer be created but can be targeted by mediation groups. \"INTERSTITIAL\" - A full screen ad. Supported ad types are \"RICH_MEDIA\" and \"VIDEO\". \"NATIVE\" - Native ad format. \"REWARDED\" - An ad that, once viewed, gets a callback verifying the view so that a reward can be given to the user. Supported ad types are \"RICH_MEDIA\" (interactive) and video where video can not be excluded. \"REWARDED_INTERSTITIAL\" - Rewarded Interstitial ad format. Only supports video ad type. See https://support.google.com/admob/answer/9884467.", "type": "string" }, "adTypes": { diff --git a/admob/v1/admob-gen.go b/admob/v1/admob-gen.go index 03a364da16e..da01159edf5 100644 --- a/admob/v1/admob-gen.go +++ b/admob/v1/admob-gen.go @@ -204,14 +204,17 @@ type AccountsNetworkReportService struct { // AdUnit: Describes an AdMob ad unit. type AdUnit struct { // AdFormat: AdFormat of the ad unit. Possible values are as follows: - // "BANNER" - Banner ad format. "BANNER_INTERSTITIAL" - Legacy format - // that can be used as either banner or interstitial. This format can no - // longer be created but can be targeted by mediation groups. - // "INTERSTITIAL" - A full screen ad. Supported ad types are - // "RICH_MEDIA" and "VIDEO". "NATIVE" - Native ad format. "REWARDED" - - // An ad that, once viewed, gets a callback verifying the view so that a - // reward can be given to the user. Supported ad types are "RICH_MEDIA" - // (interactive) and video where video can not be excluded. + // "APP_OPEN" - App Open ad format. "BANNER" - Banner ad format. + // "BANNER_INTERSTITIAL" - Legacy format that can be used as either + // banner or interstitial. This format can no longer be created but can + // be targeted by mediation groups. "INTERSTITIAL" - A full screen ad. + // Supported ad types are "RICH_MEDIA" and "VIDEO". "NATIVE" - Native ad + // format. "REWARDED" - An ad that, once viewed, gets a callback + // verifying the view so that a reward can be given to the user. + // Supported ad types are "RICH_MEDIA" (interactive) and video where + // video can not be excluded. "REWARDED_INTERSTITIAL" - Rewarded + // Interstitial ad format. Only supports video ad type. See + // https://support.google.com/admob/answer/9884467. AdFormat string `json:"adFormat,omitempty"` // AdTypes: Ad media type supported by this ad unit. Possible values as diff --git a/admob/v1beta/admob-api.json b/admob/v1beta/admob-api.json index 281b3224388..e297c31c50e 100644 --- a/admob/v1beta/admob-api.json +++ b/admob/v1beta/admob-api.json @@ -359,7 +359,7 @@ } } }, - "revision": "20220520", + "revision": "20221024", "rootUrl": "https://admob.googleapis.com/", "schemas": { "AdSource": { @@ -386,7 +386,7 @@ "id": "AdUnit", "properties": { "adFormat": { - "description": "AdFormat of the ad unit. Possible values are as follows: \"BANNER\" - Banner ad format. \"BANNER_INTERSTITIAL\" - Legacy format that can be used as either banner or interstitial. This format can no longer be created but can be targeted by mediation groups. \"INTERSTITIAL\" - A full screen ad. Supported ad types are \"RICH_MEDIA\" and \"VIDEO\". \"NATIVE\" - Native ad format. \"REWARDED\" - An ad that, once viewed, gets a callback verifying the view so that a reward can be given to the user. Supported ad types are \"RICH_MEDIA\" (interactive) and video where video can not be excluded.", + "description": "AdFormat of the ad unit. Possible values are as follows: \"APP_OPEN\" - App Open ad format. \"BANNER\" - Banner ad format. \"BANNER_INTERSTITIAL\" - Legacy format that can be used as either banner or interstitial. This format can no longer be created but can be targeted by mediation groups. \"INTERSTITIAL\" - A full screen ad. Supported ad types are \"RICH_MEDIA\" and \"VIDEO\". \"NATIVE\" - Native ad format. \"REWARDED\" - An ad that, once viewed, gets a callback verifying the view so that a reward can be given to the user. Supported ad types are \"RICH_MEDIA\" (interactive) and video where video can not be excluded. \"REWARDED_INTERSTITIAL\" - Rewarded Interstitial ad format. Only supports video ad type. See https://support.google.com/admob/answer/9884467.", "type": "string" }, "adTypes": { diff --git a/admob/v1beta/admob-gen.go b/admob/v1beta/admob-gen.go index 0dfcd237d4c..3bd582e0d66 100644 --- a/admob/v1beta/admob-gen.go +++ b/admob/v1beta/admob-gen.go @@ -251,14 +251,17 @@ func (s *AdSource) MarshalJSON() ([]byte, error) { // AdUnit: Describes an AdMob ad unit. type AdUnit struct { // AdFormat: AdFormat of the ad unit. Possible values are as follows: - // "BANNER" - Banner ad format. "BANNER_INTERSTITIAL" - Legacy format - // that can be used as either banner or interstitial. This format can no - // longer be created but can be targeted by mediation groups. - // "INTERSTITIAL" - A full screen ad. Supported ad types are - // "RICH_MEDIA" and "VIDEO". "NATIVE" - Native ad format. "REWARDED" - - // An ad that, once viewed, gets a callback verifying the view so that a - // reward can be given to the user. Supported ad types are "RICH_MEDIA" - // (interactive) and video where video can not be excluded. + // "APP_OPEN" - App Open ad format. "BANNER" - Banner ad format. + // "BANNER_INTERSTITIAL" - Legacy format that can be used as either + // banner or interstitial. This format can no longer be created but can + // be targeted by mediation groups. "INTERSTITIAL" - A full screen ad. + // Supported ad types are "RICH_MEDIA" and "VIDEO". "NATIVE" - Native ad + // format. "REWARDED" - An ad that, once viewed, gets a callback + // verifying the view so that a reward can be given to the user. + // Supported ad types are "RICH_MEDIA" (interactive) and video where + // video can not be excluded. "REWARDED_INTERSTITIAL" - Rewarded + // Interstitial ad format. Only supports video ad type. See + // https://support.google.com/admob/answer/9884467. AdFormat string `json:"adFormat,omitempty"` // AdTypes: Ad media type supported by this ad unit. Possible values as diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json index 8b1cd0f4884..dcf44553182 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json @@ -632,7 +632,7 @@ } }, "metadata": { - "description": "Updates reseller metadata associated with the device.", + "description": "Updates reseller metadata associated with the device. Android devices only.", "flatPath": "v1/partners/{partnersId}/devices/{devicesId}/metadata", "httpMethod": "POST", "id": "androiddeviceprovisioning.partners.devices.metadata", @@ -719,7 +719,7 @@ } }, "updateMetadataAsync": { - "description": "Updates the reseller metadata attached to a batch of devices. This method updates devices asynchronously and returns an `Operation` that can be used to track progress. Read [Long‑running batch operations](/zero-touch/guides/how-it-works#operations).", + "description": "Updates the reseller metadata attached to a batch of devices. This method updates devices asynchronously and returns an `Operation` that can be used to track progress. Read [Long‑running batch operations](/zero-touch/guides/how-it-works#operations). Android Devices only.", "flatPath": "v1/partners/{partnersId}/devices:updateMetadataAsync", "httpMethod": "POST", "id": "androiddeviceprovisioning.partners.devices.updateMetadataAsync", @@ -825,7 +825,7 @@ } } }, - "revision": "20220319", + "revision": "20221023", "rootUrl": "https://androiddeviceprovisioning.googleapis.com/", "schemas": { "ClaimDeviceRequest": { @@ -833,7 +833,7 @@ "id": "ClaimDeviceRequest", "properties": { "customerId": { - "description": "Required. The ID of the customer for whom the device is being claimed.", + "description": "The ID of the customer for whom the device is being claimed.", "format": "int64", "type": "string" }, @@ -845,6 +845,14 @@ "$ref": "DeviceMetadata", "description": "Optional. The metadata to attach to the device." }, + "googleWorkspaceCustomerId": { + "description": "The Google Workspace customer ID.", + "type": "string" + }, + "preProvisioningToken": { + "description": "Optional. Must and can only be set for Chrome OS devices.", + "type": "string" + }, "sectionType": { "description": "Required. The section type of the device's provisioning record.", "enum": [ @@ -913,6 +921,11 @@ "description": "Required. The name of the company. For example _XYZ Corp_. Displayed to the company's employees in the zero-touch enrollment portal.", "type": "string" }, + "googleWorkspaceAccount": { + "$ref": "GoogleWorkspaceAccount", + "description": "Output only. The Google Workspace account associated with this customer. Only used for customer Companies.", + "readOnly": true + }, "languageCode": { "description": "Input only. The preferred locale of the customer represented as a BCP47 language code. This field is validated on input and requests containing unsupported language codes will be rejected. Supported language codes: Arabic (ar) Chinese (Hong Kong) (zh-HK) Chinese (Simplified) (zh-CN) Chinese (Traditional) (zh-TW) Czech (cs) Danish (da) Dutch (nl) English (UK) (en-GB) English (US) (en-US) Filipino (fil) Finnish (fi) French (fr) German (de) Hebrew (iw) Hindi (hi) Hungarian (hu) Indonesian (id) Italian (it) Japanese (ja) Korean (ko) Norwegian (Bokmal) (no) Polish (pl) Portuguese (Brazil) (pt-BR) Portuguese (Portugal) (pt-PT) Russian (ru) Spanish (es) Spanish (Latin America) (es-419) Swedish (sv) Thai (th) Turkish (tr) Ukrainian (uk) Vietnamese (vi)", "type": "string" @@ -1116,7 +1129,7 @@ "type": "object" }, "Device": { - "description": "An Android device registered for zero-touch enrollment.", + "description": "An Android or Chrome OS device registered for zero-touch enrollment.", "id": "Device", "properties": { "claims": { @@ -1169,8 +1182,12 @@ ], "type": "string" }, + "googleWorkspaceCustomerId": { + "description": "The ID of the Google Workspace account that owns the Chrome OS device.", + "type": "string" + }, "ownerCompanyId": { - "description": "The ID of the Customer that purchased the device.", + "description": "The ID of the Customer that purchased the Android device.", "format": "int64", "type": "string" }, @@ -1211,12 +1228,30 @@ "description": "Encapsulates hardware and product IDs to identify a manufactured device. To understand requirements on identifier sets, read [Identifiers](https://developers.google.com/zero-touch/guides/identifiers).", "id": "DeviceIdentifier", "properties": { + "chromeOsAttestedDeviceId": { + "description": "An identifier provided by OEMs, carried through the production and sales process. Only applicable to Chrome OS devices.", + "type": "string" + }, + "deviceType": { + "description": "The type of the device", + "enum": [ + "DEVICE_TYPE_UNSPECIFIED", + "DEVICE_TYPE_ANDROID", + "DEVICE_TYPE_CHROME_OS" + ], + "enumDescriptions": [ + "Device type is not specified.", + "Android device", + "Chrome OS device" + ], + "type": "string" + }, "imei": { "description": "The device’s IMEI number. Validated on input.", "type": "string" }, "manufacturer": { - "description": "The device manufacturer’s name. Matches the device's built-in value returned from `android.os.Build.MANUFACTURER`. Allowed values are listed in [manufacturers](/zero-touch/resources/manufacturer-names#manufacturers-names).", + "description": "The device manufacturer’s name. Matches the device's built-in value returned from `android.os.Build.MANUFACTURER`. Allowed values are listed in [Android manufacturers](/zero-touch/resources/manufacturer-names#manufacturers-names).", "type": "string" }, "meid": { @@ -1224,7 +1259,7 @@ "type": "string" }, "model": { - "description": "The device model's name. Matches the device's built-in value returned from `android.os.Build.MODEL`. Allowed values are listed in [models](/zero-touch/resources/manufacturer-names#model-names).", + "description": "The device model's name. Allowed values are listed in [Android models](/zero-touch/resources/manufacturer-names#model-names) and [Chrome OS models](https://support.google.com/chrome/a/answer/10130175?hl=en#identify_compatible).", "type": "string" }, "serialNumber": { @@ -1290,7 +1325,7 @@ "type": "string" }, "progress": { - "description": "The processing progress of the operation. Measured as a number from 0 to 100. A value of 10O doesnt always mean the operation completed—check for the inclusion of a `done` field.", + "description": "The processing progress of the operation. Measured as a number from 0 to 100. A value of 10O doesn't always mean the operation completed—check for the inclusion of a `done` field.", "format": "int32", "type": "integer" } @@ -1392,13 +1427,20 @@ "id": "FindDevicesByOwnerRequest", "properties": { "customerId": { - "description": "Required. The list of customer IDs to search for.", + "description": "The list of customer IDs to search for.", "items": { "format": "int64", "type": "string" }, "type": "array" }, + "googleWorkspaceCustomerId": { + "description": "The list of IDs of Google Workspace accounts to search for.", + "items": { + "type": "string" + }, + "type": "array" + }, "limit": { "description": "Required. The maximum number of devices to show in a page of results. Must be between 1 and 100 inclusive.", "format": "int64", @@ -1448,6 +1490,25 @@ }, "type": "object" }, + "GoogleWorkspaceAccount": { + "description": "A Google Workspace customer.", + "id": "GoogleWorkspaceAccount", + "properties": { + "customerId": { + "description": "Required. The customer ID.", + "type": "string" + }, + "preProvisioningTokens": { + "description": "Output only. The pre-provisioning tokens previously used to claim devices.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "ListCustomersResponse": { "description": "Response message of all customers related to this partner.", "id": "ListCustomersResponse", @@ -1580,7 +1641,7 @@ "id": "PartnerClaim", "properties": { "customerId": { - "description": "Required. The ID of the customer for whom the device is being claimed.", + "description": "The ID of the customer for whom the device is being claimed.", "format": "int64", "type": "string" }, @@ -1592,6 +1653,14 @@ "$ref": "DeviceMetadata", "description": "Required. The metadata to attach to the device at claim." }, + "googleWorkspaceCustomerId": { + "description": "The Google Workspace customer ID.", + "type": "string" + }, + "preProvisioningToken": { + "description": "Optional. Must and can only be set for Chrome OS devices.", + "type": "string" + }, "sectionType": { "description": "Required. The section type of the device's provisioning record.", "enum": [ @@ -1654,7 +1723,7 @@ "id": "PerDeviceStatusInBatch", "properties": { "deviceId": { - "description": "If processing succeeds, the device ID of the device.", + "description": "If processing succeeds, the device ID of the Android device.", "format": "int64", "type": "string" }, @@ -1676,7 +1745,9 @@ "SINGLE_DEVICE_STATUS_PERMISSION_DENIED", "SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER", "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE", - "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" + "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS", + "SINGLE_DEVICE_STATUS_INVALID_TOKEN", + "SINGLE_DEVICE_STATUS_REVOKED_TOKEN" ], "enumDescriptions": [ "Invalid code. Shouldn't be used.", @@ -1686,7 +1757,9 @@ "Permission denied.", "Invalid device identifier.", "Invalid section type.", - "This section is claimed by another company." + "This section is claimed by another company.", + "Invalid pre-provisioning token.", + "Revoked pre-provisioning token." ], "type": "string" } diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go index 903013925ad..18e24547f86 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go @@ -245,8 +245,8 @@ type PartnersVendorsCustomersService struct { // ClaimDeviceRequest: Request message to claim a device on behalf of a // customer. type ClaimDeviceRequest struct { - // CustomerId: Required. The ID of the customer for whom the device is - // being claimed. + // CustomerId: The ID of the customer for whom the device is being + // claimed. CustomerId int64 `json:"customerId,omitempty,string"` // DeviceIdentifier: Required. Required. The device identifier of the @@ -256,6 +256,13 @@ type ClaimDeviceRequest struct { // DeviceMetadata: Optional. The metadata to attach to the device. DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"` + // GoogleWorkspaceCustomerId: The Google Workspace customer ID. + GoogleWorkspaceCustomerId string `json:"googleWorkspaceCustomerId,omitempty"` + + // PreProvisioningToken: Optional. Must and can only be set for Chrome + // OS devices. + PreProvisioningToken string `json:"preProvisioningToken,omitempty"` + // SectionType: Required. The section type of the device's provisioning // record. // @@ -371,6 +378,10 @@ type Company struct { // enrollment portal. CompanyName string `json:"companyName,omitempty"` + // GoogleWorkspaceAccount: Output only. The Google Workspace account + // associated with this customer. Only used for customer Companies. + GoogleWorkspaceAccount *GoogleWorkspaceAccount `json:"googleWorkspaceAccount,omitempty"` + // LanguageCode: Input only. The preferred locale of the customer // represented as a BCP47 language code. This field is validated on // input and requests containing unsupported language codes will be @@ -806,7 +817,8 @@ func (s *CustomerUnclaimDeviceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// Device: An Android device registered for zero-touch enrollment. +// Device: An Android or Chrome OS device registered for zero-touch +// enrollment. type Device struct { // Claims: Output only. The provisioning claims for a device. Devices // claimed for zero-touch enrollment have a claim with the type @@ -876,7 +888,12 @@ type DeviceClaim struct { // protection service you must enroll with the partnership team. AdditionalService string `json:"additionalService,omitempty"` - // OwnerCompanyId: The ID of the Customer that purchased the device. + // GoogleWorkspaceCustomerId: The ID of the Google Workspace account + // that owns the Chrome OS device. + GoogleWorkspaceCustomerId string `json:"googleWorkspaceCustomerId,omitempty"` + + // OwnerCompanyId: The ID of the Customer that purchased the Android + // device. OwnerCompanyId int64 `json:"ownerCompanyId,omitempty,string"` // ResellerId: The ID of the reseller that claimed the device. @@ -929,41 +946,57 @@ func (s *DeviceClaim) MarshalJSON() ([]byte, error) { // read Identifiers // (https://developers.google.com/zero-touch/guides/identifiers). type DeviceIdentifier struct { + // ChromeOsAttestedDeviceId: An identifier provided by OEMs, carried + // through the production and sales process. Only applicable to Chrome + // OS devices. + ChromeOsAttestedDeviceId string `json:"chromeOsAttestedDeviceId,omitempty"` + + // DeviceType: The type of the device + // + // Possible values: + // "DEVICE_TYPE_UNSPECIFIED" - Device type is not specified. + // "DEVICE_TYPE_ANDROID" - Android device + // "DEVICE_TYPE_CHROME_OS" - Chrome OS device + DeviceType string `json:"deviceType,omitempty"` + // Imei: The device’s IMEI number. Validated on input. Imei string `json:"imei,omitempty"` // Manufacturer: The device manufacturer’s name. Matches the device's // built-in value returned from `android.os.Build.MANUFACTURER`. Allowed - // values are listed in manufacturers + // values are listed in Android manufacturers // (/zero-touch/resources/manufacturer-names#manufacturers-names). Manufacturer string `json:"manufacturer,omitempty"` // Meid: The device’s MEID number. Meid string `json:"meid,omitempty"` - // Model: The device model's name. Matches the device's built-in value - // returned from `android.os.Build.MODEL`. Allowed values are listed in - // models (/zero-touch/resources/manufacturer-names#model-names). + // Model: The device model's name. Allowed values are listed in Android + // models (/zero-touch/resources/manufacturer-names#model-names) and + // Chrome OS models + // (https://support.google.com/chrome/a/answer/10130175?hl=en#identify_compatible). Model string `json:"model,omitempty"` // SerialNumber: The manufacturer's serial number for the device. This // value might not be unique across different device models. SerialNumber string `json:"serialNumber,omitempty"` - // ForceSendFields is a list of field names (e.g. "Imei") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent 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. + // "ChromeOsAttestedDeviceId") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Imei") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "ChromeOsAttestedDeviceId") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -1068,8 +1101,8 @@ type DevicesLongRunningOperationMetadata struct { ProcessingStatus string `json:"processingStatus,omitempty"` // Progress: The processing progress of the operation. Measured as a - // number from 0 to 100. A value of 10O doesnt always mean the operation - // completed—check for the inclusion of a `done` field. + // number from 0 to 100. A value of 10O doesn't always mean the + // operation completed—check for the inclusion of a `done` field. Progress int64 `json:"progress,omitempty"` // ForceSendFields is a list of field names (e.g. "DevicesCount") to @@ -1270,9 +1303,13 @@ func (s *FindDevicesByDeviceIdentifierResponse) MarshalJSON() ([]byte, error) { // FindDevicesByOwnerRequest: Request to find devices by customers. type FindDevicesByOwnerRequest struct { - // CustomerId: Required. The list of customer IDs to search for. + // CustomerId: The list of customer IDs to search for. CustomerId googleapi.Int64s `json:"customerId,omitempty"` + // GoogleWorkspaceCustomerId: The list of IDs of Google Workspace + // accounts to search for. + GoogleWorkspaceCustomerId []string `json:"googleWorkspaceCustomerId,omitempty"` + // Limit: Required. The maximum number of devices to show in a page of // results. Must be between 1 and 100 inclusive. Limit int64 `json:"limit,omitempty,string"` @@ -1352,6 +1389,38 @@ func (s *FindDevicesByOwnerResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleWorkspaceAccount: A Google Workspace customer. +type GoogleWorkspaceAccount struct { + // CustomerId: Required. The customer ID. + CustomerId string `json:"customerId,omitempty"` + + // PreProvisioningTokens: Output only. The pre-provisioning tokens + // previously used to claim devices. + PreProvisioningTokens []string `json:"preProvisioningTokens,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomerId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomerId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleWorkspaceAccount) MarshalJSON() ([]byte, error) { + type NoMethod GoogleWorkspaceAccount + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListCustomersResponse: Response message of all customers related to // this partner. type ListCustomersResponse struct { @@ -1575,8 +1644,8 @@ func (s *OperationPerDevice) MarshalJSON() ([]byte, error) { // PartnerClaim: Identifies one claim request. type PartnerClaim struct { - // CustomerId: Required. The ID of the customer for whom the device is - // being claimed. + // CustomerId: The ID of the customer for whom the device is being + // claimed. CustomerId int64 `json:"customerId,omitempty,string"` // DeviceIdentifier: Required. Required. Device identifier of the @@ -1587,6 +1656,13 @@ type PartnerClaim struct { // claim. DeviceMetadata *DeviceMetadata `json:"deviceMetadata,omitempty"` + // GoogleWorkspaceCustomerId: The Google Workspace customer ID. + GoogleWorkspaceCustomerId string `json:"googleWorkspaceCustomerId,omitempty"` + + // PreProvisioningToken: Optional. Must and can only be set for Chrome + // OS devices. + PreProvisioningToken string `json:"preProvisioningToken,omitempty"` + // SectionType: Required. The section type of the device's provisioning // record. // @@ -1671,7 +1747,8 @@ func (s *PartnerUnclaim) MarshalJSON() ([]byte, error) { // PerDeviceStatusInBatch: Captures the processing status for each // device in the operation. type PerDeviceStatusInBatch struct { - // DeviceId: If processing succeeds, the device ID of the device. + // DeviceId: If processing succeeds, the device ID of the Android + // device. DeviceId int64 `json:"deviceId,omitempty,string"` // ErrorIdentifier: If processing fails, the error type. @@ -1697,6 +1774,10 @@ type PerDeviceStatusInBatch struct { // "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE" - Invalid section type. // "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" - This section is claimed // by another company. + // "SINGLE_DEVICE_STATUS_INVALID_TOKEN" - Invalid pre-provisioning + // token. + // "SINGLE_DEVICE_STATUS_REVOKED_TOKEN" - Revoked pre-provisioning + // token. Status string `json:"status,omitempty"` // ForceSendFields is a list of field names (e.g. "DeviceId") to @@ -4988,6 +5069,7 @@ type PartnersDevicesMetadataCall struct { } // Metadata: Updates reseller metadata associated with the device. +// Android devices only. // // - deviceId: The ID of the device. // - metadataOwnerId: The owner of the newly set metadata. Set this to @@ -5092,7 +5174,7 @@ func (c *PartnersDevicesMetadataCall) Do(opts ...googleapi.CallOption) (*DeviceM } return ret, nil // { - // "description": "Updates reseller metadata associated with the device.", + // "description": "Updates reseller metadata associated with the device. Android devices only.", // "flatPath": "v1/partners/{partnersId}/devices/{devicesId}/metadata", // "httpMethod": "POST", // "id": "androiddeviceprovisioning.partners.devices.metadata", @@ -5428,7 +5510,7 @@ type PartnersDevicesUpdateMetadataAsyncCall struct { // batch of devices. This method updates devices asynchronously and // returns an `Operation` that can be used to track progress. Read // Long‑running batch operations -// (/zero-touch/guides/how-it-works#operations). +// (/zero-touch/guides/how-it-works#operations). Android Devices only. // // - partnerId: The reseller partner ID. func (r *PartnersDevicesService) UpdateMetadataAsync(partnerId int64, updatedevicemetadatainbatchrequest *UpdateDeviceMetadataInBatchRequest) *PartnersDevicesUpdateMetadataAsyncCall { @@ -5529,7 +5611,7 @@ func (c *PartnersDevicesUpdateMetadataAsyncCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Updates the reseller metadata attached to a batch of devices. This method updates devices asynchronously and returns an `Operation` that can be used to track progress. Read [Long‑running batch operations](/zero-touch/guides/how-it-works#operations).", + // "description": "Updates the reseller metadata attached to a batch of devices. This method updates devices asynchronously and returns an `Operation` that can be used to track progress. Read [Long‑running batch operations](/zero-touch/guides/how-it-works#operations). Android Devices only.", // "flatPath": "v1/partners/{partnersId}/devices:updateMetadataAsync", // "httpMethod": "POST", // "id": "androiddeviceprovisioning.partners.devices.updateMetadataAsync", diff --git a/androidenterprise/v1/androidenterprise-api.json b/androidenterprise/v1/androidenterprise-api.json index 152d35ac27a..ed333f45c07 100644 --- a/androidenterprise/v1/androidenterprise-api.json +++ b/androidenterprise/v1/androidenterprise-api.json @@ -2610,7 +2610,7 @@ } } }, - "revision": "20220913", + "revision": "20221020", "rootUrl": "https://androidenterprise.googleapis.com/", "schemas": { "Administrator": { @@ -3885,7 +3885,7 @@ "id": "Policy", "properties": { "autoUpdatePolicy": { - "description": "Deprecated. Use autoUpdateMode instead. When autoUpdateMode is set to AUTO_UPDATE_POSTPONED or AUTO_UPDATE_HIGH_PRIORITY, this field has no effect. \"choiceToTheUser\" allows the device's user to configure the app update policy. \"always\" enables auto updates. \"never\" disables auto updates. \"wifiOnly\" enables auto updates only when the device is connected to wifi.", + "description": "Recommended alternative: autoUpdateMode which is set per app, provides greater flexibility around update frequency. When autoUpdateMode is set to AUTO_UPDATE_POSTPONED or AUTO_UPDATE_HIGH_PRIORITY, this field has no effect. \"choiceToTheUser\" allows the device's user to configure the app update policy. \"always\" enables auto updates. \"never\" disables auto updates. \"wifiOnly\" enables auto updates only when the device is connected to wifi.", "enum": [ "autoUpdatePolicyUnspecified", "choiceToTheUser", diff --git a/androidenterprise/v1/androidenterprise-gen.go b/androidenterprise/v1/androidenterprise-gen.go index 59df806be90..43497791da2 100644 --- a/androidenterprise/v1/androidenterprise-gen.go +++ b/androidenterprise/v1/androidenterprise-gen.go @@ -2633,8 +2633,9 @@ func (s *Permission) MarshalJSON() ([]byte, error) { // Policy: The device policy for a given managed device. type Policy struct { - // AutoUpdatePolicy: Deprecated. Use autoUpdateMode instead. When - // autoUpdateMode is set to AUTO_UPDATE_POSTPONED or + // AutoUpdatePolicy: Recommended alternative: autoUpdateMode which is + // set per app, provides greater flexibility around update frequency. + // When autoUpdateMode is set to AUTO_UPDATE_POSTPONED or // AUTO_UPDATE_HIGH_PRIORITY, this field has no effect. // "choiceToTheUser" allows the device's user to configure the app // update policy. "always" enables auto updates. "never" disables auto diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 158c1f18f94..a70895880ea 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1065,7 +1065,7 @@ } } }, - "revision": "20221010", + "revision": "20221017", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -4675,7 +4675,7 @@ "properties": { "blockAction": { "$ref": "BlockAction", - "description": "An action to block access to apps and data on a fully managed device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified." + "description": "An action to block access to apps and data on a company owned device or in a work profile. This action also triggers a user-facing notification with information (where possible) on how to correct the compliance issue. Note: wipeAction must also be specified." }, "settingName": { "description": "The top-level policy to enforce. For example, applications or passwordPolicies.", @@ -4683,7 +4683,7 @@ }, "wipeAction": { "$ref": "WipeAction", - "description": "An action to reset a fully managed device or delete a work profile. Note: blockAction must also be specified." + "description": "An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified." } }, "type": "object" @@ -5527,7 +5527,7 @@ "type": "object" }, "WipeAction": { - "description": "An action to reset a fully managed device or delete a work profile. Note: blockAction must also be specified.", + "description": "An action to reset a company owned device or delete a work profile. Note: blockAction must also be specified.", "id": "WipeAction", "properties": { "preserveFrp": { diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 2a8aa1ee2e1..676d7abb6df 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -5247,8 +5247,8 @@ func (s *Policy) MarshalJSON() ([]byte, error) { // device or work profile is not compliant with the policy specified in // settingName. type PolicyEnforcementRule struct { - // BlockAction: An action to block access to apps and data on a fully - // managed device or in a work profile. This action also triggers a + // BlockAction: An action to block access to apps and data on a company + // owned device or in a work profile. This action also triggers a // user-facing notification with information (where possible) on how to // correct the compliance issue. Note: wipeAction must also be // specified. @@ -5258,7 +5258,7 @@ type PolicyEnforcementRule struct { // applications or passwordPolicies. SettingName string `json:"settingName,omitempty"` - // WipeAction: An action to reset a fully managed device or delete a + // WipeAction: An action to reset a company owned device or delete a // work profile. Note: blockAction must also be specified. WipeAction *WipeAction `json:"wipeAction,omitempty"` @@ -6568,7 +6568,7 @@ func (s *WebToken) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// WipeAction: An action to reset a fully managed device or delete a +// WipeAction: An action to reset a company owned device or delete a // work profile. Note: blockAction must also be specified. type WipeAction struct { // PreserveFrp: Whether the factory-reset protection data is preserved diff --git a/androidpublisher/v3/androidpublisher-api.json b/androidpublisher/v3/androidpublisher-api.json index 59a4f2ced71..4103081ba3d 100644 --- a/androidpublisher/v3/androidpublisher-api.json +++ b/androidpublisher/v3/androidpublisher-api.json @@ -3920,7 +3920,7 @@ } } }, - "revision": "20220927", + "revision": "20221024", "rootUrl": "https://androidpublisher.googleapis.com/", "schemas": { "AcquisitionTargetingRule": { @@ -5731,6 +5731,28 @@ "description": "You must tell us if your app contains streaming products to correctly charge US state and local sales tax. Field only supported in United States.", "type": "boolean" }, + "streamingTaxType": { + "description": "To collect communications or amusement taxes in the United States, choose the appropriate tax category. By default Google will determine the collected rate based on the buyer ZIP code. [Learn more](https://support.google.com/googleplay/android-developer/answer/10463498#streaming_tax).", + "enum": [ + "STREAMING_TAX_TYPE_UNSPECIFIED", + "STREAMING_TAX_TYPE_TELCO_VIDEO_RENTAL", + "STREAMING_TAX_TYPE_TELCO_VIDEO_SALES", + "STREAMING_TAX_TYPE_TELCO_VIDEO_MULTI_CHANNEL", + "STREAMING_TAX_TYPE_TELCO_AUDIO_RENTAL", + "STREAMING_TAX_TYPE_TELCO_AUDIO_SALES", + "STREAMING_TAX_TYPE_TELCO_AUDIO_MULTI_CHANNEL" + ], + "enumDescriptions": [ + "No telecommunications tax collected.", + "US-specific telecommunications tax tier for video streaming, on demand, rentals / subscriptions / pay-per-view.", + "US-specific telecommunications tax tier for video streaming of pre-recorded content like movies, tv shows.", + "US-specific telecommunications tax tier for video streaming of multi-channel programming.", + "US-specific telecommunications tax tier for audio streaming, rental / subscription.", + "US-specific telecommunications tax tier for audio streaming, sale / permanent download.", + "US-specific telecommunications tax tier for multi channel audio streaming like radio." + ], + "type": "string" + }, "taxTier": { "description": "Tax tier to specify reduced tax rate. Developers who sell digital news, magazines, newspapers, books, or audiobooks in various regions may be eligible for reduced tax rates. [Learn more](https://support.google.com/googleplay/android-developer/answer/10463498).", "enum": [ diff --git a/androidpublisher/v3/androidpublisher-gen.go b/androidpublisher/v3/androidpublisher-gen.go index eb43ed07083..708177e136c 100644 --- a/androidpublisher/v3/androidpublisher-gen.go +++ b/androidpublisher/v3/androidpublisher-gen.go @@ -3810,6 +3810,35 @@ type RegionalTaxRateInfo struct { // sales tax. Field only supported in United States. EligibleForStreamingServiceTaxRate bool `json:"eligibleForStreamingServiceTaxRate,omitempty"` + // StreamingTaxType: To collect communications or amusement taxes in the + // United States, choose the appropriate tax category. By default Google + // will determine the collected rate based on the buyer ZIP code. Learn + // more + // (https://support.google.com/googleplay/android-developer/answer/10463498#streaming_tax). + // + // Possible values: + // "STREAMING_TAX_TYPE_UNSPECIFIED" - No telecommunications tax + // collected. + // "STREAMING_TAX_TYPE_TELCO_VIDEO_RENTAL" - US-specific + // telecommunications tax tier for video streaming, on demand, rentals / + // subscriptions / pay-per-view. + // "STREAMING_TAX_TYPE_TELCO_VIDEO_SALES" - US-specific + // telecommunications tax tier for video streaming of pre-recorded + // content like movies, tv shows. + // "STREAMING_TAX_TYPE_TELCO_VIDEO_MULTI_CHANNEL" - US-specific + // telecommunications tax tier for video streaming of multi-channel + // programming. + // "STREAMING_TAX_TYPE_TELCO_AUDIO_RENTAL" - US-specific + // telecommunications tax tier for audio streaming, rental / + // subscription. + // "STREAMING_TAX_TYPE_TELCO_AUDIO_SALES" - US-specific + // telecommunications tax tier for audio streaming, sale / permanent + // download. + // "STREAMING_TAX_TYPE_TELCO_AUDIO_MULTI_CHANNEL" - US-specific + // telecommunications tax tier for multi channel audio streaming like + // radio. + StreamingTaxType string `json:"streamingTaxType,omitempty"` + // TaxTier: Tax tier to specify reduced tax rate. Developers who sell // digital news, magazines, newspapers, books, or audiobooks in various // regions may be eligible for reduced tax rates. Learn more diff --git a/api-list.json b/api-list.json index f8c131854a2..a83a43e534d 100644 --- a/api-list.json +++ b/api-list.json @@ -646,6 +646,21 @@ "documentationLink": "https://cloud.google.com/bare-metal", "preferred": true }, + { + "kind": "discovery#directoryItem", + "id": "batch:v1", + "name": "batch", + "version": "v1", + "title": "Batch API", + "description": "An API to manage the running of batch jobs on Google Cloud Platform.", + "discoveryRestUrl": "https://batch.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/batch/", + "preferred": true + }, { "kind": "discovery#directoryItem", "id": "beyondcorp:v1alpha", @@ -3438,7 +3453,7 @@ "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": "http://www.google.com", + "documentationLink": "https://cloud.google.com/application-integration", "preferred": true }, { diff --git a/batch/v1/batch-api.json b/batch/v1/batch-api.json new file mode 100644 index 00000000000..d5a0147b1ea --- /dev/null +++ b/batch/v1/batch-api.json @@ -0,0 +1,2334 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://batch.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Batch", + "description": "An API to manage the running of batch jobs on Google Cloud Platform.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/batch/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "batch:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://batch.mtls.googleapis.com/", + "name": "batch", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "batch.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "batch.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "jobs": { + "methods": { + "create": { + "description": "Create a Job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs", + "httpMethod": "POST", + "id": "batch.projects.locations.jobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "jobId": { + "description": "ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set. The job.name field in the request will be ignored and the created resource name of the Job will be \"{parent}/jobs/{job_id}\".", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource name where the Job will be created. Pattern: \"projects/{project}/locations/{location}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/jobs", + "request": { + "$ref": "Job" + }, + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a Job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", + "httpMethod": "DELETE", + "id": "batch.projects.locations.jobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Job name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + }, + "reason": { + "description": "Optional. Reason for this deletion.", + "location": "query", + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get a Job specified by its resource name.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", + "httpMethod": "GET", + "id": "batch.projects.locations.jobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Job name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:getIamPolicy", + "httpMethod": "GET", + "id": "batch.projects.locations.jobs.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/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List all Jobs for a project within a region.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs", + "httpMethod": "GET", + "id": "batch.projects.locations.jobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "List filter.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Parent path.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/jobs", + "response": { + "$ref": "ListJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:setIamPolicy", + "httpMethod": "POST", + "id": "batch.projects.locations.jobs.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:testIamPermissions", + "httpMethod": "POST", + "id": "batch.projects.locations.jobs.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "taskGroups": { + "resources": { + "tasks": { + "methods": { + "get": { + "description": "Return a single Task.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/taskGroups/{taskGroupsId}/tasks/{tasksId}", + "httpMethod": "GET", + "id": "batch.projects.locations.jobs.taskGroups.tasks.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Task name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Task" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List Tasks associated with a job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/taskGroups/{taskGroupsId}/tasks", + "httpMethod": "GET", + "id": "batch.projects.locations.jobs.taskGroups.tasks.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Task filter, null filter matches all Tasks. Filter string should be of the format State=TaskStatus.State e.g. State=RUNNING", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of a TaskGroup from which Tasks are being requested. Pattern: \"projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}\"", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/tasks", + "response": { + "$ref": "ListTasksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, + "nodes": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:getIamPolicy", + "httpMethod": "GET", + "id": "batch.projects.locations.nodes.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/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:setIamPolicy", + "httpMethod": "POST", + "id": "batch.projects.locations.nodes.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:testIamPermissions", + "httpMethod": "POST", + "id": "batch.projects.locations.nodes.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "batch.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "batch.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "batch.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "batch.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "state": { + "methods": { + "report": { + "description": "Report agent's state, e.g. agent status and tasks information", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/state:report", + "httpMethod": "POST", + "id": "batch.projects.locations.state.report", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Format: projects/{project}/locations/{location} {project} should be a project number.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/state:report", + "request": { + "$ref": "ReportAgentStateRequest" + }, + "response": { + "$ref": "ReportAgentStateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "tasks": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:getIamPolicy", + "httpMethod": "GET", + "id": "batch.projects.locations.tasks.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/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:setIamPolicy", + "httpMethod": "POST", + "id": "batch.projects.locations.tasks.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:testIamPermissions", + "httpMethod": "POST", + "id": "batch.projects.locations.tasks.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20221017", + "rootUrl": "https://batch.googleapis.com/", + "schemas": { + "Accelerator": { + "description": "Accelerator describes Compute Engine accelerators to be attached to the VM.", + "id": "Accelerator", + "properties": { + "count": { + "description": "The number of accelerators of this type.", + "format": "int64", + "type": "string" + }, + "installGpuDrivers": { + "description": "Deprecated: please use instances[0].install_gpu_drivers instead.", + "type": "boolean" + }, + "type": { + "description": "The accelerator type. For example, \"nvidia-tesla-t4\". See `gcloud compute accelerator-types list`.", + "type": "string" + } + }, + "type": "object" + }, + "ActionCondition": { + "description": "Conditions for actions to deal with task failures.", + "id": "ActionCondition", + "properties": { + "exitCodes": { + "description": "Exit codes of a task execution. If there are more than 1 exit codes, when task executes with any of the exit code in the list, the condition is met and the action will be executed.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + }, + "AgentInfo": { + "description": "VM Agent Info.", + "id": "AgentInfo", + "properties": { + "jobId": { + "description": "The assigned Job ID", + "type": "string" + }, + "reportTime": { + "description": "When the AgentInfo is generated.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "Agent state.", + "enum": [ + "AGENT_STATE_UNSPECIFIED", + "AGENT_STARTING", + "AGENT_RUNNING", + "AGENT_STOPPED" + ], + "enumDescriptions": [ + "Unspecified state.", + "The agent is starting on the VM instance.", + "The agent is running. The agent in the RUNNING state can never go back to the STARTING state.", + "The agent has stopped, either on request or due to a failure." + ], + "type": "string" + }, + "taskGroupId": { + "description": "The assigned task group ID.", + "type": "string" + }, + "tasks": { + "description": "Task Info.", + "items": { + "$ref": "AgentTaskInfo" + }, + "type": "array" + } + }, + "type": "object" + }, + "AgentMetadata": { + "description": "AgentMetadata never changes for a single instance of VM agent.", + "id": "AgentMetadata", + "properties": { + "creationTime": { + "description": "When the VM agent started.", + "format": "google-datetime", + "type": "string" + }, + "creator": { + "description": "Full name of the entity that created this vm. For MIG, this path is: projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The value is retrieved from the vm metadata key of \"created-by\".", + "type": "string" + }, + "instance": { + "description": "GCP instance name (go/instance-name).", + "type": "string" + }, + "instanceId": { + "description": "GCP instance ID (go/instance-id).", + "format": "uint64", + "type": "string" + }, + "osRelease": { + "additionalProperties": { + "type": "string" + }, + "description": "parsed contents of /etc/os-release", + "type": "object" + }, + "version": { + "description": "agent binary version running on VM", + "type": "string" + }, + "zone": { + "description": "Agent zone.", + "type": "string" + } + }, + "type": "object" + }, + "AgentTask": { + "description": "TODO(b/182501497) The message needs to be redefined when the Agent API server updates data in storage per the backend design.", + "id": "AgentTask", + "properties": { + "intendedState": { + "description": "The intended state of the task.", + "enum": [ + "INTENDED_STATE_UNSPECIFIED", + "ASSIGNED", + "CANCELLED", + "DELETED" + ], + "enumDescriptions": [ + "Unspecified state.", + "Assigned state (includes running and finished).", + "The agent should cancel the execution of this task.", + "Delete task from agent storage, stop reporting its state." + ], + "type": "string" + }, + "reachedBarrier": { + "description": "The highest barrier reached by all tasks in the task's TaskGroup.", + "format": "int64", + "type": "string" + }, + "spec": { + "$ref": "TaskSpec", + "description": "Task Spec." + }, + "status": { + "$ref": "TaskStatus", + "description": "Task status." + }, + "task": { + "description": "Task name.", + "type": "string" + } + }, + "type": "object" + }, + "AgentTaskInfo": { + "description": "Task Info", + "id": "AgentTaskInfo", + "properties": { + "runnable": { + "description": "The highest index of a runnable started by the agent for this task. The runnables are indexed from 1. Value 0 is undefined.", + "format": "int64", + "type": "string" + }, + "taskId": { + "description": "ID of the Task", + "type": "string" + }, + "taskStatus": { + "$ref": "TaskStatus", + "description": "The status of the Task. If we need agent specific fields we should fork the public TaskStatus into an agent specific one. Or add them below." + } + }, + "type": "object" + }, + "AllocationPolicy": { + "description": "A Job's resource allocation policy describes when, where, and how compute resources should be allocated for the Job.", + "id": "AllocationPolicy", + "properties": { + "instances": { + "description": "Describe instances that can be created by this AllocationPolicy. Only instances[0] is supported now.", + "items": { + "$ref": "InstancePolicyOrTemplate" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels applied to all VM instances and other resources created by AllocationPolicy. Labels could be user provided or system generated. You can assign up to 64 labels. [Google Compute Engine label restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label names that start with \"goog-\" or \"google-\" are reserved.", + "type": "object" + }, + "location": { + "$ref": "LocationPolicy", + "description": "Location where compute resources should be allocated for the Job." + }, + "network": { + "$ref": "NetworkPolicy", + "description": "The network policy." + }, + "serviceAccount": { + "$ref": "ServiceAccount", + "description": "Service account that VMs will run as." + } + }, + "type": "object" + }, + "AttachedDisk": { + "description": "A new or an existing persistent disk (PD) or a local ssd attached to a VM instance.", + "id": "AttachedDisk", + "properties": { + "deviceName": { + "description": "Device name that the guest operating system will see. It is used by Runnable.volumes field to mount disks. So please specify the device_name if you want Batch to help mount the disk, and it should match the device_name field in volumes.", + "type": "string" + }, + "existingDisk": { + "description": "Name of an existing PD.", + "type": "string" + }, + "newDisk": { + "$ref": "Disk" + } + }, + "type": "object" + }, + "AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" + } + }, + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "Barrier": { + "description": "Barrier runnable blocks until all tasks in a taskgroup reach it.", + "id": "Barrier", + "properties": { + "name": { + "description": "Barriers are identified by their index in runnable list. Names are not required, but if present should be an identifier.", + "type": "string" + } + }, + "type": "object" + }, + "Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "Binding", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. ", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "ComputeResource": { + "description": "Compute resource requirements", + "id": "ComputeResource", + "properties": { + "bootDiskMib": { + "description": "Extra boot disk size in MiB for each task.", + "format": "int64", + "type": "string" + }, + "cpuMilli": { + "description": "The milliCPU count.", + "format": "int64", + "type": "string" + }, + "memoryMib": { + "description": "Memory in MiB.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "Container": { + "description": "Container runnable.", + "id": "Container", + "properties": { + "blockExternalNetwork": { + "description": "If set to true, external network access to and from container will be blocked. The container will use the default internal network 'goog-internal'.", + "type": "boolean" + }, + "commands": { + "description": "Overrides the `CMD` specified in the container. If there is an ENTRYPOINT (either in the container image or with the entrypoint field below) then commands are appended as arguments to the ENTRYPOINT.", + "items": { + "type": "string" + }, + "type": "array" + }, + "entrypoint": { + "description": "Overrides the `ENTRYPOINT` specified in the container.", + "type": "string" + }, + "imageUri": { + "description": "The URI to pull the container image from.", + "type": "string" + }, + "options": { + "description": "Arbitrary additional options to include in the \"docker run\" command when running this container, e.g. \"--network host\".", + "type": "string" + }, + "password": { + "description": "Optional password for logging in to a docker registry. If password matches \"projects/*/secrets/*/versions/*\" then Batch will read the password from the Secret Manager;", + "type": "string" + }, + "username": { + "description": "Optional username for logging in to a docker registry. If username matches \"projects/*/secrets/*/versions/*\" then Batch will read the username from the Secret Manager.", + "type": "string" + }, + "volumes": { + "description": "Volumes to mount (bind mount) from the host machine files or directories into the container, formatted to match docker run's --volume option, e.g. /foo:/bar, or /foo:/bar:ro", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Disk": { + "description": "A new persistent disk or a local ssd. A VM can only have one local SSD setting but multiple local SSD partitions. https://cloud.google.com/compute/docs/disks#pdspecs. https://cloud.google.com/compute/docs/disks#localssds.", + "id": "Disk", + "properties": { + "diskInterface": { + "description": "Local SSDs are available through both \"SCSI\" and \"NVMe\" interfaces. If not indicated, \"NVMe\" will be the default one for local ssds. We only support \"SCSI\" for persistent disks now.", + "type": "string" + }, + "image": { + "description": "Name of a public or custom image used as the data source.", + "type": "string" + }, + "sizeGb": { + "description": "Disk size in GB. This field is ignored if `data_source` is `disk` or `image`. If `type` is `local-ssd`, size_gb should be a multiple of 375GB, otherwise, the final size will be the next greater multiple of 375 GB.", + "format": "int64", + "type": "string" + }, + "snapshot": { + "description": "Name of a snapshot used as the data source.", + "type": "string" + }, + "type": { + "description": "Disk type as shown in `gcloud compute disk-types list` For example, \"pd-ssd\", \"pd-standard\", \"pd-balanced\", \"local-ssd\".", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Environment": { + "description": "An Environment describes a collection of environment variables to set when executing Tasks.", + "id": "Environment", + "properties": { + "variables": { + "additionalProperties": { + "type": "string" + }, + "description": "A map of environment variable names to values.", + "type": "object" + } + }, + "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" + }, + "GCS": { + "description": "Represents a Google Cloud Storage volume.", + "id": "GCS", + "properties": { + "remotePath": { + "description": "Remote path, either a bucket name or a subdirectory of a bucket, e.g.: bucket_name, bucket_name/subdirectory/", + "type": "string" + } + }, + "type": "object" + }, + "InstancePolicy": { + "description": "InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.", + "id": "InstancePolicy", + "properties": { + "accelerators": { + "description": "The accelerators attached to each VM instance.", + "items": { + "$ref": "Accelerator" + }, + "type": "array" + }, + "disks": { + "description": "Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted.", + "items": { + "$ref": "AttachedDisk" + }, + "type": "array" + }, + "machineType": { + "description": "The Compute Engine machine type.", + "type": "string" + }, + "minCpuPlatform": { + "description": "The minimum CPU platform. See `https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform`. Not yet implemented.", + "type": "string" + }, + "provisioningModel": { + "description": "The provisioning model.", + "enum": [ + "PROVISIONING_MODEL_UNSPECIFIED", + "STANDARD", + "SPOT", + "PREEMPTIBLE" + ], + "enumDescriptions": [ + "Unspecified.", + "Standard VM.", + "SPOT VM.", + "Preemptible VM (PVM). Above SPOT VM is the preferable model for preemptible VM instances: the old preemptible VM model (indicated by this field) is the older model, and has been migrated to use the SPOT model as the underlying technology. This old model will still be supported." + ], + "type": "string" + } + }, + "type": "object" + }, + "InstancePolicyOrTemplate": { + "description": "Either an InstancePolicy or an instance template.", + "id": "InstancePolicyOrTemplate", + "properties": { + "installGpuDrivers": { + "description": "Set this field true if users want Batch to help fetch drivers from a third party location and install them for GPUs specified in policy.accelerators or instance_template on their behalf. Default is false.", + "type": "boolean" + }, + "instanceTemplate": { + "description": "Name of an instance template used to create VMs. Named the field as 'instance_template' instead of 'template' to avoid c++ keyword conflict.", + "type": "string" + }, + "policy": { + "$ref": "InstancePolicy", + "description": "InstancePolicy." + } + }, + "type": "object" + }, + "InstanceStatus": { + "description": "VM instance status.", + "id": "InstanceStatus", + "properties": { + "machineType": { + "description": "The Compute Engine machine type.", + "type": "string" + }, + "provisioningModel": { + "description": "The VM instance provisioning model.", + "enum": [ + "PROVISIONING_MODEL_UNSPECIFIED", + "STANDARD", + "SPOT", + "PREEMPTIBLE" + ], + "enumDescriptions": [ + "Unspecified.", + "Standard VM.", + "SPOT VM.", + "Preemptible VM (PVM). Above SPOT VM is the preferable model for preemptible VM instances: the old preemptible VM model (indicated by this field) is the older model, and has been migrated to use the SPOT model as the underlying technology. This old model will still be supported." + ], + "type": "string" + }, + "taskPack": { + "description": "The max number of tasks can be assigned to this instance type.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "Job": { + "description": "The Cloud Batch Job description.", + "id": "Job", + "properties": { + "allocationPolicy": { + "$ref": "AllocationPolicy", + "description": "Compute resource allocation for all TaskGroups in the Job." + }, + "createTime": { + "description": "Output only. When the Job was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels for the Job. Labels could be user provided or system generated. For example, \"labels\": { \"department\": \"finance\", \"environment\": \"test\" } You can assign up to 64 labels. [Google Compute Engine label restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions) apply. Label names that start with \"goog-\" or \"google-\" are reserved.", + "type": "object" + }, + "logsPolicy": { + "$ref": "LogsPolicy", + "description": "Log preservation policy for the Job." + }, + "name": { + "description": "Output only. Job name. For example: \"projects/123456/locations/us-central1/jobs/job01\".", + "readOnly": true, + "type": "string" + }, + "notifications": { + "description": "Notification configurations.", + "items": { + "$ref": "JobNotification" + }, + "type": "array" + }, + "priority": { + "description": "Priority of the Job. The valid value range is [0, 100). A job with higher priority value is more likely to run earlier if all other requirements are satisfied.", + "format": "int64", + "type": "string" + }, + "status": { + "$ref": "JobStatus", + "description": "Output only. Job status. It is read only for users.", + "readOnly": true + }, + "taskGroups": { + "description": "Required. TaskGroups in the Job. Only one TaskGroup is supported now.", + "items": { + "$ref": "TaskGroup" + }, + "type": "array" + }, + "uid": { + "description": "Output only. A system generated unique ID (in UUID4 format) for the Job.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last time the Job was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "JobNotification": { + "description": "Notification configurations.", + "id": "JobNotification", + "properties": { + "message": { + "$ref": "Message", + "description": "The attribute requirements of messages to be sent to this Pub/Sub topic. Without this field, no message will be sent." + }, + "pubsubTopic": { + "description": "The Pub/Sub topic where notifications like the job state changes will be published. This topic exist in the same project as the job and billings will be charged to this project. If not specified, no Pub/Sub messages will be sent. Topic format: `projects/{project}/topics/{topic}`.", + "type": "string" + } + }, + "type": "object" + }, + "JobStatus": { + "description": "Job status.", + "id": "JobStatus", + "properties": { + "runDuration": { + "description": "The duration of time that the Job spent in status RUNNING.", + "format": "google-duration", + "type": "string" + }, + "state": { + "description": "Job state", + "enum": [ + "STATE_UNSPECIFIED", + "QUEUED", + "SCHEDULED", + "RUNNING", + "SUCCEEDED", + "FAILED", + "DELETION_IN_PROGRESS" + ], + "enumDescriptions": [ + "", + "Job is admitted (validated and persisted) and waiting for resources.", + "Job is scheduled to run as soon as resource allocation is ready. The resource allocation may happen at a later time but with a high chance to succeed.", + "Resource allocation has been successful. At least one Task in the Job is RUNNING.", + "All Tasks in the Job have finished successfully.", + "At least one Task in the Job has failed.", + "The Job will be deleted, but has not been deleted yet. Typically this is because resources used by the Job are still being cleaned up." + ], + "type": "string" + }, + "statusEvents": { + "description": "Job status events", + "items": { + "$ref": "StatusEvent" + }, + "type": "array" + }, + "taskGroups": { + "additionalProperties": { + "$ref": "TaskGroupStatus" + }, + "description": "Aggregated task status for each TaskGroup in the Job. The map key is TaskGroup ID.", + "type": "object" + } + }, + "type": "object" + }, + "LifecyclePolicy": { + "description": "LifecyclePolicy describes how to deal with task failures based on different conditions.", + "id": "LifecyclePolicy", + "properties": { + "action": { + "description": "Action to execute when ActionCondition is true.", + "enum": [ + "ACTION_UNSPECIFIED", + "RETRY_TASK", + "FAIL_TASK" + ], + "enumDescriptions": [ + "Action unspecified.", + "Action that tasks in the group will be scheduled to re-execute.", + "Action that tasks in the group will be stopped immediately." + ], + "type": "string" + }, + "actionCondition": { + "$ref": "ActionCondition", + "description": "Conditions that decide why a task failure is dealt with a specific action." + } + }, + "type": "object" + }, + "ListJobsResponse": { + "description": "ListJob Response.", + "id": "ListJobsResponse", + "properties": { + "jobs": { + "description": "Jobs.", + "items": { + "$ref": "Job" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Next page token.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListTasksResponse": { + "description": "ListTasks Response.", + "id": "ListTasksResponse", + "properties": { + "nextPageToken": { + "description": "Next page token.", + "type": "string" + }, + "tasks": { + "description": "Tasks.", + "items": { + "$ref": "Task" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "LocationPolicy": { + "id": "LocationPolicy", + "properties": { + "allowedLocations": { + "description": "A list of allowed location names represented by internal URLs. Each location can be a region or a zone. Only one region or multiple zones in one region is supported now. For example, [\"regions/us-central1\"] allow VMs in any zones in region us-central1. [\"zones/us-central1-a\", \"zones/us-central1-c\"] only allow VMs in zones us-central1-a and us-central1-c. All locations end up in different regions would cause errors. For example, [\"regions/us-central1\", \"zones/us-central1-a\", \"zones/us-central1-b\", \"zones/us-west1-a\"] contains 2 regions \"us-central1\" and \"us-west1\". An error is expected in this case.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "LogsPolicy": { + "description": "LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be preserved.", + "id": "LogsPolicy", + "properties": { + "destination": { + "description": "Where logs should be saved.", + "enum": [ + "DESTINATION_UNSPECIFIED", + "CLOUD_LOGGING", + "PATH" + ], + "enumDescriptions": [ + "Logs are not preserved.", + "Logs are streamed to Cloud Logging.", + "Logs are saved to a file path." + ], + "type": "string" + }, + "logsPath": { + "description": "The path to which logs are saved when the destination = PATH. This can be a local file path on the VM, or under the mount point of a Persistent Disk or Filestore, or a Cloud Storage path.", + "type": "string" + } + }, + "type": "object" + }, + "Message": { + "description": "Message details. Describe the attribute that a message should have. Without specified message attributes, no message will be sent by default.", + "id": "Message", + "properties": { + "newJobState": { + "description": "The new job state.", + "enum": [ + "STATE_UNSPECIFIED", + "QUEUED", + "SCHEDULED", + "RUNNING", + "SUCCEEDED", + "FAILED", + "DELETION_IN_PROGRESS" + ], + "enumDescriptions": [ + "", + "Job is admitted (validated and persisted) and waiting for resources.", + "Job is scheduled to run as soon as resource allocation is ready. The resource allocation may happen at a later time but with a high chance to succeed.", + "Resource allocation has been successful. At least one Task in the Job is RUNNING.", + "All Tasks in the Job have finished successfully.", + "At least one Task in the Job has failed.", + "The Job will be deleted, but has not been deleted yet. Typically this is because resources used by the Job are still being cleaned up." + ], + "type": "string" + }, + "newTaskState": { + "description": "The new task state.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "ASSIGNED", + "RUNNING", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "unknown state", + "The Task is created and waiting for resources.", + "The Task is assigned to at least one VM.", + "The Task is running.", + "The Task has failed.", + "The Task has succeeded." + ], + "type": "string" + }, + "type": { + "description": "The message type.", + "enum": [ + "TYPE_UNSPECIFIED", + "JOB_STATE_CHANGED", + "TASK_STATE_CHANGED" + ], + "enumDescriptions": [ + "Unspecified.", + "Notify users that the job state has changed.", + "Notify users that the task state has changed." + ], + "type": "string" + } + }, + "type": "object" + }, + "NFS": { + "description": "Represents an NFS volume.", + "id": "NFS", + "properties": { + "remotePath": { + "description": "Remote source path exported from the NFS, e.g., \"/share\".", + "type": "string" + }, + "server": { + "description": "The IP address of the NFS.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkInterface": { + "description": "A network interface.", + "id": "NetworkInterface", + "properties": { + "network": { + "description": "The URL of the network resource.", + "type": "string" + }, + "noExternalIpAddress": { + "description": "Default is false (with an external IP address). Required if no external public IP address is attached to the VM. If no external public IP address, additional configuration is required to allow the VM to access Google Services. See https://cloud.google.com/vpc/docs/configure-private-google-access and https://cloud.google.com/nat/docs/gce-example#create-nat for more information.", + "type": "boolean" + }, + "subnetwork": { + "description": "The URL of the Subnetwork resource.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkPolicy": { + "description": "NetworkPolicy describes VM instance network configurations.", + "id": "NetworkPolicy", + "properties": { + "networkInterfaces": { + "description": "Network configurations.", + "items": { + "$ref": "NetworkInterface" + }, + "type": "array" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Represents the metadata of the long-running operation.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "etag": { + "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ReportAgentStateRequest": { + "description": "Request to report agent's state. The Request itself implies the agent is healthy.", + "id": "ReportAgentStateRequest", + "properties": { + "agentInfo": { + "$ref": "AgentInfo", + "description": "Agent info." + }, + "metadata": { + "$ref": "AgentMetadata", + "description": "Agent metadata." + } + }, + "type": "object" + }, + "ReportAgentStateResponse": { + "description": "Response to ReportAgentStateRequest.", + "id": "ReportAgentStateResponse", + "properties": { + "tasks": { + "description": "Tasks assigned to the agent", + "items": { + "$ref": "AgentTask" + }, + "type": "array" + } + }, + "type": "object" + }, + "Runnable": { + "description": "Runnable describes instructions for executing a specific script or container as part of a Task.", + "id": "Runnable", + "properties": { + "alwaysRun": { + "description": "By default, after a Runnable fails, no further Runnable are executed. This flag indicates that this Runnable must be run even if the Task has already failed. This is useful for Runnables that copy output files off of the VM or for debugging. The always_run flag does not override the Task's overall max_run_duration. If the max_run_duration has expired then no further Runnables will execute, not even always_run Runnables.", + "type": "boolean" + }, + "background": { + "description": "This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables. This is useful to provide services to other Runnables (or to provide debugging support tools like SSH servers).", + "type": "boolean" + }, + "barrier": { + "$ref": "Barrier", + "description": "Barrier runnable." + }, + "container": { + "$ref": "Container", + "description": "Container runnable." + }, + "environment": { + "$ref": "Environment", + "description": "Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup)." + }, + "ignoreExitStatus": { + "description": "Normally, a non-zero exit status causes the Task to fail. This flag allows execution of other Runnables to continue instead.", + "type": "boolean" + }, + "script": { + "$ref": "Script", + "description": "Script runnable." + }, + "timeout": { + "description": "Timeout for this Runnable.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "Script": { + "description": "Script runnable.", + "id": "Script", + "properties": { + "path": { + "description": "Script file path on the host VM.", + "type": "string" + }, + "text": { + "description": "Shell script text.", + "type": "string" + } + }, + "type": "object" + }, + "ServiceAccount": { + "description": "Carries information about a Google Cloud service account.", + "id": "ServiceAccount", + "properties": { + "email": { + "description": "Email address of the service account. If not specified, the default Compute Engine service account for the project will be used. If instance template is being used, the service account has to be specified in the instance template and it has to match the email field here.", + "type": "string" + } + }, + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "SetIamPolicyRequest", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." + }, + "updateMask": { + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "StatusEvent": { + "description": "Status event", + "id": "StatusEvent", + "properties": { + "description": { + "description": "Description of the event.", + "type": "string" + }, + "eventTime": { + "description": "The time this event occurred.", + "format": "google-datetime", + "type": "string" + }, + "taskExecution": { + "$ref": "TaskExecution", + "description": "Task Execution" + }, + "type": { + "description": "Type of the event.", + "type": "string" + } + }, + "type": "object" + }, + "Task": { + "description": "A Cloud Batch task.", + "id": "Task", + "properties": { + "name": { + "description": "Task name. The name is generated from the parent TaskGroup name and 'id' field. For example: \"projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/tasks/task01\".", + "type": "string" + }, + "status": { + "$ref": "TaskStatus", + "description": "Task Status." + } + }, + "type": "object" + }, + "TaskExecution": { + "description": "This Task Execution field includes detail information for task execution procedures, based on StatusEvent types.", + "id": "TaskExecution", + "properties": { + "exitCode": { + "description": "When task is completed as the status of FAILED or SUCCEEDED, exit code is for one task execution result, default is 0 as success.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TaskGroup": { + "description": "A TaskGroup contains one or multiple Tasks that share the same Runnable but with different runtime parameters.", + "id": "TaskGroup", + "properties": { + "name": { + "description": "Output only. TaskGroup name. The system generates this field based on parent Job name. For example: \"projects/123456/locations/us-west1/jobs/job01/taskGroups/group01\".", + "readOnly": true, + "type": "string" + }, + "parallelism": { + "description": "Max number of tasks that can run in parallel. Default to min(task_count, 1000).", + "format": "int64", + "type": "string" + }, + "permissiveSsh": { + "description": "When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup.", + "type": "boolean" + }, + "requireHostsFile": { + "description": "When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false.", + "type": "boolean" + }, + "taskCount": { + "description": "Number of Tasks in the TaskGroup. default is 1", + "format": "int64", + "type": "string" + }, + "taskCountPerNode": { + "description": "Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements.", + "format": "int64", + "type": "string" + }, + "taskEnvironments": { + "description": "An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1). task_environments supports up to 200 entries.", + "items": { + "$ref": "Environment" + }, + "type": "array" + }, + "taskSpec": { + "$ref": "TaskSpec", + "description": "Required. Tasks in the group share the same task spec." + } + }, + "type": "object" + }, + "TaskGroupStatus": { + "description": "Aggregated task status for a TaskGroup.", + "id": "TaskGroupStatus", + "properties": { + "counts": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "Count of task in each state in the TaskGroup. The map key is task state name.", + "type": "object" + }, + "instances": { + "description": "Status of instances allocated for the TaskGroup.", + "items": { + "$ref": "InstanceStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "TaskSpec": { + "description": "Spec of a task", + "id": "TaskSpec", + "properties": { + "computeResource": { + "$ref": "ComputeResource", + "description": "ComputeResource requirements." + }, + "environment": { + "$ref": "Environment", + "description": "Environment variables to set before running the Task." + }, + "environments": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables to set before running the Task. You can set up to 100 environments.", + "type": "object" + }, + "lifecyclePolicies": { + "description": "Lifecycle management schema when any task in a task group is failed. The valid size of lifecycle policies are [0, 10]. For each lifecycle policy, when the condition is met, the action in that policy will execute. If there are multiple policies that the task execution result matches, we use the action from the first matched policy. If task execution result does not meet with any of the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.", + "items": { + "$ref": "LifecyclePolicy" + }, + "type": "array" + }, + "maxRetryCount": { + "description": "Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is [0, 10].", + "format": "int32", + "type": "integer" + }, + "maxRunDuration": { + "description": "Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.", + "format": "google-duration", + "type": "string" + }, + "runnables": { + "description": "The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.", + "items": { + "$ref": "Runnable" + }, + "type": "array" + }, + "volumes": { + "description": "Volumes to mount before running Tasks using this TaskSpec.", + "items": { + "$ref": "Volume" + }, + "type": "array" + } + }, + "type": "object" + }, + "TaskStatus": { + "description": "Status of a task", + "id": "TaskStatus", + "properties": { + "state": { + "description": "Task state", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "ASSIGNED", + "RUNNING", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "unknown state", + "The Task is created and waiting for resources.", + "The Task is assigned to at least one VM.", + "The Task is running.", + "The Task has failed.", + "The Task has succeeded." + ], + "type": "string" + }, + "statusEvents": { + "description": "Detailed info about why the state is reached.", + "items": { + "$ref": "StatusEvent" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "TestIamPermissionsResponse", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "Volume": { + "description": "Volume describes a volume and parameters for it to be mounted to a VM.", + "id": "Volume", + "properties": { + "deviceName": { + "description": "Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.", + "type": "string" + }, + "gcs": { + "$ref": "GCS", + "description": "A Google Cloud Storage (GCS) volume." + }, + "mountOptions": { + "description": "For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html).", + "items": { + "type": "string" + }, + "type": "array" + }, + "mountPath": { + "description": "The mount path for the volume, e.g. /mnt/disks/share.", + "type": "string" + }, + "nfs": { + "$ref": "NFS", + "description": "A Network File System (NFS) volume. For example, a Filestore file share." + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Batch API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/batch/v1/batch-gen.go b/batch/v1/batch-gen.go new file mode 100644 index 00000000000..0a2d15fd1e1 --- /dev/null +++ b/batch/v1/batch-gen.go @@ -0,0 +1,6391 @@ +// Copyright 2022 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package batch provides access to the Batch API. +// +// For product documentation, see: https://cloud.google.com/batch/ +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/batch/v1" +// ... +// ctx := context.Background() +// batchService, err := batch.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for authentication. +// +// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: +// +// batchService, err := batch.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// batchService, err := batch.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See https://godoc.org/google.golang.org/api/option/ for details on options. +package batch // import "google.golang.org/api/batch/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint + +const apiId = "batch:v1" +const apiName = "batch" +const apiVersion = "v1" +const basePath = "https://batch.googleapis.com/" +const mtlsBasePath = "https://batch.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the + // email address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Jobs = NewProjectsLocationsJobsService(s) + rs.Nodes = NewProjectsLocationsNodesService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + rs.State = NewProjectsLocationsStateService(s) + rs.Tasks = NewProjectsLocationsTasksService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Jobs *ProjectsLocationsJobsService + + Nodes *ProjectsLocationsNodesService + + Operations *ProjectsLocationsOperationsService + + State *ProjectsLocationsStateService + + Tasks *ProjectsLocationsTasksService +} + +func NewProjectsLocationsJobsService(s *Service) *ProjectsLocationsJobsService { + rs := &ProjectsLocationsJobsService{s: s} + rs.TaskGroups = NewProjectsLocationsJobsTaskGroupsService(s) + return rs +} + +type ProjectsLocationsJobsService struct { + s *Service + + TaskGroups *ProjectsLocationsJobsTaskGroupsService +} + +func NewProjectsLocationsJobsTaskGroupsService(s *Service) *ProjectsLocationsJobsTaskGroupsService { + rs := &ProjectsLocationsJobsTaskGroupsService{s: s} + rs.Tasks = NewProjectsLocationsJobsTaskGroupsTasksService(s) + return rs +} + +type ProjectsLocationsJobsTaskGroupsService struct { + s *Service + + Tasks *ProjectsLocationsJobsTaskGroupsTasksService +} + +func NewProjectsLocationsJobsTaskGroupsTasksService(s *Service) *ProjectsLocationsJobsTaskGroupsTasksService { + rs := &ProjectsLocationsJobsTaskGroupsTasksService{s: s} + return rs +} + +type ProjectsLocationsJobsTaskGroupsTasksService struct { + s *Service +} + +func NewProjectsLocationsNodesService(s *Service) *ProjectsLocationsNodesService { + rs := &ProjectsLocationsNodesService{s: s} + return rs +} + +type ProjectsLocationsNodesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsStateService(s *Service) *ProjectsLocationsStateService { + rs := &ProjectsLocationsStateService{s: s} + return rs +} + +type ProjectsLocationsStateService struct { + s *Service +} + +func NewProjectsLocationsTasksService(s *Service) *ProjectsLocationsTasksService { + rs := &ProjectsLocationsTasksService{s: s} + return rs +} + +type ProjectsLocationsTasksService struct { + s *Service +} + +// Accelerator: Accelerator describes Compute Engine accelerators to be +// attached to the VM. +type Accelerator struct { + // Count: The number of accelerators of this type. + Count int64 `json:"count,omitempty,string"` + + // InstallGpuDrivers: Deprecated: please use + // instances[0].install_gpu_drivers instead. + InstallGpuDrivers bool `json:"installGpuDrivers,omitempty"` + + // Type: The accelerator type. For example, "nvidia-tesla-t4". See + // `gcloud compute accelerator-types list`. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Accelerator) MarshalJSON() ([]byte, error) { + type NoMethod Accelerator + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ActionCondition: Conditions for actions to deal with task failures. +type ActionCondition struct { + // ExitCodes: Exit codes of a task execution. If there are more than 1 + // exit codes, when task executes with any of the exit code in the list, + // the condition is met and the action will be executed. + ExitCodes []int64 `json:"exitCodes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExitCodes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExitCodes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ActionCondition) MarshalJSON() ([]byte, error) { + type NoMethod ActionCondition + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AgentInfo: VM Agent Info. +type AgentInfo struct { + // JobId: The assigned Job ID + JobId string `json:"jobId,omitempty"` + + // ReportTime: When the AgentInfo is generated. + ReportTime string `json:"reportTime,omitempty"` + + // State: Agent state. + // + // Possible values: + // "AGENT_STATE_UNSPECIFIED" - Unspecified state. + // "AGENT_STARTING" - The agent is starting on the VM instance. + // "AGENT_RUNNING" - The agent is running. The agent in the RUNNING + // state can never go back to the STARTING state. + // "AGENT_STOPPED" - The agent has stopped, either on request or due + // to a failure. + State string `json:"state,omitempty"` + + // TaskGroupId: The assigned task group ID. + TaskGroupId string `json:"taskGroupId,omitempty"` + + // Tasks: Task Info. + Tasks []*AgentTaskInfo `json:"tasks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JobId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JobId") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AgentInfo) MarshalJSON() ([]byte, error) { + type NoMethod AgentInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AgentMetadata: AgentMetadata never changes for a single instance of +// VM agent. +type AgentMetadata struct { + // CreationTime: When the VM agent started. + CreationTime string `json:"creationTime,omitempty"` + + // Creator: Full name of the entity that created this vm. For MIG, this + // path is: + // projects/{project}/regions/{region}/InstanceGroupManagers/{igm} The + // value is retrieved from the vm metadata key of "created-by". + Creator string `json:"creator,omitempty"` + + // Instance: GCP instance name (go/instance-name). + Instance string `json:"instance,omitempty"` + + // InstanceId: GCP instance ID (go/instance-id). + InstanceId uint64 `json:"instanceId,omitempty,string"` + + // OsRelease: parsed contents of /etc/os-release + OsRelease map[string]string `json:"osRelease,omitempty"` + + // Version: agent binary version running on VM + Version string `json:"version,omitempty"` + + // Zone: Agent zone. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreationTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AgentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod AgentMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AgentTask: TODO(b/182501497) The message needs to be redefined when +// the Agent API server updates data in storage per the backend design. +type AgentTask struct { + // IntendedState: The intended state of the task. + // + // Possible values: + // "INTENDED_STATE_UNSPECIFIED" - Unspecified state. + // "ASSIGNED" - Assigned state (includes running and finished). + // "CANCELLED" - The agent should cancel the execution of this task. + // "DELETED" - Delete task from agent storage, stop reporting its + // state. + IntendedState string `json:"intendedState,omitempty"` + + // ReachedBarrier: The highest barrier reached by all tasks in the + // task's TaskGroup. + ReachedBarrier int64 `json:"reachedBarrier,omitempty,string"` + + // Spec: Task Spec. + Spec *TaskSpec `json:"spec,omitempty"` + + // Status: Task status. + Status *TaskStatus `json:"status,omitempty"` + + // Task: Task name. + Task string `json:"task,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IntendedState") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IntendedState") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AgentTask) MarshalJSON() ([]byte, error) { + type NoMethod AgentTask + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AgentTaskInfo: Task Info +type AgentTaskInfo struct { + // Runnable: The highest index of a runnable started by the agent for + // this task. The runnables are indexed from 1. Value 0 is undefined. + Runnable int64 `json:"runnable,omitempty,string"` + + // TaskId: ID of the Task + TaskId string `json:"taskId,omitempty"` + + // TaskStatus: The status of the Task. If we need agent specific fields + // we should fork the public TaskStatus into an agent specific one. Or + // add them below. + TaskStatus *TaskStatus `json:"taskStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Runnable") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Runnable") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AgentTaskInfo) MarshalJSON() ([]byte, error) { + type NoMethod AgentTaskInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AllocationPolicy: A Job's resource allocation policy describes when, +// where, and how compute resources should be allocated for the Job. +type AllocationPolicy struct { + // Instances: Describe instances that can be created by this + // AllocationPolicy. Only instances[0] is supported now. + Instances []*InstancePolicyOrTemplate `json:"instances,omitempty"` + + // Labels: Labels applied to all VM instances and other resources + // created by AllocationPolicy. Labels could be user provided or system + // generated. You can assign up to 64 labels. Google Compute Engine + // label restrictions + // (https://cloud.google.com/compute/docs/labeling-resources#restrictions) + // apply. Label names that start with "goog-" or "google-" are reserved. + Labels map[string]string `json:"labels,omitempty"` + + // Location: Location where compute resources should be allocated for + // the Job. + Location *LocationPolicy `json:"location,omitempty"` + + // Network: The network policy. + Network *NetworkPolicy `json:"network,omitempty"` + + // ServiceAccount: Service account that VMs will run as. + ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Instances") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AllocationPolicy) MarshalJSON() ([]byte, error) { + type NoMethod AllocationPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AttachedDisk: A new or an existing persistent disk (PD) or a local +// ssd attached to a VM instance. +type AttachedDisk struct { + // DeviceName: Device name that the guest operating system will see. It + // is used by Runnable.volumes field to mount disks. So please specify + // the device_name if you want Batch to help mount the disk, and it + // should match the device_name field in volumes. + DeviceName string `json:"deviceName,omitempty"` + + // ExistingDisk: Name of an existing PD. + ExistingDisk string `json:"existingDisk,omitempty"` + + NewDisk *Disk `json:"newDisk,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AttachedDisk) MarshalJSON() ([]byte, error) { + type NoMethod AttachedDisk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditConfig: Specifies the audit configuration for a service. The +// configuration determines which permission types are logged, and what +// identities, if any, are exempted from logging. An AuditConfig must +// have one or more AuditLogConfigs. If there are AuditConfigs for both +// `allServices` and a specific service, the union of the two +// AuditConfigs is used for that service: the log_types specified in +// each AuditConfig are enabled, and the exempted_members in each +// AuditLogConfig are exempted. Example Policy with multiple +// AuditConfigs: { "audit_configs": [ { "service": "allServices", +// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": +// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { +// "log_type": "ADMIN_READ" } ] }, { "service": +// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": +// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ +// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy +// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts +// `jose@example.com` from DATA_READ logging, and `aliya@example.com` +// from DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + // Service: Specifies a service that will be enabled for audit logging. + // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. Example: { "audit_log_configs": [ { "log_type": +// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { +// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and +// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ +// logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of permission. Follows the same format of + // Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Barrier: Barrier runnable blocks until all tasks in a taskgroup reach +// it. +type Barrier struct { + // Name: Barriers are identified by their index in runnable list. Names + // are not required, but if present should be an identifier. + 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 *Barrier) MarshalJSON() ([]byte, error) { + type NoMethod Barrier + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members`, or principals, with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the + // current request. If the condition evaluates to `false`, then this + // binding does not apply to the current request. However, a different + // role binding might grant the same role to one or more of the + // principals in this binding. To learn which resources support + // conditions in their IAM policies, see the IAM documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the principals requesting access for a Google + // Cloud resource. `members` can have the following values: * + // `allUsers`: A special identifier that represents anyone who is on the + // internet; with or without a Google account. * + // `allAuthenticatedUsers`: A special identifier that represents anyone + // who is authenticated with a Google account or a service account. Does + // not include identities that come from external identity providers + // (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address + // that represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: + // An identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. + // * `group:{emailid}`: An email address that represents a Google group. + // For example, `admins@example.com`. * + // `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently + // deleted. For example, `alice@example.com?uid=123456789012345678901`. + // If the user is recovered, this value reverts to `user:{emailid}` and + // the recovered user retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address + // (plus unique identifier) representing a service account that has been + // recently deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + // If the service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains + // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: + // An email address (plus unique identifier) representing a Google group + // that has been recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is + // recovered, this value reverts to `group:{emailid}` and the recovered + // group retains the role in the binding. * `domain:{domain}`: The G + // Suite domain (primary) that represents all the users of that domain. + // For example, `google.com` or `example.com`. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to the list of `members`, or principals. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type NoMethod Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CancelOperationRequest: The request message for +// Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// ComputeResource: Compute resource requirements +type ComputeResource struct { + // BootDiskMib: Extra boot disk size in MiB for each task. + BootDiskMib int64 `json:"bootDiskMib,omitempty,string"` + + // CpuMilli: The milliCPU count. + CpuMilli int64 `json:"cpuMilli,omitempty,string"` + + // MemoryMib: Memory in MiB. + MemoryMib int64 `json:"memoryMib,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "BootDiskMib") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BootDiskMib") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ComputeResource) MarshalJSON() ([]byte, error) { + type NoMethod ComputeResource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Container: Container runnable. +type Container struct { + // BlockExternalNetwork: If set to true, external network access to and + // from container will be blocked. The container will use the default + // internal network 'goog-internal'. + BlockExternalNetwork bool `json:"blockExternalNetwork,omitempty"` + + // Commands: Overrides the `CMD` specified in the container. If there is + // an ENTRYPOINT (either in the container image or with the entrypoint + // field below) then commands are appended as arguments to the + // ENTRYPOINT. + Commands []string `json:"commands,omitempty"` + + // Entrypoint: Overrides the `ENTRYPOINT` specified in the container. + Entrypoint string `json:"entrypoint,omitempty"` + + // ImageUri: The URI to pull the container image from. + ImageUri string `json:"imageUri,omitempty"` + + // Options: Arbitrary additional options to include in the "docker run" + // command when running this container, e.g. "--network host". + Options string `json:"options,omitempty"` + + // Password: Optional password for logging in to a docker registry. If + // password matches "projects/*/secrets/*/versions/*" then Batch will + // read the password from the Secret Manager; + Password string `json:"password,omitempty"` + + // Username: Optional username for logging in to a docker registry. If + // username matches "projects/*/secrets/*/versions/*" then Batch will + // read the username from the Secret Manager. + Username string `json:"username,omitempty"` + + // Volumes: Volumes to mount (bind mount) from the host machine files or + // directories into the container, formatted to match docker run's + // --volume option, e.g. /foo:/bar, or /foo:/bar:ro + Volumes []string `json:"volumes,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "BlockExternalNetwork") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BlockExternalNetwork") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field 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) +} + +// Disk: A new persistent disk or a local ssd. A VM can only have one +// local SSD setting but multiple local SSD partitions. +// https://cloud.google.com/compute/docs/disks#pdspecs. +// https://cloud.google.com/compute/docs/disks#localssds. +type Disk struct { + // DiskInterface: Local SSDs are available through both "SCSI" and + // "NVMe" interfaces. If not indicated, "NVMe" will be the default one + // for local ssds. We only support "SCSI" for persistent disks now. + DiskInterface string `json:"diskInterface,omitempty"` + + // Image: Name of a public or custom image used as the data source. + Image string `json:"image,omitempty"` + + // SizeGb: Disk size in GB. This field is ignored if `data_source` is + // `disk` or `image`. If `type` is `local-ssd`, size_gb should be a + // multiple of 375GB, otherwise, the final size will be the next greater + // multiple of 375 GB. + SizeGb int64 `json:"sizeGb,omitempty,string"` + + // Snapshot: Name of a snapshot used as the data source. + Snapshot string `json:"snapshot,omitempty"` + + // Type: Disk type as shown in `gcloud compute disk-types list` For + // example, "pd-ssd", "pd-standard", "pd-balanced", "local-ssd". + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DiskInterface") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DiskInterface") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Disk) MarshalJSON() ([]byte, error) { + type NoMethod Disk + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For +// instance: service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// Environment: An Environment describes a collection of environment +// variables to set when executing Tasks. +type Environment struct { + // Variables: A map of environment variable names to values. + Variables map[string]string `json:"variables,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Variables") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Variables") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Environment) MarshalJSON() ([]byte, error) { + type NoMethod Environment + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Expr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The +// syntax and semantics of CEL are documented at +// https://github.com/google/cel-spec. Example (Comparison): title: +// "Summary size limit" description: "Determines if a summary is less +// than 100 chars" expression: "document.summary.size() < 100" Example +// (Equality): title: "Requestor is owner" description: "Determines if +// requestor is the document owner" expression: "document.owner == +// request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly +// visible" expression: "document.type != 'private' && document.type != +// 'internal'" Example (Data Manipulation): title: "Notification string" +// description: "Create a notification string with a timestamp." +// expression: "'New message received at ' + +// string(document.create_time)" The exact variables and functions that +// may be referenced within an expression are determined by the service +// that evaluates it. See the service documentation for additional +// information. +type Expr struct { + // Description: Optional. Description of the expression. This is a + // longer text which describes the expression, e.g. when hovered over it + // in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in Common + // Expression Language syntax. + Expression string `json:"expression,omitempty"` + + // Location: Optional. String indicating the location of the expression + // for error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: Optional. Title for the expression, i.e. a short string + // describing its purpose. This can be used e.g. in UIs which allow to + // enter the expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type NoMethod Expr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GCS: Represents a Google Cloud Storage volume. +type GCS struct { + // RemotePath: Remote path, either a bucket name or a subdirectory of a + // bucket, e.g.: bucket_name, bucket_name/subdirectory/ + RemotePath string `json:"remotePath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RemotePath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RemotePath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GCS) MarshalJSON() ([]byte, error) { + type NoMethod GCS + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InstancePolicy: InstancePolicy describes an instance type and +// resources attached to each VM created by this InstancePolicy. +type InstancePolicy struct { + // Accelerators: The accelerators attached to each VM instance. + Accelerators []*Accelerator `json:"accelerators,omitempty"` + + // Disks: Non-boot disks to be attached for each VM created by this + // InstancePolicy. New disks will be deleted when the VM is deleted. + Disks []*AttachedDisk `json:"disks,omitempty"` + + // MachineType: The Compute Engine machine type. + MachineType string `json:"machineType,omitempty"` + + // MinCpuPlatform: The minimum CPU platform. See + // `https://cloud.google.com/compute/docs/instances/specify-min-cpu-platf + // orm`. Not yet implemented. + MinCpuPlatform string `json:"minCpuPlatform,omitempty"` + + // ProvisioningModel: The provisioning model. + // + // Possible values: + // "PROVISIONING_MODEL_UNSPECIFIED" - Unspecified. + // "STANDARD" - Standard VM. + // "SPOT" - SPOT VM. + // "PREEMPTIBLE" - Preemptible VM (PVM). Above SPOT VM is the + // preferable model for preemptible VM instances: the old preemptible VM + // model (indicated by this field) is the older model, and has been + // migrated to use the SPOT model as the underlying technology. This old + // model will still be supported. + ProvisioningModel string `json:"provisioningModel,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Accelerators") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Accelerators") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstancePolicy) MarshalJSON() ([]byte, error) { + type NoMethod InstancePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InstancePolicyOrTemplate: Either an InstancePolicy or an instance +// template. +type InstancePolicyOrTemplate struct { + // InstallGpuDrivers: Set this field true if users want Batch to help + // fetch drivers from a third party location and install them for GPUs + // specified in policy.accelerators or instance_template on their + // behalf. Default is false. + InstallGpuDrivers bool `json:"installGpuDrivers,omitempty"` + + // InstanceTemplate: Name of an instance template used to create VMs. + // Named the field as 'instance_template' instead of 'template' to avoid + // c++ keyword conflict. + InstanceTemplate string `json:"instanceTemplate,omitempty"` + + // Policy: InstancePolicy. + Policy *InstancePolicy `json:"policy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InstallGpuDrivers") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InstallGpuDrivers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstancePolicyOrTemplate) MarshalJSON() ([]byte, error) { + type NoMethod InstancePolicyOrTemplate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InstanceStatus: VM instance status. +type InstanceStatus struct { + // MachineType: The Compute Engine machine type. + MachineType string `json:"machineType,omitempty"` + + // ProvisioningModel: The VM instance provisioning model. + // + // Possible values: + // "PROVISIONING_MODEL_UNSPECIFIED" - Unspecified. + // "STANDARD" - Standard VM. + // "SPOT" - SPOT VM. + // "PREEMPTIBLE" - Preemptible VM (PVM). Above SPOT VM is the + // preferable model for preemptible VM instances: the old preemptible VM + // model (indicated by this field) is the older model, and has been + // migrated to use the SPOT model as the underlying technology. This old + // model will still be supported. + ProvisioningModel string `json:"provisioningModel,omitempty"` + + // TaskPack: The max number of tasks can be assigned to this instance + // type. + TaskPack int64 `json:"taskPack,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "MachineType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MachineType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceStatus) MarshalJSON() ([]byte, error) { + type NoMethod InstanceStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Job: The Cloud Batch Job description. +type Job struct { + // AllocationPolicy: Compute resource allocation for all TaskGroups in + // the Job. + AllocationPolicy *AllocationPolicy `json:"allocationPolicy,omitempty"` + + // CreateTime: Output only. When the Job was created. + CreateTime string `json:"createTime,omitempty"` + + // Labels: Labels for the Job. Labels could be user provided or system + // generated. For example, "labels": { "department": "finance", + // "environment": "test" } You can assign up to 64 labels. Google + // Compute Engine label restrictions + // (https://cloud.google.com/compute/docs/labeling-resources#restrictions) + // apply. Label names that start with "goog-" or "google-" are reserved. + Labels map[string]string `json:"labels,omitempty"` + + // LogsPolicy: Log preservation policy for the Job. + LogsPolicy *LogsPolicy `json:"logsPolicy,omitempty"` + + // Name: Output only. Job name. For example: + // "projects/123456/locations/us-central1/jobs/job01". + Name string `json:"name,omitempty"` + + // Notifications: Notification configurations. + Notifications []*JobNotification `json:"notifications,omitempty"` + + // Priority: Priority of the Job. The valid value range is [0, 100). A + // job with higher priority value is more likely to run earlier if all + // other requirements are satisfied. + Priority int64 `json:"priority,omitempty,string"` + + // Status: Output only. Job status. It is read only for users. + Status *JobStatus `json:"status,omitempty"` + + // TaskGroups: Required. TaskGroups in the Job. Only one TaskGroup is + // supported now. + TaskGroups []*TaskGroup `json:"taskGroups,omitempty"` + + // Uid: Output only. A system generated unique ID (in UUID4 format) for + // the Job. + Uid string `json:"uid,omitempty"` + + // UpdateTime: Output only. The last time the Job was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AllocationPolicy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllocationPolicy") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Job) MarshalJSON() ([]byte, error) { + type NoMethod Job + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// JobNotification: Notification configurations. +type JobNotification struct { + // Message: The attribute requirements of messages to be sent to this + // Pub/Sub topic. Without this field, no message will be sent. + Message *Message `json:"message,omitempty"` + + // PubsubTopic: The Pub/Sub topic where notifications like the job state + // changes will be published. This topic exist in the same project as + // the job and billings will be charged to this project. If not + // specified, no Pub/Sub messages will be sent. Topic format: + // `projects/{project}/topics/{topic}`. + PubsubTopic string `json:"pubsubTopic,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 *JobNotification) MarshalJSON() ([]byte, error) { + type NoMethod JobNotification + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// JobStatus: Job status. +type JobStatus struct { + // RunDuration: The duration of time that the Job spent in status + // RUNNING. + RunDuration string `json:"runDuration,omitempty"` + + // State: Job state + // + // Possible values: + // "STATE_UNSPECIFIED" + // "QUEUED" - Job is admitted (validated and persisted) and waiting + // for resources. + // "SCHEDULED" - Job is scheduled to run as soon as resource + // allocation is ready. The resource allocation may happen at a later + // time but with a high chance to succeed. + // "RUNNING" - Resource allocation has been successful. At least one + // Task in the Job is RUNNING. + // "SUCCEEDED" - All Tasks in the Job have finished successfully. + // "FAILED" - At least one Task in the Job has failed. + // "DELETION_IN_PROGRESS" - The Job will be deleted, but has not been + // deleted yet. Typically this is because resources used by the Job are + // still being cleaned up. + State string `json:"state,omitempty"` + + // StatusEvents: Job status events + StatusEvents []*StatusEvent `json:"statusEvents,omitempty"` + + // TaskGroups: Aggregated task status for each TaskGroup in the Job. The + // map key is TaskGroup ID. + TaskGroups map[string]TaskGroupStatus `json:"taskGroups,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RunDuration") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RunDuration") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *JobStatus) MarshalJSON() ([]byte, error) { + type NoMethod JobStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LifecyclePolicy: LifecyclePolicy describes how to deal with task +// failures based on different conditions. +type LifecyclePolicy struct { + // Action: Action to execute when ActionCondition is true. + // + // Possible values: + // "ACTION_UNSPECIFIED" - Action unspecified. + // "RETRY_TASK" - Action that tasks in the group will be scheduled to + // re-execute. + // "FAIL_TASK" - Action that tasks in the group will be stopped + // immediately. + Action string `json:"action,omitempty"` + + // ActionCondition: Conditions that decide why a task failure is dealt + // with a specific action. + ActionCondition *ActionCondition `json:"actionCondition,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LifecyclePolicy) MarshalJSON() ([]byte, error) { + type NoMethod LifecyclePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListJobsResponse: ListJob Response. +type ListJobsResponse struct { + // Jobs: Jobs. + Jobs []*Job `json:"jobs,omitempty"` + + // NextPageToken: Next page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Jobs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Jobs") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListJobsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for +// Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*Location `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for +// Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListTasksResponse: ListTasks Response. +type ListTasksResponse struct { + // NextPageToken: Next page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Tasks: Tasks. + Tasks []*Task `json:"tasks,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListTasksResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListTasksResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents Google Cloud Platform location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type LocationPolicy struct { + // AllowedLocations: A list of allowed location names represented by + // internal URLs. Each location can be a region or a zone. Only one + // region or multiple zones in one region is supported now. For example, + // ["regions/us-central1"] allow VMs in any zones in region us-central1. + // ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs in + // zones us-central1-a and us-central1-c. All locations end up in + // different regions would cause errors. For example, + // ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", + // "zones/us-west1-a"] contains 2 regions "us-central1" and "us-west1". + // An error is expected in this case. + AllowedLocations []string `json:"allowedLocations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowedLocations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedLocations") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *LocationPolicy) MarshalJSON() ([]byte, error) { + type NoMethod LocationPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// LogsPolicy: LogsPolicy describes how outputs from a Job's Tasks +// (stdout/stderr) will be preserved. +type LogsPolicy struct { + // Destination: Where logs should be saved. + // + // Possible values: + // "DESTINATION_UNSPECIFIED" - Logs are not preserved. + // "CLOUD_LOGGING" - Logs are streamed to Cloud Logging. + // "PATH" - Logs are saved to a file path. + Destination string `json:"destination,omitempty"` + + // LogsPath: The path to which logs are saved when the destination = + // PATH. This can be a local file path on the VM, or under the mount + // point of a Persistent Disk or Filestore, or a Cloud Storage path. + LogsPath string `json:"logsPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Destination") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Destination") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *LogsPolicy) MarshalJSON() ([]byte, error) { + type NoMethod LogsPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Message: Message details. Describe the attribute that a message +// should have. Without specified message attributes, no message will be +// sent by default. +type Message struct { + // NewJobState: The new job state. + // + // Possible values: + // "STATE_UNSPECIFIED" + // "QUEUED" - Job is admitted (validated and persisted) and waiting + // for resources. + // "SCHEDULED" - Job is scheduled to run as soon as resource + // allocation is ready. The resource allocation may happen at a later + // time but with a high chance to succeed. + // "RUNNING" - Resource allocation has been successful. At least one + // Task in the Job is RUNNING. + // "SUCCEEDED" - All Tasks in the Job have finished successfully. + // "FAILED" - At least one Task in the Job has failed. + // "DELETION_IN_PROGRESS" - The Job will be deleted, but has not been + // deleted yet. Typically this is because resources used by the Job are + // still being cleaned up. + NewJobState string `json:"newJobState,omitempty"` + + // NewTaskState: The new task state. + // + // Possible values: + // "STATE_UNSPECIFIED" - unknown state + // "PENDING" - The Task is created and waiting for resources. + // "ASSIGNED" - The Task is assigned to at least one VM. + // "RUNNING" - The Task is running. + // "FAILED" - The Task has failed. + // "SUCCEEDED" - The Task has succeeded. + NewTaskState string `json:"newTaskState,omitempty"` + + // Type: The message type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified. + // "JOB_STATE_CHANGED" - Notify users that the job state has changed. + // "TASK_STATE_CHANGED" - Notify users that the task state has + // changed. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NewJobState") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NewJobState") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Message) MarshalJSON() ([]byte, error) { + type NoMethod Message + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NFS: Represents an NFS volume. +type NFS struct { + // RemotePath: Remote source path exported from the NFS, e.g., "/share". + RemotePath string `json:"remotePath,omitempty"` + + // Server: The IP address of the NFS. + Server string `json:"server,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RemotePath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RemotePath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NFS) MarshalJSON() ([]byte, error) { + type NoMethod NFS + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkInterface: A network interface. +type NetworkInterface struct { + // Network: The URL of the network resource. + Network string `json:"network,omitempty"` + + // NoExternalIpAddress: Default is false (with an external IP address). + // Required if no external public IP address is attached to the VM. If + // no external public IP address, additional configuration is required + // to allow the VM to access Google Services. See + // https://cloud.google.com/vpc/docs/configure-private-google-access and + // https://cloud.google.com/nat/docs/gce-example#create-nat for more + // information. + NoExternalIpAddress bool `json:"noExternalIpAddress,omitempty"` + + // Subnetwork: The URL of the Subnetwork resource. + Subnetwork string `json:"subnetwork,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Network") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkInterface) MarshalJSON() ([]byte, error) { + type NoMethod NetworkInterface + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NetworkPolicy: NetworkPolicy describes VM instance network +// configurations. +type NetworkPolicy struct { + // NetworkInterfaces: Network configurations. + NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkInterfaces") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NetworkInterfaces") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { + type NoMethod NetworkPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is +// the result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *Status `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal response of the operation in case of success. If + // the original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Represents the metadata of the long-running +// operation. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have + // successfully been cancelled have Operation.error value with a + // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + + // StatusMessage: Output only. Human-readable status of the operation, + // if any. + StatusMessage string `json:"statusMessage,omitempty"` + + // Target: Output only. Server-defined resource path for the target of + // the operation. + Target string `json:"target,omitempty"` + + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ApiVersion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: An Identity and Access Management (IAM) policy, which +// specifies access controls for Google Cloud resources. A `Policy` is a +// collection of `bindings`. A `binding` binds one or more `members`, or +// principals, to a single `role`. Principals can be user accounts, +// service accounts, Google groups, and domains (such as G Suite). A +// `role` is a named list of permissions; each `role` can be an IAM +// predefined role or a user-created custom role. For some types of +// Google Cloud resources, a `binding` can also specify a `condition`, +// which is a logical expression that allows access to a resource only +// if the expression evaluates to `true`. A condition can add +// constraints based on attributes of the request, the resource, or +// both. To learn which resources support conditions in their IAM +// policies, see the IAM documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +// **JSON example:** { "bindings": [ { "role": +// "roles/resourcemanager.organizationAdmin", "members": [ +// "user:mike@example.com", "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { +// "role": "roles/resourcemanager.organizationViewer", "members": [ +// "user:eve@example.com" ], "condition": { "title": "expirable access", +// "description": "Does not grant access after Sep 2020", "expression": +// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], +// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - +// members: - user:mike@example.com - group:admins@example.com - +// domain:google.com - +// serviceAccount:my-project-id@appspot.gserviceaccount.com role: +// roles/resourcemanager.organizationAdmin - members: - +// user:eve@example.com role: roles/resourcemanager.organizationViewer +// condition: title: expirable access description: Does not grant access +// after Sep 2020 expression: request.time < +// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 +// For a description of IAM and its features, see the IAM documentation +// (https://cloud.google.com/iam/docs/). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members`, or principals, with a + // `role`. Optionally, may specify a `condition` that determines how and + // when the `bindings` are applied. Each of the `bindings` must contain + // at least one principal. The `bindings` in a `Policy` can refer to up + // to 1,500 principals; up to 250 of these principals can be Google + // groups. Each occurrence of a principal counts towards these limits. + // For example, if the `bindings` grant 50 different roles to + // `user:alice@example.com`, and not to any other principal, then you + // can add another 1,450 principals to the `bindings` in the `Policy`. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the `etag` + // in the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An `etag` is returned in the response to + // `getIamPolicy`, and systems are expected to put that etag in the + // request to `setIamPolicy` to ensure that their change will be applied + // to the same version of the policy. **Important:** If you use IAM + // Conditions, you must include the `etag` field whenever you call + // `setIamPolicy`. If you omit this field, then IAM allows you to + // overwrite a version `3` policy with a version `1` policy, and all of + // the conditions in the version `3` policy are lost. + Etag string `json:"etag,omitempty"` + + // Version: Specifies the format of the policy. Valid values are `0`, + // `1`, and `3`. Requests that specify an invalid value are rejected. + // Any operation that affects conditional role bindings must specify + // version `3`. This requirement applies to the following operations: * + // Getting a policy that includes a conditional role binding * Adding a + // conditional role binding to a policy * Changing a conditional role + // binding in a policy * Removing any role binding, with or without a + // condition, from a policy that includes conditions **Important:** If + // you use IAM Conditions, you must include the `etag` field whenever + // you call `setIamPolicy`. If you omit this field, then IAM allows you + // to overwrite a version `3` policy with a version `1` policy, and all + // of the conditions in the version `3` policy are lost. If a policy + // does not include any conditions, operations on that policy may + // specify any valid version or leave the field unset. To learn which + // resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type NoMethod Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportAgentStateRequest: Request to report agent's state. The Request +// itself implies the agent is healthy. +type ReportAgentStateRequest struct { + // AgentInfo: Agent info. + AgentInfo *AgentInfo `json:"agentInfo,omitempty"` + + // Metadata: Agent metadata. + Metadata *AgentMetadata `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AgentInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AgentInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReportAgentStateRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReportAgentStateRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ReportAgentStateResponse: Response to ReportAgentStateRequest. +type ReportAgentStateResponse struct { + // Tasks: Tasks assigned to the agent + Tasks []*AgentTask `json:"tasks,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Tasks") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Tasks") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ReportAgentStateResponse) MarshalJSON() ([]byte, error) { + type NoMethod ReportAgentStateResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Runnable: Runnable describes instructions for executing a specific +// script or container as part of a Task. +type Runnable struct { + // AlwaysRun: By default, after a Runnable fails, no further Runnable + // are executed. This flag indicates that this Runnable must be run even + // if the Task has already failed. This is useful for Runnables that + // copy output files off of the VM or for debugging. The always_run flag + // does not override the Task's overall max_run_duration. If the + // max_run_duration has expired then no further Runnables will execute, + // not even always_run Runnables. + AlwaysRun bool `json:"alwaysRun,omitempty"` + + // Background: This flag allows a Runnable to continue running in the + // background while the Task executes subsequent Runnables. This is + // useful to provide services to other Runnables (or to provide + // debugging support tools like SSH servers). + Background bool `json:"background,omitempty"` + + // Barrier: Barrier runnable. + Barrier *Barrier `json:"barrier,omitempty"` + + // Container: Container runnable. + Container *Container `json:"container,omitempty"` + + // Environment: Environment variables for this Runnable (overrides + // variables set for the whole Task or TaskGroup). + Environment *Environment `json:"environment,omitempty"` + + // IgnoreExitStatus: Normally, a non-zero exit status causes the Task to + // fail. This flag allows execution of other Runnables to continue + // instead. + IgnoreExitStatus bool `json:"ignoreExitStatus,omitempty"` + + // Script: Script runnable. + Script *Script `json:"script,omitempty"` + + // Timeout: Timeout for this Runnable. + Timeout string `json:"timeout,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AlwaysRun") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AlwaysRun") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Runnable) MarshalJSON() ([]byte, error) { + type NoMethod Runnable + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Script: Script runnable. +type Script struct { + // Path: Script file path on the host VM. + Path string `json:"path,omitempty"` + + // Text: Shell script text. + Text string `json:"text,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 *Script) MarshalJSON() ([]byte, error) { + type NoMethod Script + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ServiceAccount: Carries information about a Google Cloud service +// account. +type ServiceAccount struct { + // Email: Email address of the service account. If not specified, the + // default Compute Engine service account for the project will be used. + // If instance template is being used, the service account has to be + // specified in the instance template and it has to match the email + // field here. + Email string `json:"email,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Email") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ServiceAccount) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAccount + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of the policy is limited to a few 10s of KB. An + // empty policy is a valid policy but certain Google Cloud services + // (such as Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only the fields in the mask will be modified. If no + // mask is provided, the following default mask is used: `paths: + // "bindings, etag" + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod SetIamPolicyRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different programming environments, including REST APIs +// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StatusEvent: Status event +type StatusEvent struct { + // Description: Description of the event. + Description string `json:"description,omitempty"` + + // EventTime: The time this event occurred. + EventTime string `json:"eventTime,omitempty"` + + // TaskExecution: Task Execution + TaskExecution *TaskExecution `json:"taskExecution,omitempty"` + + // Type: Type of the event. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StatusEvent) MarshalJSON() ([]byte, error) { + type NoMethod StatusEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Task: A Cloud Batch task. +type Task struct { + // Name: Task name. The name is generated from the parent TaskGroup name + // and 'id' field. For example: + // "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01/task + // s/task01". + Name string `json:"name,omitempty"` + + // Status: Task Status. + Status *TaskStatus `json:"status,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "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 *Task) MarshalJSON() ([]byte, error) { + type NoMethod Task + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TaskExecution: This Task Execution field includes detail information +// for task execution procedures, based on StatusEvent types. +type TaskExecution struct { + // ExitCode: When task is completed as the status of FAILED or + // SUCCEEDED, exit code is for one task execution result, default is 0 + // as success. + ExitCode int64 `json:"exitCode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExitCode") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExitCode") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TaskExecution) MarshalJSON() ([]byte, error) { + type NoMethod TaskExecution + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TaskGroup: A TaskGroup contains one or multiple Tasks that share the +// same Runnable but with different runtime parameters. +type TaskGroup struct { + // Name: Output only. TaskGroup name. The system generates this field + // based on parent Job name. For example: + // "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + Name string `json:"name,omitempty"` + + // Parallelism: Max number of tasks that can run in parallel. Default to + // min(task_count, 1000). + Parallelism int64 `json:"parallelism,omitempty,string"` + + // PermissiveSsh: When true, Batch will configure SSH to allow + // passwordless login between VMs running the Batch tasks in the same + // TaskGroup. + PermissiveSsh bool `json:"permissiveSsh,omitempty"` + + // RequireHostsFile: When true, Batch will populate a file with a list + // of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE + // environment variable to the path of that file. Defaults to false. + RequireHostsFile bool `json:"requireHostsFile,omitempty"` + + // TaskCount: Number of Tasks in the TaskGroup. default is 1 + TaskCount int64 `json:"taskCount,omitempty,string"` + + // TaskCountPerNode: Max number of tasks that can be run on a VM at the + // same time. If not specified, the system will decide a value based on + // available compute resources on a VM and task requirements. + TaskCountPerNode int64 `json:"taskCountPerNode,omitempty,string"` + + // TaskEnvironments: An array of environment variable mappings, which + // are passed to Tasks with matching indices. If task_environments is + // used then task_count should not be specified in the request (and will + // be ignored). Task count will be the length of task_environments. + // Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment + // variable, in addition to any environment variables set in + // task_environments, specifying the number of Tasks in the Task's + // parent TaskGroup, and the specific Task's index in the TaskGroup (0 + // through BATCH_TASK_COUNT - 1). task_environments supports up to 200 + // entries. + TaskEnvironments []*Environment `json:"taskEnvironments,omitempty"` + + // TaskSpec: Required. Tasks in the group share the same task spec. + TaskSpec *TaskSpec `json:"taskSpec,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 *TaskGroup) MarshalJSON() ([]byte, error) { + type NoMethod TaskGroup + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TaskGroupStatus: Aggregated task status for a TaskGroup. +type TaskGroupStatus struct { + // Counts: Count of task in each state in the TaskGroup. The map key is + // task state name. + Counts map[string]string `json:"counts,omitempty"` + + // Instances: Status of instances allocated for the TaskGroup. + Instances []*InstanceStatus `json:"instances,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Counts") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Counts") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TaskGroupStatus) MarshalJSON() ([]byte, error) { + type NoMethod TaskGroupStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TaskSpec: Spec of a task +type TaskSpec struct { + // ComputeResource: ComputeResource requirements. + ComputeResource *ComputeResource `json:"computeResource,omitempty"` + + // Environment: Environment variables to set before running the Task. + Environment *Environment `json:"environment,omitempty"` + + // Environments: Environment variables to set before running the Task. + // You can set up to 100 environments. + Environments map[string]string `json:"environments,omitempty"` + + // LifecyclePolicies: Lifecycle management schema when any task in a + // task group is failed. The valid size of lifecycle policies are [0, + // 10]. For each lifecycle policy, when the condition is met, the action + // in that policy will execute. If there are multiple policies that the + // task execution result matches, we use the action from the first + // matched policy. If task execution result does not meet with any of + // the defined lifecycle policy, we consider it as the default policy. + // Default policy means if the exit code is 0, exit task. If task ends + // with non-zero exit code, retry the task with max_retry_count. + LifecyclePolicies []*LifecyclePolicy `json:"lifecyclePolicies,omitempty"` + + // MaxRetryCount: Maximum number of retries on failures. The default, 0, + // which means never retry. The valid value range is [0, 10]. + MaxRetryCount int64 `json:"maxRetryCount,omitempty"` + + // MaxRunDuration: Maximum duration the task should run. The task will + // be killed and marked as FAILED if over this limit. + MaxRunDuration string `json:"maxRunDuration,omitempty"` + + // Runnables: The sequence of scripts or containers to run for this + // Task. Each Task using this TaskSpec executes its list of runnables in + // order. The Task succeeds if all of its runnables either exit with a + // zero status or any that exit with a non-zero status have the + // ignore_exit_status flag. Background runnables are killed + // automatically (if they have not already exited) a short time after + // all foreground runnables have completed. Even though this is likely + // to result in a non-zero exit status for the background runnable, + // these automatic kills are not treated as Task failures. + Runnables []*Runnable `json:"runnables,omitempty"` + + // Volumes: Volumes to mount before running Tasks using this TaskSpec. + Volumes []*Volume `json:"volumes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ComputeResource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ComputeResource") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *TaskSpec) MarshalJSON() ([]byte, error) { + type NoMethod TaskSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TaskStatus: Status of a task +type TaskStatus struct { + // State: Task state + // + // Possible values: + // "STATE_UNSPECIFIED" - unknown state + // "PENDING" - The Task is created and waiting for resources. + // "ASSIGNED" - The Task is assigned to at least one VM. + // "RUNNING" - The Task is running. + // "FAILED" - The Task has failed. + // "SUCCEEDED" - The Task has succeeded. + State string `json:"state,omitempty"` + + // StatusEvents: Detailed info about why the state is reached. + StatusEvents []*StatusEvent `json:"statusEvents,omitempty"` + + // ForceSendFields is a list of field names (e.g. "State") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "State") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TaskStatus) MarshalJSON() ([]byte, error) { + type NoMethod TaskStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with wildcards (such as `*` or `storage.*`) are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod TestIamPermissionsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Volume: Volume describes a volume and parameters for it to be mounted +// to a VM. +type Volume struct { + // DeviceName: Device name of an attached disk volume, which should + // align with a device_name specified by + // job.allocation_policy.instances[0].policy.disks[i].device_name or + // defined by the given instance template in + // job.allocation_policy.instances[0].instance_template. + DeviceName string `json:"deviceName,omitempty"` + + // Gcs: A Google Cloud Storage (GCS) volume. + Gcs *GCS `json:"gcs,omitempty"` + + // MountOptions: For Google Cloud Storage (GCS), mount options are the + // options supported by the gcsfuse tool + // (https://github.com/GoogleCloudPlatform/gcsfuse). For existing + // persistent disks, mount options provided by the mount command + // (https://man7.org/linux/man-pages/man8/mount.8.html) except writing + // are supported. This is due to restrictions of multi-writer mode + // (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + // For other attached disks and Network File System (NFS), mount options + // are these supported by the mount command + // (https://man7.org/linux/man-pages/man8/mount.8.html). + MountOptions []string `json:"mountOptions,omitempty"` + + // MountPath: The mount path for the volume, e.g. /mnt/disks/share. + MountPath string `json:"mountPath,omitempty"` + + // Nfs: A Network File System (NFS) volume. For example, a Filestore + // file share. + Nfs *NFS `json:"nfs,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Volume) MarshalJSON() ([]byte, error) { + type NoMethod Volume + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "batch.projects.locations.get": + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.get" call. +// Exactly one of *Location or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Location.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &Location{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets information about a location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "batch.projects.locations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Resource name for the location.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Location" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.list": + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this +// service. +// +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.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": "v1/projects/{projectsId}/locations", + // "httpMethod": "GET", + // "id": "batch.projects.locations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The resource that owns the locations collection, if applicable.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of results to return. If not set, the service selects a default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/locations", + // "response": { + // "$ref": "ListLocationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "batch.projects.locations.jobs.create": + +type ProjectsLocationsJobsCreateCall struct { + s *Service + parent string + job *Job + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a Job. +// +// - parent: The parent resource name where the Job will be created. +// Pattern: "projects/{project}/locations/{location}". +func (r *ProjectsLocationsJobsService) Create(parent string, job *Job) *ProjectsLocationsJobsCreateCall { + c := &ProjectsLocationsJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.job = job + return c +} + +// JobId sets the optional parameter "jobId": ID used to uniquely +// identify the Job within its parent scope. This field should contain +// at most 63 characters and must start with lowercase characters. Only +// lowercase characters, numbers and '-' are accepted. The '-' character +// cannot be the first or the last one. A system generated ID will be +// used if the field is not set. The job.name field in the request will +// be ignored and the created resource name of the Job will be +// "{parent}/jobs/{job_id}". +func (c *ProjectsLocationsJobsCreateCall) JobId(jobId string) *ProjectsLocationsJobsCreateCall { + c.urlParams_.Set("jobId", jobId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsJobsCreateCall) RequestId(requestId string) *ProjectsLocationsJobsCreateCall { + 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 *ProjectsLocationsJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsCreateCall { + 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 *ProjectsLocationsJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsJobsCreateCall { + 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 *ProjectsLocationsJobsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsJobsCreateCall) 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.job) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/jobs") + 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 "batch.projects.locations.jobs.create" call. +// Exactly one of *Job or error will be non-nil. Any non-2xx status code +// is an error. Response headers are in either +// *Job.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsJobsCreateCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ + 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": "Create a Job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs", + // "httpMethod": "POST", + // "id": "batch.projects.locations.jobs.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "jobId": { + // "description": "ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set. The job.name field in the request will be ignored and the created resource name of the Job will be \"{parent}/jobs/{job_id}\".", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name where the Job will be created. Pattern: \"projects/{project}/locations/{location}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/jobs", + // "request": { + // "$ref": "Job" + // }, + // "response": { + // "$ref": "Job" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.jobs.delete": + +type ProjectsLocationsJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Delete a Job. +// +// - name: Job name. +func (r *ProjectsLocationsJobsService) Delete(name string) *ProjectsLocationsJobsDeleteCall { + c := &ProjectsLocationsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Reason sets the optional parameter "reason": Reason for this +// deletion. +func (c *ProjectsLocationsJobsDeleteCall) Reason(reason string) *ProjectsLocationsJobsDeleteCall { + c.urlParams_.Set("reason", reason) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsJobsDeleteCall) RequestId(requestId string) *ProjectsLocationsJobsDeleteCall { + 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 *ProjectsLocationsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsDeleteCall { + 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 *ProjectsLocationsJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsJobsDeleteCall { + 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 *ProjectsLocationsJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.jobs.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 *ProjectsLocationsJobsDeleteCall) 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": "Delete a Job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", + // "httpMethod": "DELETE", + // "id": "batch.projects.locations.jobs.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Job name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "reason": { + // "description": "Optional. Reason for this deletion.", + // "location": "query", + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.jobs.get": + +type ProjectsLocationsJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a Job specified by its resource name. +// +// - name: Job name. +func (r *ProjectsLocationsJobsService) Get(name string) *ProjectsLocationsJobsGetCall { + c := &ProjectsLocationsJobsGetCall{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 *ProjectsLocationsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetCall { + 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 *ProjectsLocationsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetCall { + 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 *ProjectsLocationsJobsGetCall) Context(ctx context.Context) *ProjectsLocationsJobsGetCall { + 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 *ProjectsLocationsJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.jobs.get" call. +// Exactly one of *Job or error will be non-nil. Any non-2xx status code +// is an error. Response headers are in either +// *Job.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, 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 := &Job{ + 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": "Get a Job specified by its resource name.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", + // "httpMethod": "GET", + // "id": "batch.projects.locations.jobs.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Job name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Job" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.jobs.getIamPolicy": + +type ProjectsLocationsJobsGetIamPolicyCall 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 *ProjectsLocationsJobsService) GetIamPolicy(resource string) *ProjectsLocationsJobsGetIamPolicyCall { + c := &ProjectsLocationsJobsGetIamPolicyCall{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 *ProjectsLocationsJobsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsJobsGetIamPolicyCall { + 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 *ProjectsLocationsJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsGetIamPolicyCall { + 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 *ProjectsLocationsJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsGetIamPolicyCall { + 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 *ProjectsLocationsJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsJobsGetIamPolicyCall { + 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 *ProjectsLocationsJobsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.jobs.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 *ProjectsLocationsJobsGetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "batch.projects.locations.jobs.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/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.jobs.list": + +type ProjectsLocationsJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List all Jobs for a project within a region. +// +// - parent: Parent path. +func (r *ProjectsLocationsJobsService) List(parent string) *ProjectsLocationsJobsListCall { + c := &ProjectsLocationsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": List filter. +func (c *ProjectsLocationsJobsListCall) Filter(filter string) *ProjectsLocationsJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Page size. +func (c *ProjectsLocationsJobsListCall) PageSize(pageSize int64) *ProjectsLocationsJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token. +func (c *ProjectsLocationsJobsListCall) PageToken(pageToken string) *ProjectsLocationsJobsListCall { + 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 *ProjectsLocationsJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsListCall { + 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 *ProjectsLocationsJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsListCall { + 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 *ProjectsLocationsJobsListCall) Context(ctx context.Context) *ProjectsLocationsJobsListCall { + 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 *ProjectsLocationsJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsJobsListCall) 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}/jobs") + 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 "batch.projects.locations.jobs.list" call. +// Exactly one of *ListJobsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListJobsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, 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 := &ListJobsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List all Jobs for a project within a region.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs", + // "httpMethod": "GET", + // "id": "batch.projects.locations.jobs.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "List filter.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Parent path.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/jobs", + // "response": { + // "$ref": "ListJobsResponse" + // }, + // "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 *ProjectsLocationsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) 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 "batch.projects.locations.jobs.setIamPolicy": + +type ProjectsLocationsJobsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsJobsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsJobsSetIamPolicyCall { + c := &ProjectsLocationsJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsSetIamPolicyCall { + 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 *ProjectsLocationsJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsJobsSetIamPolicyCall { + 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 *ProjectsLocationsJobsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.jobs.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsJobsSetIamPolicyCall) 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": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "batch.projects.locations.jobs.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.jobs.testIamPermissions": + +type ProjectsLocationsJobsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsJobsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsJobsTestIamPermissionsCall { + c := &ProjectsLocationsJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsTestIamPermissionsCall { + 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 *ProjectsLocationsJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsJobsTestIamPermissionsCall { + 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 *ProjectsLocationsJobsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.jobs.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "batch.projects.locations.jobs.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.jobs.taskGroups.tasks.get": + +type ProjectsLocationsJobsTaskGroupsTasksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Return a single Task. +// +// - name: Task name. +func (r *ProjectsLocationsJobsTaskGroupsTasksService) Get(name string) *ProjectsLocationsJobsTaskGroupsTasksGetCall { + c := &ProjectsLocationsJobsTaskGroupsTasksGetCall{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 *ProjectsLocationsJobsTaskGroupsTasksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsTaskGroupsTasksGetCall { + 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 *ProjectsLocationsJobsTaskGroupsTasksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsTaskGroupsTasksGetCall { + 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 *ProjectsLocationsJobsTaskGroupsTasksGetCall) Context(ctx context.Context) *ProjectsLocationsJobsTaskGroupsTasksGetCall { + 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 *ProjectsLocationsJobsTaskGroupsTasksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsJobsTaskGroupsTasksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.jobs.taskGroups.tasks.get" call. +// Exactly one of *Task or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Task.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsJobsTaskGroupsTasksGetCall) Do(opts ...googleapi.CallOption) (*Task, 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 := &Task{ + 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": "Return a single Task.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/taskGroups/{taskGroupsId}/tasks/{tasksId}", + // "httpMethod": "GET", + // "id": "batch.projects.locations.jobs.taskGroups.tasks.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Task name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Task" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.jobs.taskGroups.tasks.list": + +type ProjectsLocationsJobsTaskGroupsTasksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List Tasks associated with a job. +// +// - parent: Name of a TaskGroup from which Tasks are being requested. +// Pattern: +// "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task +// _group}". +func (r *ProjectsLocationsJobsTaskGroupsTasksService) List(parent string) *ProjectsLocationsJobsTaskGroupsTasksListCall { + c := &ProjectsLocationsJobsTaskGroupsTasksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Task filter, null filter +// matches all Tasks. Filter string should be of the format +// State=TaskStatus.State e.g. State=RUNNING +func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) Filter(filter string) *ProjectsLocationsJobsTaskGroupsTasksListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Page size. +func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) PageSize(pageSize int64) *ProjectsLocationsJobsTaskGroupsTasksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token. +func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) PageToken(pageToken string) *ProjectsLocationsJobsTaskGroupsTasksListCall { + 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 *ProjectsLocationsJobsTaskGroupsTasksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsJobsTaskGroupsTasksListCall { + 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 *ProjectsLocationsJobsTaskGroupsTasksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsJobsTaskGroupsTasksListCall { + 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 *ProjectsLocationsJobsTaskGroupsTasksListCall) Context(ctx context.Context) *ProjectsLocationsJobsTaskGroupsTasksListCall { + 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 *ProjectsLocationsJobsTaskGroupsTasksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) 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}/tasks") + 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 "batch.projects.locations.jobs.taskGroups.tasks.list" call. +// Exactly one of *ListTasksResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListTasksResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsJobsTaskGroupsTasksListCall) Do(opts ...googleapi.CallOption) (*ListTasksResponse, 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 := &ListTasksResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List Tasks associated with a job.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/taskGroups/{taskGroupsId}/tasks", + // "httpMethod": "GET", + // "id": "batch.projects.locations.jobs.taskGroups.tasks.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Task filter, null filter matches all Tasks. Filter string should be of the format State=TaskStatus.State e.g. State=RUNNING", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Name of a TaskGroup from which Tasks are being requested. Pattern: \"projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}\"", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/taskGroups/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/tasks", + // "response": { + // "$ref": "ListTasksResponse" + // }, + // "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 *ProjectsLocationsJobsTaskGroupsTasksListCall) Pages(ctx context.Context, f func(*ListTasksResponse) 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 "batch.projects.locations.nodes.getIamPolicy": + +type ProjectsLocationsNodesGetIamPolicyCall 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 *ProjectsLocationsNodesService) GetIamPolicy(resource string) *ProjectsLocationsNodesGetIamPolicyCall { + c := &ProjectsLocationsNodesGetIamPolicyCall{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 *ProjectsLocationsNodesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNodesGetIamPolicyCall { + 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 *ProjectsLocationsNodesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesGetIamPolicyCall { + 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 *ProjectsLocationsNodesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsNodesGetIamPolicyCall { + 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 *ProjectsLocationsNodesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNodesGetIamPolicyCall { + 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 *ProjectsLocationsNodesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.nodes.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 *ProjectsLocationsNodesGetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "batch.projects.locations.nodes.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/[^/]+/nodes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.nodes.setIamPolicy": + +type ProjectsLocationsNodesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsNodesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsNodesSetIamPolicyCall { + c := &ProjectsLocationsNodesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNodesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesSetIamPolicyCall { + 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 *ProjectsLocationsNodesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNodesSetIamPolicyCall { + 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 *ProjectsLocationsNodesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.nodes.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsNodesSetIamPolicyCall) 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": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "batch.projects.locations.nodes.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.nodes.testIamPermissions": + +type ProjectsLocationsNodesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsNodesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsNodesTestIamPermissionsCall { + c := &ProjectsLocationsNodesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsNodesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNodesTestIamPermissionsCall { + 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 *ProjectsLocationsNodesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNodesTestIamPermissionsCall { + 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 *ProjectsLocationsNodesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNodesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.nodes.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsNodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "batch.projects.locations.nodes.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "batch.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "CancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "batch.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.operations.get" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "batch.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.operations.list" call. +// Exactly one of *ListOperationsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &ListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "batch.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "batch.projects.locations.state.report": + +type ProjectsLocationsStateReportCall struct { + s *Service + parent string + reportagentstaterequest *ReportAgentStateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Report: Report agent's state, e.g. agent status and tasks information +// +// - parent: Format: projects/{project}/locations/{location} {project} +// should be a project number. +func (r *ProjectsLocationsStateService) Report(parent string, reportagentstaterequest *ReportAgentStateRequest) *ProjectsLocationsStateReportCall { + c := &ProjectsLocationsStateReportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.reportagentstaterequest = reportagentstaterequest + 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 *ProjectsLocationsStateReportCall) Fields(s ...googleapi.Field) *ProjectsLocationsStateReportCall { + 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 *ProjectsLocationsStateReportCall) Context(ctx context.Context) *ProjectsLocationsStateReportCall { + 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 *ProjectsLocationsStateReportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStateReportCall) 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.reportagentstaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/state:report") + 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 "batch.projects.locations.state.report" call. +// Exactly one of *ReportAgentStateResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ReportAgentStateResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsStateReportCall) Do(opts ...googleapi.CallOption) (*ReportAgentStateResponse, 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 := &ReportAgentStateResponse{ + 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": "Report agent's state, e.g. agent status and tasks information", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/state:report", + // "httpMethod": "POST", + // "id": "batch.projects.locations.state.report", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Format: projects/{project}/locations/{location} {project} should be a project number.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/state:report", + // "request": { + // "$ref": "ReportAgentStateRequest" + // }, + // "response": { + // "$ref": "ReportAgentStateResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.tasks.getIamPolicy": + +type ProjectsLocationsTasksGetIamPolicyCall 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 *ProjectsLocationsTasksService) GetIamPolicy(resource string) *ProjectsLocationsTasksGetIamPolicyCall { + c := &ProjectsLocationsTasksGetIamPolicyCall{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 *ProjectsLocationsTasksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsTasksGetIamPolicyCall { + 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 *ProjectsLocationsTasksGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTasksGetIamPolicyCall { + 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 *ProjectsLocationsTasksGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsTasksGetIamPolicyCall { + 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 *ProjectsLocationsTasksGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTasksGetIamPolicyCall { + 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 *ProjectsLocationsTasksGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTasksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.tasks.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 *ProjectsLocationsTasksGetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "batch.projects.locations.tasks.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/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.tasks.setIamPolicy": + +type ProjectsLocationsTasksSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsTasksService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsTasksSetIamPolicyCall { + c := &ProjectsLocationsTasksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTasksSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsTasksSetIamPolicyCall { + 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 *ProjectsLocationsTasksSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsTasksSetIamPolicyCall { + 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 *ProjectsLocationsTasksSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTasksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.tasks.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsTasksSetIamPolicyCall) 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": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "batch.projects.locations.tasks.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "batch.projects.locations.tasks.testIamPermissions": + +type ProjectsLocationsTasksTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsTasksService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsTasksTestIamPermissionsCall { + c := &ProjectsLocationsTasksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsTasksTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsTasksTestIamPermissionsCall { + 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 *ProjectsLocationsTasksTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsTasksTestIamPermissionsCall { + 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 *ProjectsLocationsTasksTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsTasksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "batch.projects.locations.tasks.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsTasksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tasks/{tasksId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "batch.projects.locations.tasks.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/tasks/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/beyondcorp/v1/beyondcorp-api.json b/beyondcorp/v1/beyondcorp-api.json index 6ebfddeda7f..35f16f73a17 100644 --- a/beyondcorp/v1/beyondcorp-api.json +++ b/beyondcorp/v1/beyondcorp-api.json @@ -1741,7 +1741,7 @@ } } }, - "revision": "20220929", + "revision": "20221019", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -2998,45 +2998,6 @@ }, "type": "object" }, - "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata", - "properties": { - "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" - }, "GoogleCloudBeyondcorpClientconnectorservicesV1alphaClientConnectorServiceOperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "GoogleCloudBeyondcorpClientconnectorservicesV1alphaClientConnectorServiceOperationMetadata", @@ -3245,50 +3206,6 @@ "properties": {}, "type": "object" }, - "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata", - "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" - }, "GoogleCloudLocationListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "GoogleCloudLocationListLocationsResponse", diff --git a/beyondcorp/v1/beyondcorp-gen.go b/beyondcorp/v1/beyondcorp-gen.go index 869f16214b3..7ae8786a126 100644 --- a/beyondcorp/v1/beyondcorp-gen.go +++ b/beyondcorp/v1/beyondcorp-gen.go @@ -1985,55 +1985,6 @@ func (s *GoogleCloudBeyondcorpAppgatewaysV1alphaAppGatewayOperationMetadata) Mar return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata: -// Represents the metadata of the long-running operation. -type GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata struct { - // 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. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudBeyondcorpClientconnectorservicesV1alphaClientConnectorServ // iceOperationMetadata: Represents the metadata of the long-running // operation. @@ -2289,58 +2240,6 @@ func (s *GoogleCloudBeyondcorpConnectorsV1alphaContainerHealthDetails) MarshalJS type GoogleCloudBeyondcorpConnectorsV1alphaRemoteAgentDetails struct { } -// GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetada -// ta: Represents the metadata of the long-running operation. -type GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata 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 *GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { diff --git a/beyondcorp/v1alpha/beyondcorp-api.json b/beyondcorp/v1alpha/beyondcorp-api.json index d5c48b99808..17b7c68678e 100644 --- a/beyondcorp/v1alpha/beyondcorp-api.json +++ b/beyondcorp/v1alpha/beyondcorp-api.json @@ -303,6 +303,99 @@ ] } } + }, + "subscriptions": { + "methods": { + "create": { + "description": "Creates a new BeyondCorp Enterprise Subscription in a given organization. Location will always be global as BeyondCorp subscriptions are per organization.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/subscriptions", + "httpMethod": "POST", + "id": "beyondcorp.organizations.locations.subscriptions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the subscription location using the form: `organizations/{organization_id}/locations/{location}`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/subscriptions", + "request": { + "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" + }, + "response": { + "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single Subscription.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/subscriptions/{subscriptionsId}", + "httpMethod": "GET", + "id": "beyondcorp.organizations.locations.subscriptions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of Subscription using the form: `organizations/{organization_id}/locations/{location}/subscriptions/{subscription_id}`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/subscriptions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Subscriptions in a given organization and location.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/subscriptions", + "httpMethod": "GET", + "id": "beyondcorp.organizations.locations.subscriptions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The next_page_token value returned from a previous ListSubscriptionsRequest, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of Subscription using the form: `organizations/{organization_id}/locations/{location}`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/subscriptions", + "response": { + "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -2771,109 +2864,6 @@ }, "netConnections": { "methods": { - "create": { - "description": "Creates a new NetConnection in a given project and location.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections", - "httpMethod": "POST", - "id": "beyondcorp.projects.locations.netConnections.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "netConnectionId": { - "description": "Optional. User-settable NetConnection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The resource project name of the NetConnection location using the form: `projects/{project_id}/locations/{location_id}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1alpha/{+parent}/netConnections", - "request": { - "$ref": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a single NetConnection.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}", - "httpMethod": "DELETE", - "id": "beyondcorp.projects.locations.netConnections.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/netConnections/{net_connection_id}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/netConnections/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets details of a single NetConnection.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}", - "httpMethod": "GET", - "id": "beyondcorp.projects.locations.netConnections.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. BeyondCorp NetConnection name using the form: `projects/{project_id}/locations/{location_id}/netConnections/{net_connection_id}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/netConnections/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection" - }, - "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}:getIamPolicy", @@ -2905,101 +2895,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "list": { - "description": "Lists NetConnections in a given project and location.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections", - "httpMethod": "GET", - "id": "beyondcorp.projects.locations.netConnections.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. A filter specifying constraints of a list operation.", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. The next_page_token value returned from a previous ListNetConnectionsRequest, if any.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. The resource name of the NetConnection location using the form: `projects/{project_id}/locations/{location_id}`", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/netConnections", - "response": { - "$ref": "GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates the parameters of a single NetConnection.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}", - "httpMethod": "PATCH", - "id": "beyondcorp.projects.locations.netConnections.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "allowMissing": { - "description": "Optional. If set as true, will create the resource if it is not found.", - "location": "query", - "type": "boolean" - }, - "name": { - "description": "Required. Unique resource name of the NetConnection. The name is ignored when creating a NetConnection.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/netConnections/[^/]+$", - "required": true, - "type": "string" - }, - "requestId": { - "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - "location": "query", - "type": "string" - }, - "updateMask": { - "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.NetConnection]: * `labels` * `display_name`", - "format": "google-fieldmask", - "location": "query", - "type": "string" - }, - "validateOnly": { - "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - "location": "query", - "type": "boolean" - } - }, - "path": "v1alpha/{+name}", - "request": { - "$ref": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "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": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}:setIamPolicy", @@ -3186,7 +3081,7 @@ } } }, - "revision": "20220929", + "revision": "20221019", "rootUrl": "https://beyondcorp.googleapis.com/", "schemas": { "AllocatedConnection": { @@ -4815,45 +4710,6 @@ }, "type": "object" }, - "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata", - "properties": { - "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" - }, "GoogleCloudBeyondcorpClientconnectorservicesV1ClientConnectorServiceOperationMetadata": { "description": "Represents the metadata of the long-running operation.", "id": "GoogleCloudBeyondcorpClientconnectorservicesV1ClientConnectorServiceOperationMetadata", @@ -4942,154 +4798,6 @@ }, "type": "object" }, - "GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse": { - "description": "Response message for BeyondCorp.ListNetConnections.", - "id": "GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse", - "properties": { - "netConnections": { - "description": "A list of BeyondCorp NetConnections in the project.", - "items": { - "$ref": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token to retrieve the next page of results, or empty if there are no more results in the list.", - "type": "string" - }, - "unreachable": { - "description": "A list of locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection": { - "description": "A BeyondCorp NetConnection resource represents a BeyondCorp protected connection from BeyondCorp Client Connector to a remote application through a BeyondCorp AppConnector gateway.", - "id": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection", - "properties": { - "connectors": { - "description": "Optional. List of [google.cloud.beyondcorp.v1main.AppConnector.name] that are authorized to be associated with this NetConnection. e.g. projects/{project}/locations/{location}/appConnectors/{app_connector}", - "items": { - "type": "string" - }, - "type": "array" - }, - "createTime": { - "description": "Output only. Timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "destinationCidrs": { - "description": "Required. CIDRs for the remote networks to connect to. e.g. IPv4: 198.51.100.14/24 IPv6: 2001:db8::/48", - "items": { - "type": "string" - }, - "type": "array" - }, - "displayName": { - "description": "Optional. An arbitrary user-provided name for the NetConnection. Cannot exceed 64 characters.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Resource labels to represent user provided metadata.", - "type": "object" - }, - "name": { - "description": "Required. Unique resource name of the NetConnection. The name is ignored when creating a NetConnection.", - "type": "string" - }, - "networkVpc": { - "description": "Output only. The full name of the VPC network connected to the applications. Client Connector will send traffic here.", - "readOnly": true, - "type": "string" - }, - "state": { - "description": "Output only. The current state of the NetConnection.", - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "CREATED", - "UPDATING", - "DELETING", - "DOWN" - ], - "enumDescriptions": [ - "Default value. This value is unused.", - "NetConnection is being created.", - "NetConnection has been created.", - "NetConnection's configuration is being updated.", - "NetConnection is being deleted.", - "NetConnection is down and may be restored in the future. This happens when CCFE sends ProjectState = OFF." - ], - "readOnly": true, - "type": "string" - }, - "uid": { - "description": "Output only. A unique identifier for the instance generated by the system.", - "readOnly": true, - "type": "string" - }, - "updateTime": { - "description": "Output only. Timestamp when the resource was last modified.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata": { - "description": "Represents the metadata of the long-running operation.", - "id": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata", - "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" - }, "GoogleCloudBeyondcorpSaasplatformInsightsV1alphaAppliedConfig": { "description": "The configuration that was applied to generate the result.", "id": "GoogleCloudBeyondcorpSaasplatformInsightsV1alphaAppliedConfig", @@ -5384,6 +5092,107 @@ }, "type": "object" }, + "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse": { + "description": "Response message for BeyondCorp.ListSubscriptions.", + "id": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "subscriptions": { + "description": "A list of BeyondCorp Subscriptions in the organization.", + "items": { + "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription": { + "description": "A BeyondCorp Subscription resource represents BeyondCorp Enterprise Subscription. BeyondCorp Enterprise Subscription enables BeyondCorp Enterprise permium features for an organization.", + "id": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription", + "properties": { + "autoRenewEnabled": { + "description": "Output only. Represents that, if subscription will renew or end when the term ends.", + "readOnly": true, + "type": "boolean" + }, + "createTime": { + "description": "Output only. Create time of the subscription.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. End time of the subscription.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Required. Unique resource name of the Subscription. The name is ignored when creating a subscription.", + "type": "string" + }, + "seatCount": { + "description": "Output only. Number of seats in the subscription.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "sku": { + "description": "Required. SKU of subscription.", + "enum": [ + "SKU_UNSPECIFIED", + "BCE_STANDARD_SKU" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents BeyondCorp Standard SKU." + ], + "type": "string" + }, + "startTime": { + "description": "Output only. Start time of the subscription.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the subscription.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents an active subscription.", + "Represents an upcomming subscription." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. Type of subscription.", + "enum": [ + "TYPE_UNSPECIFIED", + "TRIAL", + "PAID", + "ALLOWLIST" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Represents a trial subscription.", + "Represents a paid subscription.", + "Reresents an allowlisted subscription." + ], + "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 1bd8b378745..aebecfdfe01 100644 --- a/beyondcorp/v1alpha/beyondcorp-gen.go +++ b/beyondcorp/v1alpha/beyondcorp-gen.go @@ -155,6 +155,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} rs.Insights = NewOrganizationsLocationsInsightsService(s) + rs.Subscriptions = NewOrganizationsLocationsSubscriptionsService(s) return rs } @@ -162,6 +163,8 @@ type OrganizationsLocationsService struct { s *Service Insights *OrganizationsLocationsInsightsService + + Subscriptions *OrganizationsLocationsSubscriptionsService } func NewOrganizationsLocationsInsightsService(s *Service) *OrganizationsLocationsInsightsService { @@ -173,6 +176,15 @@ type OrganizationsLocationsInsightsService struct { s *Service } +func NewOrganizationsLocationsSubscriptionsService(s *Service) *OrganizationsLocationsSubscriptionsService { + rs := &OrganizationsLocationsSubscriptionsService{s: s} + return rs +} + +type OrganizationsLocationsSubscriptionsService struct { + s *Service +} + func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} rs.Locations = NewProjectsLocationsService(s) @@ -2574,55 +2586,6 @@ func (s *GoogleCloudBeyondcorpAppgatewaysV1AppGatewayOperationMetadata) MarshalJ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata: -// Represents the metadata of the long-running operation. -type GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata struct { - // 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. "CreateTime") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpApplicationsV1alphaApplicationOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudBeyondcorpClientconnectorservicesV1ClientConnectorServiceOp // erationMetadata: Represents the metadata of the long-running // operation. @@ -2728,180 +2691,6 @@ func (s *GoogleCloudBeyondcorpClientgatewaysV1ClientGatewayOperationMetadata) Ma return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse: -// Response message for BeyondCorp.ListNetConnections. -type GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse struct { - // NetConnections: A list of BeyondCorp NetConnections in the project. - NetConnections []*GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection `json:"netConnections,omitempty"` - - // NextPageToken: A token to retrieve the next page of results, or empty - // if there are no more results in the list. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Unreachable: A list of locations that could not be reached. - Unreachable []string `json:"unreachable,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "NetConnections") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "NetConnections") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection: A BeyondCorp -// NetConnection resource represents a BeyondCorp protected connection -// from BeyondCorp Client Connector to a remote application through a -// BeyondCorp AppConnector gateway. -type GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection struct { - // Connectors: Optional. List of - // [google.cloud.beyondcorp.v1main.AppConnector.name] that are - // authorized to be associated with this NetConnection. e.g. - // projects/{project}/locations/{location}/appConnectors/{app_connector} - Connectors []string `json:"connectors,omitempty"` - - // CreateTime: Output only. Timestamp when the resource was created. - CreateTime string `json:"createTime,omitempty"` - - // DestinationCidrs: Required. CIDRs for the remote networks to connect - // to. e.g. IPv4: 198.51.100.14/24 IPv6: 2001:db8::/48 - DestinationCidrs []string `json:"destinationCidrs,omitempty"` - - // DisplayName: Optional. An arbitrary user-provided name for the - // NetConnection. Cannot exceed 64 characters. - DisplayName string `json:"displayName,omitempty"` - - // Labels: Optional. Resource labels to represent user provided - // metadata. - Labels map[string]string `json:"labels,omitempty"` - - // Name: Required. Unique resource name of the NetConnection. The name - // is ignored when creating a NetConnection. - Name string `json:"name,omitempty"` - - // NetworkVpc: Output only. The full name of the VPC network connected - // to the applications. Client Connector will send traffic here. - NetworkVpc string `json:"networkVpc,omitempty"` - - // State: Output only. The current state of the NetConnection. - // - // Possible values: - // "STATE_UNSPECIFIED" - Default value. This value is unused. - // "CREATING" - NetConnection is being created. - // "CREATED" - NetConnection has been created. - // "UPDATING" - NetConnection's configuration is being updated. - // "DELETING" - NetConnection is being deleted. - // "DOWN" - NetConnection is down and may be restored in the future. - // This happens when CCFE sends ProjectState = OFF. - State string `json:"state,omitempty"` - - // Uid: Output only. A unique identifier for the instance generated by - // the system. - Uid string `json:"uid,omitempty"` - - // UpdateTime: Output only. Timestamp when the resource was last - // modified. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Connectors") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Connectors") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetada -// ta: Represents the metadata of the long-running operation. -type GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata 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 *GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnectionOperationMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudBeyondcorpSaasplatformInsightsV1alphaAppliedConfig: The // configuration that was applied to generate the result. type GoogleCloudBeyondcorpSaasplatformInsightsV1alphaAppliedConfig struct { @@ -3306,21 +3095,22 @@ func (s *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaRowFieldVal) MarshalJSO return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudLocationListLocationsResponse: The response message for -// Locations.ListLocations. -type GoogleCloudLocationListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in - // the request. - Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"` - - // NextPageToken: The standard List next-page token. +// GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptions +// Response: Response message for BeyondCorp.ListSubscriptions. +type GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse struct { + // NextPageToken: A token to retrieve the next page of results, or empty + // if there are no more results in the list. NextPageToken string `json:"nextPageToken,omitempty"` + // Subscriptions: A list of BeyondCorp Subscriptions in the + // organization. + Subscriptions []*GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription `json:"subscriptions,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Locations") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3328,50 +3118,75 @@ type GoogleCloudLocationListLocationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "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 *GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudLocationListLocationsResponse +func (s *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudLocationLocation: A resource that represents Google Cloud -// Platform location. -type GoogleCloudLocationLocation struct { - // DisplayName: The friendly name for this location, typically a nearby - // city name. For example, "Tokyo". - DisplayName string `json:"displayName,omitempty"` - - // Labels: Cross-service attributes for the location. For example - // {"cloud.googleapis.com/region": "us-east1"} - Labels map[string]string `json:"labels,omitempty"` +// GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription: A +// BeyondCorp Subscription resource represents BeyondCorp Enterprise +// Subscription. BeyondCorp Enterprise Subscription enables BeyondCorp +// Enterprise permium features for an organization. +type GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription struct { + // AutoRenewEnabled: Output only. Represents that, if subscription will + // renew or end when the term ends. + AutoRenewEnabled bool `json:"autoRenewEnabled,omitempty"` - // LocationId: The canonical id for this location. For example: - // "us-east1". - LocationId string `json:"locationId,omitempty"` + // CreateTime: Output only. Create time of the subscription. + CreateTime string `json:"createTime,omitempty"` - // Metadata: Service-specific metadata. For example the available - // capacity at the given location. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // EndTime: Output only. End time of the subscription. + EndTime string `json:"endTime,omitempty"` - // Name: Resource name for the location, which may vary between - // implementations. For example: - // "projects/example-project/locations/us-east1" + // Name: Required. Unique resource name of the Subscription. The name is + // ignored when creating a subscription. Name string `json:"name,omitempty"` + // SeatCount: Output only. Number of seats in the subscription. + SeatCount int64 `json:"seatCount,omitempty,string"` + + // Sku: Required. SKU of subscription. + // + // Possible values: + // "SKU_UNSPECIFIED" - Default value. This value is unused. + // "BCE_STANDARD_SKU" - Represents BeyondCorp Standard SKU. + Sku string `json:"sku,omitempty"` + + // StartTime: Output only. Start time of the subscription. + StartTime string `json:"startTime,omitempty"` + + // State: Output only. The current state of the subscription. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "ACTIVE" - Represents an active subscription. + // "INACTIVE" - Represents an upcomming subscription. + State string `json:"state,omitempty"` + + // Type: Required. Type of subscription. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Default value. This value is unused. + // "TRIAL" - Represents a trial subscription. + // "PAID" - Represents a paid subscription. + // "ALLOWLIST" - Reresents an allowlisted subscription. + Type string `json:"type,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "AutoRenewEnabled") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3379,12 +3194,101 @@ type GoogleCloudLocationLocation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AutoRenewEnabled") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationListLocationsResponse: The response message for +// Locations.ListLocations. +type GoogleCloudLocationListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in + // the request. + Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"` + + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Locations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationListLocationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationLocation: A resource that represents Google Cloud +// Platform location. +type GoogleCloudLocationLocation struct { + // DisplayName: The friendly name for this location, typically a nearby + // city name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + + // LocationId: The canonical id for this location. For example: + // "us-east1". + LocationId string `json:"locationId,omitempty"` + + // Metadata: Service-specific metadata. For example the available + // capacity at the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } @@ -5435,95 +5339,94 @@ func (c *OrganizationsLocationsInsightsListCall) Pages(ctx context.Context, f fu } } -// method id "beyondcorp.projects.locations.get": +// method id "beyondcorp.organizations.locations.subscriptions.create": -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsSubscriptionsCreateCall struct { + s *Service + parent string + googlecloudbeyondcorpsaasplatformsubscriptionsv1alphasubscription *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a location. +// Create: Creates a new BeyondCorp Enterprise Subscription in a given +// organization. Location will always be global as BeyondCorp +// subscriptions are per organization. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the subscription location using the +// form: `organizations/{organization_id}/locations/{location}`. +func (r *OrganizationsLocationsSubscriptionsService) Create(parent string, googlecloudbeyondcorpsaasplatformsubscriptionsv1alphasubscription *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription) *OrganizationsLocationsSubscriptionsCreateCall { + c := &OrganizationsLocationsSubscriptionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorpsaasplatformsubscriptionsv1alphasubscription = googlecloudbeyondcorpsaasplatformsubscriptionsv1alphasubscription return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsSubscriptionsCreateCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSubscriptionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *OrganizationsLocationsSubscriptionsCreateCall) Context(ctx context.Context) *OrganizationsLocationsSubscriptionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsSubscriptionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsSubscriptionsCreateCall) 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.googlecloudbeyondcorpsaasplatformsubscriptionsv1alphasubscription) + 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, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/subscriptions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.get" call. -// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { +// Do executes the "beyondcorp.organizations.locations.subscriptions.create" call. +// Exactly one of +// *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription.Ser +// verResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsSubscriptionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5542,7 +5445,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudLocationLocation{ + ret := &GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5554,25 +5457,28 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou } return ret, nil // { - // "description": "Gets information about a location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.get", + // "description": "Creates a new BeyondCorp Enterprise Subscription in a given organization. Location will always be global as BeyondCorp subscriptions are per organization.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/subscriptions", + // "httpMethod": "POST", + // "id": "beyondcorp.organizations.locations.subscriptions.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Resource name for the location.", + // "parent": { + // "description": "Required. The resource name of the subscription location using the form: `organizations/{organization_id}/locations/{location}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/subscriptions", + // "request": { + // "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" + // }, // "response": { - // "$ref": "GoogleCloudLocationLocation" + // "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5581,9 +5487,9 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou } -// method id "beyondcorp.projects.locations.list": +// method id "beyondcorp.organizations.locations.subscriptions.get": -type ProjectsLocationsListCall struct { +type OrganizationsLocationsSubscriptionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -5592,45 +5498,21 @@ type ProjectsLocationsListCall struct { header_ http.Header } -// List: Lists information about the supported locations for this -// service. +// Get: Gets details of a single Subscription. // -// - name: The resource that owns the locations collection, if -// applicable. -func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { - c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of Subscription using the form: +// `organizations/{organization_id}/locations/{location}/subscriptions/ +// {subscription_id}`. +func (r *OrganizationsLocationsSubscriptionsService) Get(name string) *OrganizationsLocationsSubscriptionsGetCall { + c := &OrganizationsLocationsSubscriptionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": A filter to narrow down -// results to a preferred subset. The filtering language accepts strings -// like "displayName=tokyo", and is documented in more detail in -// AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return. If not set, the service selects a default. -func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// received from the `next_page_token` field in the response. Send that -// page token to receive the subsequent page. -func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsSubscriptionsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSubscriptionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5640,7 +5522,7 @@ func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocati // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsSubscriptionsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSubscriptionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -5648,21 +5530,21 @@ func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *OrganizationsLocationsSubscriptionsGetCall) Context(ctx context.Context) *OrganizationsLocationsSubscriptionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *OrganizationsLocationsSubscriptionsGetCall) 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 *OrganizationsLocationsSubscriptionsGetCall) 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_ { @@ -5675,7 +5557,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, "v1alpha/{+name}/locations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5688,16 +5570,17 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.list" call. -// Exactly one of *GoogleCloudLocationListLocationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "beyondcorp.organizations.locations.subscriptions.get" call. +// Exactly one of +// *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription.Ser +// verResponse.Header or (if a response was returned 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) (*GoogleCloudLocationListLocationsResponse, error) { +func (c *OrganizationsLocationsSubscriptionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5716,7 +5599,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudLocationListLocationsResponse{ + ret := &GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5728,41 +5611,25 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo } return ret, nil // { - // "description": "Lists information about the supported locations for this service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations", + // "description": "Gets details of a single Subscription.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/subscriptions/{subscriptionsId}", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.list", + // "id": "beyondcorp.organizations.locations.subscriptions.get", // "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.", + // "description": "Required. The resource name of Subscription using the form: `organizations/{organization_id}/locations/{location}/subscriptions/{subscription_id}`", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/subscriptions/[^/]+$", // "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": "v1alpha/{+name}/locations", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudLocationListLocationsResponse" + // "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaSubscription" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5771,127 +5638,97 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo } -// 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(*GoogleCloudLocationListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "beyondcorp.projects.locations.appConnections.create": +// method id "beyondcorp.organizations.locations.subscriptions.list": -type ProjectsLocationsAppConnectionsCreateCall struct { - s *Service - parent string - googlecloudbeyondcorpappconnectionsv1alphaappconnection *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsSubscriptionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new AppConnection in a given project and location. +// List: Lists Subscriptions in a given organization and location. // -// - parent: The resource project name of the AppConnection location -// using the form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsAppConnectionsService) Create(parent string, googlecloudbeyondcorpappconnectionsv1alphaappconnection *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection) *ProjectsLocationsAppConnectionsCreateCall { - c := &ProjectsLocationsAppConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of Subscription using the form: +// `organizations/{organization_id}/locations/{location}`. +func (r *OrganizationsLocationsSubscriptionsService) List(parent string) *OrganizationsLocationsSubscriptionsListCall { + c := &OrganizationsLocationsSubscriptionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudbeyondcorpappconnectionsv1alphaappconnection = googlecloudbeyondcorpappconnectionsv1alphaappconnection - return c -} - -// AppConnectionId sets the optional parameter "appConnectionId": -// User-settable AppConnection resource ID. * Must start with a letter. -// * Must contain between 4-63 characters from `/a-z-/`. * Must end with -// a number or a letter. -func (c *ProjectsLocationsAppConnectionsCreateCall) AppConnectionId(appConnectionId string) *ProjectsLocationsAppConnectionsCreateCall { - c.urlParams_.Set("appConnectionId", appConnectionId) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsAppConnectionsCreateCall) RequestId(requestId string) *ProjectsLocationsAppConnectionsCreateCall { - c.urlParams_.Set("requestId", requestId) +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 50 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's next_page_token to determine if there are more instances +// left to be queried. +func (c *OrganizationsLocationsSubscriptionsListCall) PageSize(pageSize int64) *OrganizationsLocationsSubscriptionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsAppConnectionsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectionsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous +// ListSubscriptionsRequest, if any. +func (c *OrganizationsLocationsSubscriptionsListCall) PageToken(pageToken string) *OrganizationsLocationsSubscriptionsListCall { + 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 *ProjectsLocationsAppConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsCreateCall { +func (c *OrganizationsLocationsSubscriptionsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsSubscriptionsListCall { 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 *OrganizationsLocationsSubscriptionsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsSubscriptionsListCall { + 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 *ProjectsLocationsAppConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsCreateCall { +func (c *OrganizationsLocationsSubscriptionsListCall) Context(ctx context.Context) *OrganizationsLocationsSubscriptionsListCall { 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 *ProjectsLocationsAppConnectionsCreateCall) Header() http.Header { +func (c *OrganizationsLocationsSubscriptionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsSubscriptionsListCall) 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.googlecloudbeyondcorpappconnectionsv1alphaappconnection) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appConnections") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/subscriptions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -5902,14 +5739,17 @@ func (c *ProjectsLocationsAppConnectionsCreateCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnections.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "beyondcorp.organizations.locations.subscriptions.list" call. +// Exactly one of +// *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscription +// sResponse or error will be non-nil. Any non-2xx status code is an +// error. Response headers are in either +// *GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscription +// sResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsLocationsSubscriptionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5928,7 +5768,7 @@ func (c *ProjectsLocationsAppConnectionsCreateCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5940,43 +5780,36 @@ func (c *ProjectsLocationsAppConnectionsCreateCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Creates a new AppConnection in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appConnections.create", + // "description": "Lists Subscriptions in a given organization and location.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/subscriptions", + // "httpMethod": "GET", + // "id": "beyondcorp.organizations.locations.subscriptions.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "appConnectionId": { - // "description": "Optional. User-settable AppConnection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", + // "pageSize": { + // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. The next_page_token value returned from a previous ListSubscriptionsRequest, if any.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource project name of the AppConnection location using the form: `projects/{project_id}/locations/{location_id}`", + // "description": "Required. The resource name of Subscription using the form: `organizations/{organization_id}/locations/{location}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/appConnections", - // "request": { - // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection" - // }, + // "path": "v1alpha/{+parent}/subscriptions", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5985,91 +5818,98 @@ func (c *ProjectsLocationsAppConnectionsCreateCall) Do(opts ...googleapi.CallOpt } -// method id "beyondcorp.projects.locations.appConnections.delete": - -type ProjectsLocationsAppConnectionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsLocationsSubscriptionsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformSubscriptionsV1alphaListSubscriptionsResponse) 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) + } } -// Delete: Deletes a single AppConnection. -// -// - name: BeyondCorp Connector name using the form: -// `projects/{project_id}/locations/{location_id}/appConnections/{app_c -// onnection_id}`. -func (r *ProjectsLocationsAppConnectionsService) Delete(name string) *ProjectsLocationsAppConnectionsDeleteCall { - c := &ProjectsLocationsAppConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} +// method id "beyondcorp.projects.locations.get": -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes after the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsAppConnectionsDeleteCall) RequestId(requestId string) *ProjectsLocationsAppConnectionsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsAppConnectionsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectionsDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsDeleteCall { +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsAppConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsDeleteCall { +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsAppConnectionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -6080,14 +5920,14 @@ func (c *ProjectsLocationsAppConnectionsDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnections.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Do executes the "beyondcorp.projects.locations.get" call. +// Exactly one of *GoogleCloudLocationLocation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6106,7 +5946,7 @@ func (c *ProjectsLocationsAppConnectionsDeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudLocationLocation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6118,35 +5958,25 @@ func (c *ProjectsLocationsAppConnectionsDeleteCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Deletes a single AppConnection.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}", - // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.appConnections.delete", + // "description": "Gets information about a location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`", + // "description": "Resource name for the location.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudLocationLocation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6155,9 +5985,9 @@ func (c *ProjectsLocationsAppConnectionsDeleteCall) Do(opts ...googleapi.CallOpt } -// method id "beyondcorp.projects.locations.appConnections.get": +// method id "beyondcorp.projects.locations.list": -type ProjectsLocationsAppConnectionsGetCall struct { +type ProjectsLocationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -6166,21 +5996,45 @@ type ProjectsLocationsAppConnectionsGetCall struct { header_ http.Header } -// Get: Gets details of a single AppConnection. +// List: Lists information about the supported locations for this +// service. // -// - name: BeyondCorp AppConnection name using the form: -// `projects/{project_id}/locations/{location_id}/appConnections/{app_c -// onnection_id}`. -func (r *ProjectsLocationsAppConnectionsService) Get(name string) *ProjectsLocationsAppConnectionsGetCall { - c := &ProjectsLocationsAppConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource that owns the locations collection, if +// applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": A filter to narrow down +// results to a preferred subset. The filtering language accepts strings +// like "displayName=tokyo", and is documented in more detail in +// AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// received from the `next_page_token` field in the response. Send that +// page token to receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsGetCall { +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6190,7 +6044,7 @@ func (c *ProjectsLocationsAppConnectionsGetCall) Fields(s ...googleapi.Field) *P // 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 *ProjectsLocationsAppConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectionsGetCall { +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -6198,21 +6052,21 @@ func (c *ProjectsLocationsAppConnectionsGetCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsAppConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsGetCall { +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsAppConnectionsGetCall) Header() http.Header { +func (c *ProjectsLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectionsGetCall) doRequest(alt string) (*http.Response, error) { +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_ { @@ -6225,7 +6079,7 @@ func (c *ProjectsLocationsAppConnectionsGetCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/locations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6238,17 +6092,16 @@ func (c *ProjectsLocationsAppConnectionsGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnections.get" call. -// Exactly one of -// *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection or error +// Do executes the "beyondcorp.projects.locations.list" call. +// Exactly one of *GoogleCloudLocationListLocationsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection.ServerRespons -// e.Header or (if a response was returned at all) in +// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsAppConnectionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection, error) { +func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6267,7 +6120,7 @@ func (c *ProjectsLocationsAppConnectionsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection{ + ret := &GoogleCloudLocationListLocationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6279,25 +6132,41 @@ func (c *ProjectsLocationsAppConnectionsGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets details of a single AppConnection.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}", + // "description": "Lists information about the supported locations for this service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appConnections.get", + // "id": "beyondcorp.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": "Required. BeyondCorp AppConnection name using the form: `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`", + // "description": "The resource that owns the locations collection, if applicable.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + // "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": "v1alpha/{+name}", + // "path": "v1alpha/{+name}/locations", // "response": { - // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection" + // "$ref": "GoogleCloudLocationListLocationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6306,118 +6175,145 @@ func (c *ProjectsLocationsAppConnectionsGetCall) Do(opts ...googleapi.CallOption } -// method id "beyondcorp.projects.locations.appConnections.getIamPolicy": +// 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(*GoogleCloudLocationListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsAppConnectionsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "beyondcorp.projects.locations.appConnections.create": + +type ProjectsLocationsAppConnectionsCreateCall struct { + s *Service + parent string + googlecloudbeyondcorpappconnectionsv1alphaappconnection *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection + 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. +// Create: Creates a new AppConnection in a given project and location. // -// - 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 *ProjectsLocationsAppConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsAppConnectionsGetIamPolicyCall { - c := &ProjectsLocationsAppConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource project name of the AppConnection location +// using the form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsAppConnectionsService) Create(parent string, googlecloudbeyondcorpappconnectionsv1alphaappconnection *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection) *ProjectsLocationsAppConnectionsCreateCall { + c := &ProjectsLocationsAppConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorpappconnectionsv1alphaappconnection = googlecloudbeyondcorpappconnectionsv1alphaappconnection 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 *ProjectsLocationsAppConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAppConnectionsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// AppConnectionId sets the optional parameter "appConnectionId": +// User-settable AppConnection resource ID. * Must start with a letter. +// * Must contain between 4-63 characters from `/a-z-/`. * Must end with +// a number or a letter. +func (c *ProjectsLocationsAppConnectionsCreateCall) AppConnectionId(appConnectionId string) *ProjectsLocationsAppConnectionsCreateCall { + c.urlParams_.Set("appConnectionId", appConnectionId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsAppConnectionsCreateCall) RequestId(requestId string) *ProjectsLocationsAppConnectionsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsAppConnectionsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectionsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsAppConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsCreateCall { 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 *ProjectsLocationsAppConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectionsGetIamPolicyCall { - 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 *ProjectsLocationsAppConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsAppConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsCreateCall { 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 *ProjectsLocationsAppConnectionsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectionsCreateCall) 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.googlecloudbeyondcorpappconnectionsv1alphaappconnection) + 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, "v1alpha/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appConnections") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnections.getIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appConnections.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsAppConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6436,7 +6332,7 @@ func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6448,31 +6344,43 @@ func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Do(opts ...googleapi.C } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appConnections.getIamPolicy", + // "description": "Creates a new AppConnection in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appConnections.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "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", + // "appConnectionId": { + // "description": "Optional. User-settable AppConnection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", // "location": "query", - // "type": "integer" + // "type": "string" // }, - // "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.", + // "parent": { + // "description": "Required. The resource project name of the AppConnection location using the form: `projects/{project_id}/locations/{location_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+resource}:getIamPolicy", + // "path": "v1alpha/{+parent}/appConnections", + // "request": { + // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection" + // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6481,134 +6389,109 @@ func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Do(opts ...googleapi.C } -// method id "beyondcorp.projects.locations.appConnections.list": +// method id "beyondcorp.projects.locations.appConnections.delete": -type ProjectsLocationsAppConnectionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists AppConnections in a given project and location. +// Delete: Deletes a single AppConnection. // -// - parent: The resource name of the AppConnection location using the -// form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsAppConnectionsService) List(parent string) *ProjectsLocationsAppConnectionsListCall { - c := &ProjectsLocationsAppConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter specifying -// constraints of a list operation. -func (c *ProjectsLocationsAppConnectionsListCall) Filter(filter string) *ProjectsLocationsAppConnectionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results. See Sorting order -// (https://cloud.google.com/apis/design/design_patterns#sorting_order) -// for more information. -func (c *ProjectsLocationsAppConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsAppConnectionsListCall { - c.urlParams_.Set("orderBy", orderBy) +// - name: BeyondCorp Connector name using the form: +// `projects/{project_id}/locations/{location_id}/appConnections/{app_c +// onnection_id}`. +func (r *ProjectsLocationsAppConnectionsService) Delete(name string) *ProjectsLocationsAppConnectionsDeleteCall { + c := &ProjectsLocationsAppConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If not specified, a default value of 50 will be -// used by the service. Regardless of the page_size value, the response -// may include a partial list and a caller should only rely on -// response's next_page_token to determine if there are more instances -// left to be queried. -func (c *ProjectsLocationsAppConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsAppConnectionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsAppConnectionsDeleteCall) RequestId(requestId string) *ProjectsLocationsAppConnectionsDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous -// ListAppConnectionsRequest, if any. -func (c *ProjectsLocationsAppConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsAppConnectionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsAppConnectionsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectionsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsListCall { +func (c *ProjectsLocationsAppConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsDeleteCall { 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 *ProjectsLocationsAppConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectionsListCall { - 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 *ProjectsLocationsAppConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsListCall { +func (c *ProjectsLocationsAppConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsDeleteCall { 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 *ProjectsLocationsAppConnectionsListCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appConnections") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnections.list" call. -// Exactly one of -// *GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse. -// ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsAppConnectionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse, error) { +// Do executes the "beyondcorp.projects.locations.appConnections.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAppConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6627,7 +6510,7 @@ func (c *ProjectsLocationsAppConnectionsListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6639,46 +6522,35 @@ func (c *ProjectsLocationsAppConnectionsListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Lists AppConnections in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appConnections.list", + // "description": "Deletes a single AppConnection.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}", + // "httpMethod": "DELETE", + // "id": "beyondcorp.projects.locations.appConnections.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. A filter specifying constraints of a list operation.", - // "location": "query", + // "name": { + // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + // "required": true, // "type": "string" // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he 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" // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous ListAppConnectionsRequest, if any.", + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the AppConnection location using the form: `projects/{project_id}/locations/{location_id}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" + // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/appConnections", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6687,135 +6559,79 @@ func (c *ProjectsLocationsAppConnectionsListCall) Do(opts ...googleapi.CallOptio } -// 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 *ProjectsLocationsAppConnectionsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse) 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 "beyondcorp.projects.locations.appConnections.patch": +// method id "beyondcorp.projects.locations.appConnections.get": -type ProjectsLocationsAppConnectionsPatchCall struct { - s *Service - name string - googlecloudbeyondcorpappconnectionsv1alphaappconnection *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single AppConnection. +// Get: Gets details of a single AppConnection. // -// - name: Unique resource name of the AppConnection. The name is -// ignored when creating a AppConnection. -func (r *ProjectsLocationsAppConnectionsService) Patch(name string, googlecloudbeyondcorpappconnectionsv1alphaappconnection *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection) *ProjectsLocationsAppConnectionsPatchCall { - c := &ProjectsLocationsAppConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: BeyondCorp AppConnection name using the form: +// `projects/{project_id}/locations/{location_id}/appConnections/{app_c +// onnection_id}`. +func (r *ProjectsLocationsAppConnectionsService) Get(name string) *ProjectsLocationsAppConnectionsGetCall { + c := &ProjectsLocationsAppConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudbeyondcorpappconnectionsv1alphaappconnection = googlecloudbeyondcorpappconnectionsv1alphaappconnection return c } -// AllowMissing sets the optional parameter "allowMissing": If set as -// true, will create the resource if it is not found. -func (c *ProjectsLocationsAppConnectionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsAppConnectionsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsAppConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsAppConnectionsPatchCall) RequestId(requestId string) *ProjectsLocationsAppConnectionsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. At least one path must be supplied in this -// field. The elements of the repeated paths field may only include -// these fields from [BeyondCorp.AppConnection]: * `labels` * -// `display_name` * `application_endpoint` * `connectors` -func (c *ProjectsLocationsAppConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAppConnectionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsAppConnectionsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectionsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsAppConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// 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 *ProjectsLocationsAppConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectionsGetCall { + 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 *ProjectsLocationsAppConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsPatchCall { +func (c *ProjectsLocationsAppConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsGetCall { 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 *ProjectsLocationsAppConnectionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectionsGetCall) 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.googlecloudbeyondcorpappconnectionsv1alphaappconnection) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -6826,14 +6642,17 @@ func (c *ProjectsLocationsAppConnectionsPatchCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnections.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "beyondcorp.projects.locations.appConnections.get" call. +// Exactly one of +// *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAppConnectionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6852,7 +6671,7 @@ func (c *ProjectsLocationsAppConnectionsPatchCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6864,49 +6683,25 @@ func (c *ProjectsLocationsAppConnectionsPatchCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Updates the parameters of a single AppConnection.", + // "description": "Gets details of a single AppConnection.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}", - // "httpMethod": "PATCH", - // "id": "beyondcorp.projects.locations.appConnections.patch", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appConnections.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "allowMissing": { - // "description": "Optional. If set as true, will create the resource if it is not found.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Required. Unique resource name of the AppConnection. The name is ignored when creating a AppConnection.", + // "description": "Required. BeyondCorp AppConnection name using the form: `projects/{project_id}/locations/{location_id}/appConnections/{app_connection_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.AppConnection]: * `labels` * `display_name` * `application_endpoint` * `connectors`", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection" - // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -6915,62 +6710,53 @@ func (c *ProjectsLocationsAppConnectionsPatchCall) Do(opts ...googleapi.CallOpti } -// method id "beyondcorp.projects.locations.appConnections.resolve": +// method id "beyondcorp.projects.locations.appConnections.getIamPolicy": -type ProjectsLocationsAppConnectionsResolveCall struct { +type ProjectsLocationsAppConnectionsGetIamPolicyCall struct { s *Service - parent string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Resolve: Resolves AppConnections details for a given AppConnector. An -// internal method called by a connector to find AppConnections to -// connect to. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - parent: The resource name of the AppConnection location using the -// form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsAppConnectionsService) Resolve(parent string) *ProjectsLocationsAppConnectionsResolveCall { - c := &ProjectsLocationsAppConnectionsResolveCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// AppConnectorId sets the optional parameter "appConnectorId": -// Required. BeyondCorp Connector name of the connector associated with -// those AppConnections using the form: -// `projects/{project_id}/locations/{location_id}/appConnectors/{app_conn -// ector_id}` -func (c *ProjectsLocationsAppConnectionsResolveCall) AppConnectorId(appConnectorId string) *ProjectsLocationsAppConnectionsResolveCall { - c.urlParams_.Set("appConnectorId", appConnectorId) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If not specified, a default value of 50 will be -// used by the service. Regardless of the page_size value, the response -// may include a partial list and a caller should only rely on -// response's next_page_token to determine if there are more instances -// left to be queried. -func (c *ProjectsLocationsAppConnectionsResolveCall) PageSize(pageSize int64) *ProjectsLocationsAppConnectionsResolveCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - 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 *ProjectsLocationsAppConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsAppConnectionsGetIamPolicyCall { + c := &ProjectsLocationsAppConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous -// ResolveAppConnectionsResponse, if any. -func (c *ProjectsLocationsAppConnectionsResolveCall) PageToken(pageToken string) *ProjectsLocationsAppConnectionsResolveCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *ProjectsLocationsAppConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAppConnectionsGetIamPolicyCall { + 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 *ProjectsLocationsAppConnectionsResolveCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsResolveCall { +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6980,7 +6766,7 @@ func (c *ProjectsLocationsAppConnectionsResolveCall) Fields(s ...googleapi.Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsAppConnectionsResolveCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectionsResolveCall { +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectionsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -6988,21 +6774,21 @@ func (c *ProjectsLocationsAppConnectionsResolveCall) IfNoneMatch(entityTag strin // 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 *ProjectsLocationsAppConnectionsResolveCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsResolveCall { +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsGetIamPolicyCall { 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 *ProjectsLocationsAppConnectionsResolveCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectionsResolveCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) 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_ { @@ -7015,7 +6801,7 @@ func (c *ProjectsLocationsAppConnectionsResolveCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appConnections:resolve") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -7023,22 +6809,19 @@ func (c *ProjectsLocationsAppConnectionsResolveCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnections.resolve" call. -// Exactly one of -// *GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsRespon -// se or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsRespon -// se.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsAppConnectionsResolveCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponse, error) { +// Do executes the "beyondcorp.projects.locations.appConnections.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAppConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7057,7 +6840,7 @@ func (c *ProjectsLocationsAppConnectionsResolveCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7069,41 +6852,31 @@ func (c *ProjectsLocationsAppConnectionsResolveCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Resolves AppConnections details for a given AppConnector. An internal method called by a connector to find AppConnections to connect to.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections:resolve", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:getIamPolicy", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appConnections.resolve", + // "id": "beyondcorp.projects.locations.appConnections.getIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "appConnectorId": { - // "description": "Required. BeyondCorp Connector name of the connector associated with those AppConnections using the form: `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + // "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" // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous ResolveAppConnectionsResponse, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the AppConnection location using the form: `projects/{project_id}/locations/{location_id}`", + // "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/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/appConnections:resolve", + // "path": "v1alpha/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponse" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -7112,885 +6885,66 @@ func (c *ProjectsLocationsAppConnectionsResolveCall) Do(opts ...googleapi.CallOp } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsAppConnectionsResolveCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponse) 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 "beyondcorp.projects.locations.appConnections.setIamPolicy": - -type ProjectsLocationsAppConnectionsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. -// -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsAppConnectionsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAppConnectionsSetIamPolicyCall { - c := &ProjectsLocationsAppConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsSetIamPolicyCall { - 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 *ProjectsLocationsAppConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsSetIamPolicyCall { - 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 *ProjectsLocationsAppConnectionsSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) - 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, "v1alpha/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.appConnections.setIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &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 := &GoogleIamV1Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appConnections.setIamPolicy", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, - // "response": { - // "$ref": "GoogleIamV1Policy" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.appConnections.testIamPermissions": - -type ProjectsLocationsAppConnectionsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. -// -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsAppConnectionsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAppConnectionsTestIamPermissionsCall { - c := &ProjectsLocationsAppConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsTestIamPermissionsCall { - 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 *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsTestIamPermissionsCall { - 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 *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) - 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, "v1alpha/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.appConnections.testIamPermissions" call. -// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &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 := &GoogleIamV1TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appConnections.testIamPermissions", - // "parameterOrder": [ - // "resource" - // ], - // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, - // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.appConnectors.create": - -type ProjectsLocationsAppConnectorsCreateCall struct { - s *Service - parent string - googlecloudbeyondcorpappconnectorsv1alphaappconnector *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new AppConnector in a given project and location. -// -// - parent: The resource project name of the AppConnector location -// using the form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsAppConnectorsService) Create(parent string, googlecloudbeyondcorpappconnectorsv1alphaappconnector *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector) *ProjectsLocationsAppConnectorsCreateCall { - c := &ProjectsLocationsAppConnectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudbeyondcorpappconnectorsv1alphaappconnector = googlecloudbeyondcorpappconnectorsv1alphaappconnector - return c -} - -// AppConnectorId sets the optional parameter "appConnectorId": -// User-settable AppConnector resource ID. * Must start with a letter. * -// Must contain between 4-63 characters from `/a-z-/`. * Must end with a -// number or a letter. -func (c *ProjectsLocationsAppConnectorsCreateCall) AppConnectorId(appConnectorId string) *ProjectsLocationsAppConnectorsCreateCall { - c.urlParams_.Set("appConnectorId", appConnectorId) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsAppConnectorsCreateCall) RequestId(requestId string) *ProjectsLocationsAppConnectorsCreateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsAppConnectorsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectorsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsAppConnectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsCreateCall { - 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 *ProjectsLocationsAppConnectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsCreateCall { - 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 *ProjectsLocationsAppConnectorsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAppConnectorsCreateCall) 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.googlecloudbeyondcorpappconnectorsv1alphaappconnector) - 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, "v1alpha/{+parent}/appConnectors") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.appConnectors.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectorsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &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 := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Creates a new AppConnector in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appConnectors.create", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "appConnectorId": { - // "description": "Optional. User-settable AppConnector resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource project name of the AppConnector location using the form: `projects/{project_id}/locations/{location_id}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v1alpha/{+parent}/appConnectors", - // "request": { - // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector" - // }, - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.appConnectors.delete": - -type ProjectsLocationsAppConnectorsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a single AppConnector. -// -// - name: BeyondCorp AppConnector name using the form: -// `projects/{project_id}/locations/{location_id}/appConnectors/{app_co -// nnector_id}`. -func (r *ProjectsLocationsAppConnectorsService) Delete(name string) *ProjectsLocationsAppConnectorsDeleteCall { - c := &ProjectsLocationsAppConnectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes after the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsAppConnectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsAppConnectorsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsAppConnectorsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectorsDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsAppConnectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsDeleteCall { - 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 *ProjectsLocationsAppConnectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsDeleteCall { - 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 *ProjectsLocationsAppConnectorsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAppConnectorsDeleteCall) 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, "v1alpha/{+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 "beyondcorp.projects.locations.appConnectors.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectorsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, &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 := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Deletes a single AppConnector.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}", - // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.appConnectors.delete", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. BeyondCorp AppConnector name using the form: `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" - // } - // }, - // "path": "v1alpha/{+name}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.appConnectors.get": - -type ProjectsLocationsAppConnectorsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets details of a single AppConnector. -// -// - name: BeyondCorp AppConnector name using the form: -// `projects/{project_id}/locations/{location_id}/appConnectors/{app_co -// nnector_id}`. -func (r *ProjectsLocationsAppConnectorsService) Get(name string) *ProjectsLocationsAppConnectorsGetCall { - c := &ProjectsLocationsAppConnectorsGetCall{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 *ProjectsLocationsAppConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsGetCall { - 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 *ProjectsLocationsAppConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectorsGetCall { - 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 *ProjectsLocationsAppConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsGetCall { - 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 *ProjectsLocationsAppConnectorsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsAppConnectorsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.appConnectors.get" call. -// Exactly one of *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsAppConnectorsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector, 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 := &GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets details of a single AppConnector.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appConnectors.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. BeyondCorp AppConnector name using the form: `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+name}", - // "response": { - // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "beyondcorp.projects.locations.appConnectors.getIamPolicy": +// method id "beyondcorp.projects.locations.appConnections.list": -type ProjectsLocationsAppConnectorsGetIamPolicyCall struct { +type ProjectsLocationsAppConnectionsListCall struct { s *Service - resource string + parent 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. +// List: Lists AppConnections in a given project and location. // -// - 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 *ProjectsLocationsAppConnectorsService) GetIamPolicy(resource string) *ProjectsLocationsAppConnectorsGetIamPolicyCall { - c := &ProjectsLocationsAppConnectorsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the AppConnection location using the +// form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsAppConnectionsService) List(parent string) *ProjectsLocationsAppConnectionsListCall { + c := &ProjectsLocationsAppConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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 *ProjectsLocationsAppConnectorsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAppConnectorsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Filter sets the optional parameter "filter": A filter specifying +// constraints of a list operation. +func (c *ProjectsLocationsAppConnectionsListCall) Filter(filter string) *ProjectsLocationsAppConnectionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specifies the ordering +// of results. See Sorting order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order) +// for more information. +func (c *ProjectsLocationsAppConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsAppConnectionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 50 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's next_page_token to determine if there are more instances +// left to be queried. +func (c *ProjectsLocationsAppConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsAppConnectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous +// ListAppConnectionsRequest, if any. +func (c *ProjectsLocationsAppConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsAppConnectionsListCall { + 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 *ProjectsLocationsAppConnectorsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsGetIamPolicyCall { +func (c *ProjectsLocationsAppConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8000,7 +6954,7 @@ func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectorsGetIamPolicyCall { +func (c *ProjectsLocationsAppConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -8008,21 +6962,21 @@ func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) IfNoneMatch(entityTag s // 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 *ProjectsLocationsAppConnectorsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsGetIamPolicyCall { +func (c *ProjectsLocationsAppConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsListCall { 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 *ProjectsLocationsAppConnectorsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectionsListCall) 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_ { @@ -8035,7 +6989,7 @@ func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appConnections") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -8043,19 +6997,22 @@ func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnectors.getIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// Do executes the "beyondcorp.projects.locations.appConnections.list" call. +// Exactly one of +// *GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse. +// ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAppConnectionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8074,7 +7031,7 @@ func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8086,31 +7043,46 @@ func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Do(opts ...googleapi.Ca } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:getIamPolicy", + // "description": "Lists AppConnections in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appConnectors.getIamPolicy", + // "id": "beyondcorp.projects.locations.appConnections.list", // "parameterOrder": [ - // "resource" + // "parent" // ], // "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).", + // "filter": { + // "description": "Optional. A filter specifying constraints of a list operation.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", // "format": "int32", // "location": "query", // "type": "integer" // }, - // "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.", + // "pageToken": { + // "description": "Optional. The next_page_token value returned from a previous ListAppConnectionsRequest, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the AppConnection location using the form: `projects/{project_id}/locations/{location_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:getIamPolicy", + // "path": "v1alpha/{+parent}/appConnections", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8119,134 +7091,153 @@ func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Do(opts ...googleapi.Ca } -// method id "beyondcorp.projects.locations.appConnectors.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsAppConnectionsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpAppconnectionsV1alphaListAppConnectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsAppConnectorsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "beyondcorp.projects.locations.appConnections.patch": + +type ProjectsLocationsAppConnectionsPatchCall struct { + s *Service + name string + googlecloudbeyondcorpappconnectionsv1alphaappconnection *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists AppConnectors in a given project and location. +// Patch: Updates the parameters of a single AppConnection. // -// - parent: The resource name of the AppConnector location using the -// form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsAppConnectorsService) List(parent string) *ProjectsLocationsAppConnectorsListCall { - c := &ProjectsLocationsAppConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Unique resource name of the AppConnection. The name is +// ignored when creating a AppConnection. +func (r *ProjectsLocationsAppConnectionsService) Patch(name string, googlecloudbeyondcorpappconnectionsv1alphaappconnection *GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection) *ProjectsLocationsAppConnectionsPatchCall { + c := &ProjectsLocationsAppConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudbeyondcorpappconnectionsv1alphaappconnection = googlecloudbeyondcorpappconnectionsv1alphaappconnection return c } -// Filter sets the optional parameter "filter": A filter specifying -// constraints of a list operation. -func (c *ProjectsLocationsAppConnectorsListCall) Filter(filter string) *ProjectsLocationsAppConnectorsListCall { - c.urlParams_.Set("filter", filter) +// AllowMissing sets the optional parameter "allowMissing": If set as +// true, will create the resource if it is not found. +func (c *ProjectsLocationsAppConnectionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsAppConnectionsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results. See Sorting order -// (https://cloud.google.com/apis/design/design_patterns#sorting_order) -// for more information. -func (c *ProjectsLocationsAppConnectorsListCall) OrderBy(orderBy string) *ProjectsLocationsAppConnectorsListCall { - c.urlParams_.Set("orderBy", orderBy) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsAppConnectionsPatchCall) RequestId(requestId string) *ProjectsLocationsAppConnectionsPatchCall { + c.urlParams_.Set("requestId", requestId) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If not specified, a default value of 50 will be -// used by the service. Regardless of the page_size value, the response -// may include a partial list and a caller should only rely on -// response's next_page_token to determine if there are more instances -// left to be queried. -func (c *ProjectsLocationsAppConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsAppConnectorsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. At least one path must be supplied in this +// field. The elements of the repeated paths field may only include +// these fields from [BeyondCorp.AppConnection]: * `labels` * +// `display_name` * `application_endpoint` * `connectors` +func (c *ProjectsLocationsAppConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAppConnectionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous -// ListAppConnectorsRequest, if any. -func (c *ProjectsLocationsAppConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsAppConnectorsListCall { - c.urlParams_.Set("pageToken", pageToken) +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsAppConnectionsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectionsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsListCall { +func (c *ProjectsLocationsAppConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsPatchCall { 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 *ProjectsLocationsAppConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectorsListCall { - 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 *ProjectsLocationsAppConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsListCall { +func (c *ProjectsLocationsAppConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsPatchCall { 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 *ProjectsLocationsAppConnectorsListCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectorsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectionsPatchCall) 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.googlecloudbeyondcorpappconnectionsv1alphaappconnection) + 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, "v1alpha/{+parent}/appConnectors") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnectors.list" call. -// Exactly one of -// *GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse.Se -// rverResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsAppConnectorsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse, error) { +// Do executes the "beyondcorp.projects.locations.appConnections.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAppConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8265,7 +7256,7 @@ func (c *ProjectsLocationsAppConnectorsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8277,46 +7268,49 @@ func (c *ProjectsLocationsAppConnectorsListCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Lists AppConnectors in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appConnectors.list", + // "description": "Updates the parameters of a single AppConnection.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}", + // "httpMethod": "PATCH", + // "id": "beyondcorp.projects.locations.appConnections.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. A filter specifying constraints of a list operation.", + // "allowMissing": { + // "description": "Optional. If set as true, will create the resource if it is not found.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", - // "location": "query", + // "name": { + // "description": "Required. Unique resource name of the AppConnection. The name is ignored when creating a AppConnection.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", + // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", - // "format": "int32", + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he 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": "integer" + // "type": "string" // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous ListAppConnectorsRequest, if any.", + // "updateMask": { + // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.AppConnection]: * `labels` * `display_name` * `application_endpoint` * `connectors`", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The resource name of the AppConnector location using the form: `projects/{project_id}/locations/{location_id}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/appConnectors", + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaAppConnection" + // }, // "response": { - // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8325,146 +7319,130 @@ func (c *ProjectsLocationsAppConnectorsListCall) Do(opts ...googleapi.CallOption } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsAppConnectorsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse) 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 "beyondcorp.projects.locations.appConnectors.patch": +// method id "beyondcorp.projects.locations.appConnections.resolve": -type ProjectsLocationsAppConnectorsPatchCall struct { - s *Service - name string - googlecloudbeyondcorpappconnectorsv1alphaappconnector *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectionsResolveCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single AppConnector. +// Resolve: Resolves AppConnections details for a given AppConnector. An +// internal method called by a connector to find AppConnections to +// connect to. // -// - name: Unique resource name of the AppConnector. The name is ignored -// when creating a AppConnector. -func (r *ProjectsLocationsAppConnectorsService) Patch(name string, googlecloudbeyondcorpappconnectorsv1alphaappconnector *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector) *ProjectsLocationsAppConnectorsPatchCall { - c := &ProjectsLocationsAppConnectorsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudbeyondcorpappconnectorsv1alphaappconnector = googlecloudbeyondcorpappconnectorsv1alphaappconnector +// - parent: The resource name of the AppConnection location using the +// form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsAppConnectionsService) Resolve(parent string) *ProjectsLocationsAppConnectionsResolveCall { + c := &ProjectsLocationsAppConnectionsResolveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsAppConnectorsPatchCall) RequestId(requestId string) *ProjectsLocationsAppConnectorsPatchCall { - c.urlParams_.Set("requestId", requestId) +// AppConnectorId sets the optional parameter "appConnectorId": +// Required. BeyondCorp Connector name of the connector associated with +// those AppConnections using the form: +// `projects/{project_id}/locations/{location_id}/appConnectors/{app_conn +// ector_id}` +func (c *ProjectsLocationsAppConnectionsResolveCall) AppConnectorId(appConnectorId string) *ProjectsLocationsAppConnectionsResolveCall { + c.urlParams_.Set("appConnectorId", appConnectorId) return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. At least one path must be supplied in this -// field. The elements of the repeated paths field may only include -// these fields from [BeyondCorp.AppConnector]: * `labels` * -// `display_name` -func (c *ProjectsLocationsAppConnectorsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAppConnectorsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 50 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's next_page_token to determine if there are more instances +// left to be queried. +func (c *ProjectsLocationsAppConnectionsResolveCall) PageSize(pageSize int64) *ProjectsLocationsAppConnectionsResolveCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsAppConnectorsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectorsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous +// ResolveAppConnectionsResponse, if any. +func (c *ProjectsLocationsAppConnectionsResolveCall) PageToken(pageToken string) *ProjectsLocationsAppConnectionsResolveCall { + 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 *ProjectsLocationsAppConnectorsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsPatchCall { +func (c *ProjectsLocationsAppConnectionsResolveCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsResolveCall { 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 *ProjectsLocationsAppConnectionsResolveCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectionsResolveCall { + 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 *ProjectsLocationsAppConnectorsPatchCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsPatchCall { +func (c *ProjectsLocationsAppConnectionsResolveCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsResolveCall { 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 *ProjectsLocationsAppConnectorsPatchCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectionsResolveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectorsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectionsResolveCall) 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.googlecloudbeyondcorpappconnectorsv1alphaappconnector) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appConnections:resolve") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnectors.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectorsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "beyondcorp.projects.locations.appConnections.resolve" call. +// Exactly one of +// *GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsRespon +// se or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsRespon +// se.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAppConnectionsResolveCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8483,7 +7461,7 @@ func (c *ProjectsLocationsAppConnectorsPatchCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8495,44 +7473,41 @@ func (c *ProjectsLocationsAppConnectorsPatchCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Updates the parameters of a single AppConnector.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}", - // "httpMethod": "PATCH", - // "id": "beyondcorp.projects.locations.appConnectors.patch", + // "description": "Resolves AppConnections details for a given AppConnector. An internal method called by a connector to find AppConnections to connect to.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections:resolve", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appConnections.resolve", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Unique resource name of the AppConnector. The name is ignored when creating a AppConnector.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", - // "required": true, + // "appConnectorId": { + // "description": "Required. BeyondCorp Connector name of the connector associated with those AppConnections using the form: `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`", + // "location": "query", // "type": "string" // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he 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).", + // "pageSize": { + // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "updateMask": { - // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.AppConnector]: * `labels` * `display_name`", - // "format": "google-fieldmask", + // "pageToken": { + // "description": "Optional. The next_page_token value returned from a previous ResolveAppConnectionsResponse, if any.", // "location": "query", // "type": "string" // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" + // "parent": { + // "description": "Required. The resource name of the AppConnection location using the form: `projects/{project_id}/locations/{location_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector" - // }, + // "path": "v1alpha/{+parent}/appConnections:resolve", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8541,33 +7516,57 @@ func (c *ProjectsLocationsAppConnectorsPatchCall) Do(opts ...googleapi.CallOptio } -// method id "beyondcorp.projects.locations.appConnectors.reportStatus": +// 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 *ProjectsLocationsAppConnectionsResolveCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpAppconnectionsV1alphaResolveAppConnectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsAppConnectorsReportStatusCall struct { - s *Service - appConnector string - googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest *GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "beyondcorp.projects.locations.appConnections.setIamPolicy": + +type ProjectsLocationsAppConnectionsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ReportStatus: Report status for a given connector. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // -// - appConnector: BeyondCorp Connector name using the form: -// `projects/{project_id}/locations/{location_id}/connectors/{connector -// }`. -func (r *ProjectsLocationsAppConnectorsService) ReportStatus(appConnector string, googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest *GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest) *ProjectsLocationsAppConnectorsReportStatusCall { - c := &ProjectsLocationsAppConnectorsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.appConnector = appConnector - c.googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest = googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppConnectionsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAppConnectionsSetIamPolicyCall { + c := &ProjectsLocationsAppConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppConnectorsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsReportStatusCall { +func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8575,21 +7574,21 @@ func (c *ProjectsLocationsAppConnectorsReportStatusCall) Fields(s ...googleapi.F // 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 *ProjectsLocationsAppConnectorsReportStatusCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsReportStatusCall { +func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsSetIamPolicyCall { 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 *ProjectsLocationsAppConnectorsReportStatusCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectorsReportStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) 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_ { @@ -8597,14 +7596,14 @@ func (c *ProjectsLocationsAppConnectorsReportStatusCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) 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, "v1alpha/{+appConnector}:reportStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8612,19 +7611,19 @@ func (c *ProjectsLocationsAppConnectorsReportStatusCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "appConnector": c.appConnector, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnectors.reportStatus" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appConnections.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectorsReportStatusCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsAppConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8643,7 +7642,7 @@ func (c *ProjectsLocationsAppConnectorsReportStatusCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8655,28 +7654,28 @@ func (c *ProjectsLocationsAppConnectorsReportStatusCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Report status for a given connector.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:reportStatus", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:setIamPolicy", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appConnectors.reportStatus", + // "id": "beyondcorp.projects.locations.appConnections.setIamPolicy", // "parameterOrder": [ - // "appConnector" + // "resource" // ], // "parameters": { - // "appConnector": { - // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector}`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+appConnector}:reportStatus", + // "path": "v1alpha/{+resource}:setIamPolicy", // "request": { - // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest" + // "$ref": "GoogleIamV1SetIamPolicyRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8685,102 +7684,97 @@ func (c *ProjectsLocationsAppConnectorsReportStatusCall) Do(opts ...googleapi.Ca } -// method id "beyondcorp.projects.locations.appConnectors.resolveInstanceConfig": +// method id "beyondcorp.projects.locations.appConnections.testIamPermissions": -type ProjectsLocationsAppConnectorsResolveInstanceConfigCall struct { - s *Service - appConnector string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectionsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ResolveInstanceConfig: Gets instance configuration for a given -// AppConnector. An internal method called by a AppConnector to get its -// container config. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - appConnector: BeyondCorp AppConnector name using the form: -// `projects/{project_id}/locations/{location_id}/appConnectors/{app_co -// nnector}`. -func (r *ProjectsLocationsAppConnectorsService) ResolveInstanceConfig(appConnector string) *ProjectsLocationsAppConnectorsResolveInstanceConfigCall { - c := &ProjectsLocationsAppConnectorsResolveInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.appConnector = appConnector +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppConnectionsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAppConnectionsTestIamPermissionsCall { + c := &ProjectsLocationsAppConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsResolveInstanceConfigCall { +func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectionsTestIamPermissionsCall { 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 *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectorsResolveInstanceConfigCall { - 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 *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsResolveInstanceConfigCall { +func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAppConnectionsTestIamPermissionsCall { 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 *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) + 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, "v1alpha/{+appConnector}:resolveInstanceConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "appConnector": c.appConnector, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnectors.resolveInstanceConfig" call. -// Exactly one of -// *GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigRespons -// e or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigRespons -// e.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigResponse, error) { +// Do executes the "beyondcorp.projects.locations.appConnections.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAppConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8799,7 +7793,7 @@ func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8810,26 +7804,29 @@ func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Do(opts ...goo return nil, err } return ret, nil - // { - // "description": "Gets instance configuration for a given AppConnector. An internal method called by a AppConnector to get its container config.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:resolveInstanceConfig", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appConnectors.resolveInstanceConfig", + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnections/{appConnectionsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appConnections.testIamPermissions", // "parameterOrder": [ - // "appConnector" + // "resource" // ], // "parameters": { - // "appConnector": { - // "description": "Required. BeyondCorp AppConnector name using the form: `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector}`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+appConnector}:resolveInstanceConfig", + // "path": "v1alpha/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigResponse" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8838,36 +7835,67 @@ func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Do(opts ...goo } -// method id "beyondcorp.projects.locations.appConnectors.setIamPolicy": +// method id "beyondcorp.projects.locations.appConnectors.create": -type ProjectsLocationsAppConnectorsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectorsCreateCall struct { + s *Service + parent string + googlecloudbeyondcorpappconnectorsv1alphaappconnector *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Create: Creates a new AppConnector in a given project and location. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsAppConnectorsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAppConnectorsSetIamPolicyCall { - c := &ProjectsLocationsAppConnectorsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - parent: The resource project name of the AppConnector location +// using the form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsAppConnectorsService) Create(parent string, googlecloudbeyondcorpappconnectorsv1alphaappconnector *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector) *ProjectsLocationsAppConnectorsCreateCall { + c := &ProjectsLocationsAppConnectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudbeyondcorpappconnectorsv1alphaappconnector = googlecloudbeyondcorpappconnectorsv1alphaappconnector + return c +} + +// AppConnectorId sets the optional parameter "appConnectorId": +// User-settable AppConnector resource ID. * Must start with a letter. * +// Must contain between 4-63 characters from `/a-z-/`. * Must end with a +// number or a letter. +func (c *ProjectsLocationsAppConnectorsCreateCall) AppConnectorId(appConnectorId string) *ProjectsLocationsAppConnectorsCreateCall { + c.urlParams_.Set("appConnectorId", appConnectorId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsAppConnectorsCreateCall) RequestId(requestId string) *ProjectsLocationsAppConnectorsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsAppConnectorsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectorsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsSetIamPolicyCall { +func (c *ProjectsLocationsAppConnectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -8875,21 +7903,21 @@ func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Fields(s ...googleapi.F // 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 *ProjectsLocationsAppConnectorsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsSetIamPolicyCall { +func (c *ProjectsLocationsAppConnectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsCreateCall { 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 *ProjectsLocationsAppConnectorsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsCreateCall) 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_ { @@ -8897,14 +7925,14 @@ func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) doRequest(alt string) ( } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpappconnectorsv1alphaappconnector) 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, "v1alpha/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appConnectors") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8912,19 +7940,19 @@ func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnectors.setIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appConnectors.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsAppConnectorsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8943,7 +7971,7 @@ func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8955,28 +7983,43 @@ func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:setIamPolicy", + // "description": "Creates a new AppConnector in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appConnectors.setIamPolicy", + // "id": "beyondcorp.projects.locations.appConnectors.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "appConnectorId": { + // "description": "Optional. User-settable AppConnector resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource project name of the AppConnector location using the form: `projects/{project_id}/locations/{location_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+resource}:setIamPolicy", + // "path": "v1alpha/{+parent}/appConnectors", // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" + // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector" // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -8985,39 +8028,57 @@ func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Do(opts ...googleapi.Ca } -// method id "beyondcorp.projects.locations.appConnectors.testIamPermissions": +// method id "beyondcorp.projects.locations.appConnectors.delete": -type ProjectsLocationsAppConnectorsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectorsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Delete: Deletes a single AppConnector. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsAppConnectorsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAppConnectorsTestIamPermissionsCall { - c := &ProjectsLocationsAppConnectorsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: BeyondCorp AppConnector name using the form: +// `projects/{project_id}/locations/{location_id}/appConnectors/{app_co +// nnector_id}`. +func (r *ProjectsLocationsAppConnectorsService) Delete(name string) *ProjectsLocationsAppConnectorsDeleteCall { + c := &ProjectsLocationsAppConnectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsAppConnectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsAppConnectorsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsAppConnectorsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectorsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsTestIamPermissionsCall { +func (c *ProjectsLocationsAppConnectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9025,21 +8086,21 @@ func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Fields(s ...googl // 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 *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsTestIamPermissionsCall { +func (c *ProjectsLocationsAppConnectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsDeleteCall { 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 *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsDeleteCall) 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_ { @@ -9047,35 +8108,29 @@ func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) doRequest(alt str } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - 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, "v1alpha/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appConnectors.testIamPermissions" call. -// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appConnectors.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsAppConnectorsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9094,7 +8149,7 @@ func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9106,28 +8161,35 @@ func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Do(opts ...google } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appConnectors.testIamPermissions", + // "description": "Deletes a single AppConnector.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}", + // "httpMethod": "DELETE", + // "id": "beyondcorp.projects.locations.appConnectors.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. BeyondCorp AppConnector name using the form: `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9136,124 +8198,99 @@ func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Do(opts ...google } -// method id "beyondcorp.projects.locations.appGateways.create": +// method id "beyondcorp.projects.locations.appConnectors.get": -type ProjectsLocationsAppGatewaysCreateCall struct { - s *Service - parent string - appgateway *AppGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectorsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new AppGateway in a given project and location. +// Get: Gets details of a single AppConnector. // -// - parent: The resource project name of the AppGateway location using -// the form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsAppGatewaysService) Create(parent string, appgateway *AppGateway) *ProjectsLocationsAppGatewaysCreateCall { - c := &ProjectsLocationsAppGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.appgateway = appgateway - return c -} - -// AppGatewayId sets the optional parameter "appGatewayId": -// User-settable AppGateway resource ID. * Must start with a letter. * -// Must contain between 4-63 characters from `/a-z-/`. * Must end with a -// number or a letter. -func (c *ProjectsLocationsAppGatewaysCreateCall) AppGatewayId(appGatewayId string) *ProjectsLocationsAppGatewaysCreateCall { - c.urlParams_.Set("appGatewayId", appGatewayId) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsAppGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsAppGatewaysCreateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsAppGatewaysCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppGatewaysCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - name: BeyondCorp AppConnector name using the form: +// `projects/{project_id}/locations/{location_id}/appConnectors/{app_co +// nnector_id}`. +func (r *ProjectsLocationsAppConnectorsService) Get(name string) *ProjectsLocationsAppConnectorsGetCall { + c := &ProjectsLocationsAppConnectorsGetCall{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 *ProjectsLocationsAppGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysCreateCall { +func (c *ProjectsLocationsAppConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsGetCall { 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 *ProjectsLocationsAppConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectorsGetCall { + 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 *ProjectsLocationsAppGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysCreateCall { +func (c *ProjectsLocationsAppConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsGetCall { 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 *ProjectsLocationsAppGatewaysCreateCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppGatewaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsGetCall) 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.appgateway) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appGateways.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "beyondcorp.projects.locations.appConnectors.get" call. +// Exactly one of *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAppConnectorsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9272,7 +8309,7 @@ func (c *ProjectsLocationsAppGatewaysCreateCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9284,43 +8321,25 @@ func (c *ProjectsLocationsAppGatewaysCreateCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Creates a new AppGateway in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appGateways.create", + // "description": "Gets details of a single AppConnector.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appConnectors.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "appGatewayId": { - // "description": "Optional. User-settable AppGateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource project name of the AppGateway location using the form: `projects/{project_id}/locations/{location_id}`", + // "name": { + // "description": "Required. BeyondCorp AppConnector name using the form: `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/appGateways", - // "request": { - // "$ref": "AppGateway" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9329,109 +8348,118 @@ func (c *ProjectsLocationsAppGatewaysCreateCall) Do(opts ...googleapi.CallOption } -// method id "beyondcorp.projects.locations.appGateways.delete": +// method id "beyondcorp.projects.locations.appConnectors.getIamPolicy": -type ProjectsLocationsAppGatewaysDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectorsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single AppGateway. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: BeyondCorp AppGateway name using the form: -// `projects/{project_id}/locations/{location_id}/appGateways/{app_gate -// way_id}`. -func (r *ProjectsLocationsAppGatewaysService) Delete(name string) *ProjectsLocationsAppGatewaysDeleteCall { - c := &ProjectsLocationsAppGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes after the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsAppGatewaysDeleteCall) RequestId(requestId string) *ProjectsLocationsAppGatewaysDeleteCall { - c.urlParams_.Set("requestId", requestId) +// - 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 *ProjectsLocationsAppConnectorsService) GetIamPolicy(resource string) *ProjectsLocationsAppConnectorsGetIamPolicyCall { + c := &ProjectsLocationsAppConnectorsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsAppGatewaysDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppGatewaysDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// 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 *ProjectsLocationsAppConnectorsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAppConnectorsGetIamPolicyCall { + 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 *ProjectsLocationsAppGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysDeleteCall { +func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsGetIamPolicyCall { 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 *ProjectsLocationsAppConnectorsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectorsGetIamPolicyCall { + 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 *ProjectsLocationsAppGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysDeleteCall { +func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsGetIamPolicyCall { 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 *ProjectsLocationsAppGatewaysDeleteCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appGateways.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appConnectors.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsAppConnectorsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9450,7 +8478,7 @@ func (c *ProjectsLocationsAppGatewaysDeleteCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9462,35 +8490,31 @@ func (c *ProjectsLocationsAppGatewaysDeleteCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Deletes a single AppGateway.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}", - // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.appGateways.delete", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appConnectors.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. BeyondCorp AppGateway name using the form: `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`", + // "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/[^/]+/appGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9499,32 +8523,66 @@ func (c *ProjectsLocationsAppGatewaysDeleteCall) Do(opts ...googleapi.CallOption } -// method id "beyondcorp.projects.locations.appGateways.get": +// method id "beyondcorp.projects.locations.appConnectors.list": -type ProjectsLocationsAppGatewaysGetCall struct { +type ProjectsLocationsAppConnectorsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets details of a single AppGateway. +// List: Lists AppConnectors in a given project and location. // -// - name: BeyondCorp AppGateway name using the form: -// `projects/{project_id}/locations/{location_id}/appGateways/{app_gate -// way_id}`. -func (r *ProjectsLocationsAppGatewaysService) Get(name string) *ProjectsLocationsAppGatewaysGetCall { - c := &ProjectsLocationsAppGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the AppConnector location using the +// form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsAppConnectorsService) List(parent string) *ProjectsLocationsAppConnectorsListCall { + c := &ProjectsLocationsAppConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter specifying +// constraints of a list operation. +func (c *ProjectsLocationsAppConnectorsListCall) Filter(filter string) *ProjectsLocationsAppConnectorsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specifies the ordering +// of results. See Sorting order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order) +// for more information. +func (c *ProjectsLocationsAppConnectorsListCall) OrderBy(orderBy string) *ProjectsLocationsAppConnectorsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 50 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's next_page_token to determine if there are more instances +// left to be queried. +func (c *ProjectsLocationsAppConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsAppConnectorsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous +// ListAppConnectorsRequest, if any. +func (c *ProjectsLocationsAppConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsAppConnectorsListCall { + 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 *ProjectsLocationsAppGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysGetCall { +func (c *ProjectsLocationsAppConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -9534,7 +8592,7 @@ func (c *ProjectsLocationsAppGatewaysGetCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsAppGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppGatewaysGetCall { +func (c *ProjectsLocationsAppConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectorsListCall { c.ifNoneMatch_ = entityTag return c } @@ -9542,21 +8600,21 @@ func (c *ProjectsLocationsAppGatewaysGetCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsAppGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysGetCall { +func (c *ProjectsLocationsAppConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsListCall { 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 *ProjectsLocationsAppGatewaysGetCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppGatewaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsListCall) 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_ { @@ -9569,7 +8627,7 @@ func (c *ProjectsLocationsAppGatewaysGetCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appConnectors") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -9577,19 +8635,22 @@ func (c *ProjectsLocationsAppGatewaysGetCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appGateways.get" call. -// Exactly one of *AppGateway or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *AppGateway.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsAppGatewaysGetCall) Do(opts ...googleapi.CallOption) (*AppGateway, error) { +// Do executes the "beyondcorp.projects.locations.appConnectors.list" call. +// Exactly one of +// *GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse.Se +// rverResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAppConnectorsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9608,7 +8669,7 @@ func (c *ProjectsLocationsAppGatewaysGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &AppGateway{ + ret := &GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9620,25 +8681,46 @@ func (c *ProjectsLocationsAppGatewaysGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Gets details of a single AppGateway.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}", + // "description": "Lists AppConnectors in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appGateways.get", + // "id": "beyondcorp.projects.locations.appConnectors.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. BeyondCorp AppGateway name using the form: `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`", + // "filter": { + // "description": "Optional. A filter specifying constraints of a list operation.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. The next_page_token value returned from a previous ListAppConnectorsRequest, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the AppConnector location using the form: `projects/{project_id}/locations/{location_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/appConnectors", // "response": { - // "$ref": "AppGateway" + // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9647,118 +8729,146 @@ func (c *ProjectsLocationsAppGatewaysGetCall) Do(opts ...googleapi.CallOption) ( } -// method id "beyondcorp.projects.locations.appGateways.getIamPolicy": +// 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 *ProjectsLocationsAppConnectorsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpAppconnectorsV1alphaListAppConnectorsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsAppGatewaysGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "beyondcorp.projects.locations.appConnectors.patch": + +type ProjectsLocationsAppConnectorsPatchCall struct { + s *Service + name string + googlecloudbeyondcorpappconnectorsv1alphaappconnector *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single AppConnector. +// +// - name: Unique resource name of the AppConnector. The name is ignored +// when creating a AppConnector. +func (r *ProjectsLocationsAppConnectorsService) Patch(name string, googlecloudbeyondcorpappconnectorsv1alphaappconnector *GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector) *ProjectsLocationsAppConnectorsPatchCall { + c := &ProjectsLocationsAppConnectorsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudbeyondcorpappconnectorsv1alphaappconnector = googlecloudbeyondcorpappconnectorsv1alphaappconnector + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsAppConnectorsPatchCall) RequestId(requestId string) *ProjectsLocationsAppConnectorsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c } -// 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 *ProjectsLocationsAppGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsAppGatewaysGetIamPolicyCall { - c := &ProjectsLocationsAppGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. At least one path must be supplied in this +// field. The elements of the repeated paths field may only include +// these fields from [BeyondCorp.AppConnector]: * `labels` * +// `display_name` +func (c *ProjectsLocationsAppConnectorsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsAppConnectorsPatchCall { + c.urlParams_.Set("updateMask", updateMask) 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 *ProjectsLocationsAppGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAppGatewaysGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsAppConnectorsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppConnectorsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsAppConnectorsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsPatchCall { 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 *ProjectsLocationsAppGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppGatewaysGetIamPolicyCall { - 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 *ProjectsLocationsAppGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsAppConnectorsPatchCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsPatchCall { 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 *ProjectsLocationsAppGatewaysGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsPatchCall) 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.googlecloudbeyondcorpappconnectorsv1alphaappconnector) + 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, "v1alpha/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "beyondcorp.projects.locations.appGateways.getIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appConnectors.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsAppConnectorsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9777,7 +8887,7 @@ func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9789,31 +8899,44 @@ func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Do(opts ...googleapi.Call } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appGateways.getIamPolicy", + // "description": "Updates the parameters of a single AppConnector.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}", + // "httpMethod": "PATCH", + // "id": "beyondcorp.projects.locations.appConnectors.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": "Required. Unique resource name of the AppConnector. The name is ignored when creating a AppConnector.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.AppConnector]: * `labels` * `display_name`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+resource}:getIamPolicy", + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaAppConnector" + // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -9822,131 +8945,90 @@ func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Do(opts ...googleapi.Call } -// method id "beyondcorp.projects.locations.appGateways.list": +// method id "beyondcorp.projects.locations.appConnectors.reportStatus": -type ProjectsLocationsAppGatewaysListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectorsReportStatusCall struct { + s *Service + appConnector string + googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest *GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists AppGateways in a given project and location. +// ReportStatus: Report status for a given connector. // -// - parent: The resource name of the AppGateway location using the -// form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsAppGatewaysService) List(parent string) *ProjectsLocationsAppGatewaysListCall { - c := &ProjectsLocationsAppGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter specifying -// constraints of a list operation. -func (c *ProjectsLocationsAppGatewaysListCall) Filter(filter string) *ProjectsLocationsAppGatewaysListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results. See Sorting order -// (https://cloud.google.com/apis/design/design_patterns#sorting_order) -// for more information. -func (c *ProjectsLocationsAppGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsAppGatewaysListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If not specified, a default value of 50 will be -// used by the service. Regardless of the page_size value, the response -// may include a partial list and a caller should only rely on -// response's next_page_token to determine if there are more instances -// left to be queried. -func (c *ProjectsLocationsAppGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsAppGatewaysListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous -// ListAppGatewaysRequest, if any. -func (c *ProjectsLocationsAppGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsAppGatewaysListCall { - c.urlParams_.Set("pageToken", pageToken) +// - appConnector: BeyondCorp Connector name using the form: +// `projects/{project_id}/locations/{location_id}/connectors/{connector +// }`. +func (r *ProjectsLocationsAppConnectorsService) ReportStatus(appConnector string, googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest *GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest) *ProjectsLocationsAppConnectorsReportStatusCall { + c := &ProjectsLocationsAppConnectorsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appConnector = appConnector + c.googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest = googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest 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 *ProjectsLocationsAppGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysListCall { +func (c *ProjectsLocationsAppConnectorsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsReportStatusCall { 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 *ProjectsLocationsAppGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppGatewaysListCall { - 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 *ProjectsLocationsAppGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysListCall { +func (c *ProjectsLocationsAppConnectorsReportStatusCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsReportStatusCall { 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 *ProjectsLocationsAppGatewaysListCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsReportStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppGatewaysListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsReportStatusCall) 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.googlecloudbeyondcorpappconnectorsv1alphareportstatusrequest) + 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, "v1alpha/{+parent}/appGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+appConnector}:reportStatus") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "appConnector": c.appConnector, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appGateways.list" call. -// Exactly one of *ListAppGatewaysResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListAppGatewaysResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appConnectors.reportStatus" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListAppGatewaysResponse, error) { +func (c *ProjectsLocationsAppConnectorsReportStatusCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -9965,7 +9047,7 @@ func (c *ProjectsLocationsAppGatewaysListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListAppGatewaysResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -9977,46 +9059,28 @@ func (c *ProjectsLocationsAppGatewaysListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists AppGateways in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.appGateways.list", + // "description": "Report status for a given connector.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:reportStatus", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appConnectors.reportStatus", // "parameterOrder": [ - // "parent" + // "appConnector" // ], // "parameters": { - // "filter": { - // "description": "Optional. A filter specifying constraints of a list operation.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous ListAppGatewaysRequest, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the AppGateway location using the form: `projects/{project_id}/locations/{location_id}`", + // "appConnector": { + // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/appGateways", + // "path": "v1alpha/{+appConnector}:reportStatus", + // "request": { + // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaReportStatusRequest" + // }, // "response": { - // "$ref": "ListAppGatewaysResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10025,114 +9089,102 @@ func (c *ProjectsLocationsAppGatewaysListCall) Do(opts ...googleapi.CallOption) } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsAppGatewaysListCall) Pages(ctx context.Context, f func(*ListAppGatewaysResponse) 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 "beyondcorp.projects.locations.appGateways.setIamPolicy": +// method id "beyondcorp.projects.locations.appConnectors.resolveInstanceConfig": -type ProjectsLocationsAppGatewaysSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectorsResolveInstanceConfigCall struct { + s *Service + appConnector string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// ResolveInstanceConfig: Gets instance configuration for a given +// AppConnector. An internal method called by a AppConnector to get its +// container config. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsAppGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAppGatewaysSetIamPolicyCall { - c := &ProjectsLocationsAppGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - appConnector: BeyondCorp AppConnector name using the form: +// `projects/{project_id}/locations/{location_id}/appConnectors/{app_co +// nnector}`. +func (r *ProjectsLocationsAppConnectorsService) ResolveInstanceConfig(appConnector string) *ProjectsLocationsAppConnectorsResolveInstanceConfigCall { + c := &ProjectsLocationsAppConnectorsResolveInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appConnector = appConnector 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 *ProjectsLocationsAppGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysSetIamPolicyCall { +func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsResolveInstanceConfigCall { 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 *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppConnectorsResolveInstanceConfigCall { + 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 *ProjectsLocationsAppGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysSetIamPolicyCall { +func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsResolveInstanceConfigCall { 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 *ProjectsLocationsAppGatewaysSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) 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.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+appConnector}:resolveInstanceConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "appConnector": c.appConnector, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appGateways.setIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// Do executes the "beyondcorp.projects.locations.appConnectors.resolveInstanceConfig" call. +// Exactly one of +// *GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigRespons +// e or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigRespons +// e.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAppConnectorsResolveInstanceConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10151,7 +9203,7 @@ func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10163,28 +9215,25 @@ func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appGateways.setIamPolicy", + // "description": "Gets instance configuration for a given AppConnector. An internal method called by a AppConnector to get its container config.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:resolveInstanceConfig", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appConnectors.resolveInstanceConfig", // "parameterOrder": [ - // "resource" + // "appConnector" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "appConnector": { + // "description": "Required. BeyondCorp AppConnector name using the form: `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, + // "path": "v1alpha/{+appConnector}:resolveInstanceConfig", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleCloudBeyondcorpAppconnectorsV1alphaResolveInstanceConfigResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10193,39 +9242,36 @@ func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Do(opts ...googleapi.Call } -// method id "beyondcorp.projects.locations.appGateways.testIamPermissions": +// method id "beyondcorp.projects.locations.appConnectors.setIamPolicy": -type ProjectsLocationsAppGatewaysTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppConnectorsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsAppGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAppGatewaysTestIamPermissionsCall { - c := &ProjectsLocationsAppGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsAppConnectorsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAppConnectorsSetIamPolicyCall { + c := &ProjectsLocationsAppConnectorsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10233,21 +9279,21 @@ func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Fields(s ...googlea // 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 *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsSetIamPolicyCall { 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 *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) 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_ { @@ -10255,14 +9301,14 @@ func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10275,15 +9321,14 @@ func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.appGateways.testIamPermissions" call. -// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appConnectors.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsAppConnectorsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10302,7 +9347,7 @@ func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10314,28 +9359,28 @@ func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Do(opts ...googleap } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:testIamPermissions", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:setIamPolicy", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.appGateways.testIamPermissions", + // "id": "beyondcorp.projects.locations.appConnectors.setIamPolicy", // "parameterOrder": [ // "resource" // ], // "parameters": { // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:testIamPermissions", + // "path": "v1alpha/{+resource}:setIamPolicy", // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // "$ref": "GoogleIamV1SetIamPolicyRequest" // }, // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10344,100 +9389,78 @@ func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Do(opts ...googleap } -// method id "beyondcorp.projects.locations.applications.getIamPolicy": - -type ProjectsLocationsApplicationsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "beyondcorp.projects.locations.appConnectors.testIamPermissions": + +type ProjectsLocationsAppConnectorsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. Returns -// an empty policy if the resource exists and does not have a policy -// set. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsApplicationsGetIamPolicyCall { - c := &ProjectsLocationsApplicationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsAppConnectorsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAppConnectorsTestIamPermissionsCall { + c := &ProjectsLocationsAppConnectorsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "options.requestedPolicyVersion": The maximum policy version that -// will be used to format the policy. Valid values are 0, 1, and 3. -// Requests specifying an invalid value will be rejected. Requests for -// policies with any conditional role bindings must specify version 3. -// Policies with no conditional role bindings may specify any valid -// value or leave the field unset. The policy in the response might use -// the policy version that you specified, or it might use a lower policy -// version. For example, if you specify version 3, but the policy has no -// conditional role bindings, the response uses version 1. To learn -// which resources support conditions in their IAM policies, see the IAM -// documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApplicationsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetIamPolicyCall { +func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppConnectorsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetIamPolicyCall { +func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAppConnectorsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) + 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, "v1alpha/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -10448,14 +9471,15 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.applications.getIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appConnectors.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsAppConnectorsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10474,7 +9498,7 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10486,31 +9510,28 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.applications.getIamPolicy", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appConnectors/{appConnectorsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appConnectors.testIamPermissions", // "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.", + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appConnectors/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:getIamPolicy", + // "path": "v1alpha/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10519,36 +9540,67 @@ func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.Cal } -// method id "beyondcorp.projects.locations.applications.setIamPolicy": +// method id "beyondcorp.projects.locations.appGateways.create": -type ProjectsLocationsApplicationsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppGatewaysCreateCall struct { + s *Service + parent string + appgateway *AppGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Create: Creates a new AppGateway in a given project and location. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsApplicationsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsApplicationsSetIamPolicyCall { - c := &ProjectsLocationsApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - parent: The resource project name of the AppGateway location using +// the form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsAppGatewaysService) Create(parent string, appgateway *AppGateway) *ProjectsLocationsAppGatewaysCreateCall { + c := &ProjectsLocationsAppGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.appgateway = appgateway + return c +} + +// AppGatewayId sets the optional parameter "appGatewayId": +// User-settable AppGateway resource ID. * Must start with a letter. * +// Must contain between 4-63 characters from `/a-z-/`. * Must end with a +// number or a letter. +func (c *ProjectsLocationsAppGatewaysCreateCall) AppGatewayId(appGatewayId string) *ProjectsLocationsAppGatewaysCreateCall { + c.urlParams_.Set("appGatewayId", appGatewayId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsAppGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsAppGatewaysCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsAppGatewaysCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppGatewaysCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsSetIamPolicyCall { +func (c *ProjectsLocationsAppGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10556,21 +9608,21 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsSetIamPolicyCall { +func (c *ProjectsLocationsAppGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsAppGatewaysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppGatewaysCreateCall) 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_ { @@ -10578,14 +9630,14 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.appgateway) 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, "v1alpha/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -10593,19 +9645,19 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.applications.setIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appGateways.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsAppGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10624,7 +9676,7 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10636,28 +9688,43 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:setIamPolicy", + // "description": "Creates a new AppGateway in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.applications.setIamPolicy", + // "id": "beyondcorp.projects.locations.appGateways.create", // "parameterOrder": [ - // "resource" + // "parent" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "appGatewayId": { + // "description": "Optional. User-settable AppGateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource project name of the AppGateway location using the form: `projects/{project_id}/locations/{location_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+resource}:setIamPolicy", + // "path": "v1alpha/{+parent}/appGateways", // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" + // "$ref": "AppGateway" // }, // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10666,39 +9733,57 @@ func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.Cal } -// method id "beyondcorp.projects.locations.applications.testIamPermissions": +// method id "beyondcorp.projects.locations.appGateways.delete": + +type ProjectsLocationsAppGatewaysDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single AppGateway. +// +// - name: BeyondCorp AppGateway name using the form: +// `projects/{project_id}/locations/{location_id}/appGateways/{app_gate +// way_id}`. +func (r *ProjectsLocationsAppGatewaysService) Delete(name string) *ProjectsLocationsAppGatewaysDeleteCall { + c := &ProjectsLocationsAppGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} -type ProjectsLocationsApplicationsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsAppGatewaysDeleteCall) RequestId(requestId string) *ProjectsLocationsAppGatewaysDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. -// -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsApplicationsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsApplicationsTestIamPermissionsCall { - c := &ProjectsLocationsApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsAppGatewaysDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsAppGatewaysDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsTestIamPermissionsCall { +func (c *ProjectsLocationsAppGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10706,21 +9791,21 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...google // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApplicationsTestIamPermissionsCall { +func (c *ProjectsLocationsAppGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsAppGatewaysDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppGatewaysDeleteCall) 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_ { @@ -10728,35 +9813,29 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) doRequest(alt stri } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) - 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, "v1alpha/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.applications.testIamPermissions" call. -// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appGateways.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsAppGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10775,7 +9854,7 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10787,28 +9866,35 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googlea } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.applications.testIamPermissions", + // "description": "Deletes a single AppGateway.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}", + // "httpMethod": "DELETE", + // "id": "beyondcorp.projects.locations.appGateways.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. BeyondCorp AppGateway name using the form: `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -10817,126 +9903,97 @@ func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googlea } -// method id "beyondcorp.projects.locations.clientConnectorServices.create": +// method id "beyondcorp.projects.locations.appGateways.get": -type ProjectsLocationsClientConnectorServicesCreateCall struct { - s *Service - parent string - clientconnectorservice *ClientConnectorService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppGatewaysGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new ClientConnectorService in a given project and -// location. +// Get: Gets details of a single AppGateway. // -// - parent: Value for parent. -func (r *ProjectsLocationsClientConnectorServicesService) Create(parent string, clientconnectorservice *ClientConnectorService) *ProjectsLocationsClientConnectorServicesCreateCall { - c := &ProjectsLocationsClientConnectorServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.clientconnectorservice = clientconnectorservice - return c -} - -// ClientConnectorServiceId sets the optional parameter -// "clientConnectorServiceId": User-settable client connector service -// resource ID. * Must start with a letter. * Must contain between 4-63 -// characters from `/a-z-/`. * Must end with a number or a letter. A -// random system generated name will be assigned if not specified by the -// user. -func (c *ProjectsLocationsClientConnectorServicesCreateCall) ClientConnectorServiceId(clientConnectorServiceId string) *ProjectsLocationsClientConnectorServicesCreateCall { - c.urlParams_.Set("clientConnectorServiceId", clientConnectorServiceId) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsClientConnectorServicesCreateCall) RequestId(requestId string) *ProjectsLocationsClientConnectorServicesCreateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsClientConnectorServicesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientConnectorServicesCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - name: BeyondCorp AppGateway name using the form: +// `projects/{project_id}/locations/{location_id}/appGateways/{app_gate +// way_id}`. +func (r *ProjectsLocationsAppGatewaysService) Get(name string) *ProjectsLocationsAppGatewaysGetCall { + c := &ProjectsLocationsAppGatewaysGetCall{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 *ProjectsLocationsClientConnectorServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesCreateCall { +func (c *ProjectsLocationsAppGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysGetCall { 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 *ProjectsLocationsAppGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppGatewaysGetCall { + 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 *ProjectsLocationsClientConnectorServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesCreateCall { +func (c *ProjectsLocationsAppGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysGetCall { 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 *ProjectsLocationsClientConnectorServicesCreateCall) Header() http.Header { +func (c *ProjectsLocationsAppGatewaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppGatewaysGetCall) 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.clientconnectorservice) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clientConnectorServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "beyondcorp.projects.locations.appGateways.get" call. +// Exactly one of *AppGateway or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AppGateway.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAppGatewaysGetCall) Do(opts ...googleapi.CallOption) (*AppGateway, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10955,7 +10012,7 @@ func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &AppGateway{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -10967,43 +10024,25 @@ func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Creates a new ClientConnectorService in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientConnectorServices.create", + // "description": "Gets details of a single AppGateway.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appGateways.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "clientConnectorServiceId": { - // "description": "Optional. User-settable client connector service resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter. A random system generated name will be assigned if not specified by the user.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Value for parent.", + // "name": { + // "description": "Required. BeyondCorp AppGateway name using the form: `projects/{project_id}/locations/{location_id}/appGateways/{app_gateway_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/clientConnectorServices", - // "request": { - // "$ref": "ClientConnectorService" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "AppGateway" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11012,107 +10051,118 @@ func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleap } -// method id "beyondcorp.projects.locations.clientConnectorServices.delete": +// method id "beyondcorp.projects.locations.appGateways.getIamPolicy": -type ProjectsLocationsClientConnectorServicesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppGatewaysGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single ClientConnectorService. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: Name of the resource. -func (r *ProjectsLocationsClientConnectorServicesService) Delete(name string) *ProjectsLocationsClientConnectorServicesDeleteCall { - c := &ProjectsLocationsClientConnectorServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes after the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsClientConnectorServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsClientConnectorServicesDeleteCall { - c.urlParams_.Set("requestId", requestId) +// - 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 *ProjectsLocationsAppGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsAppGatewaysGetIamPolicyCall { + c := &ProjectsLocationsAppGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientConnectorServicesDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// 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 *ProjectsLocationsAppGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAppGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsClientConnectorServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesDeleteCall { +func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysGetIamPolicyCall { 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 *ProjectsLocationsAppGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppGatewaysGetIamPolicyCall { + 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 *ProjectsLocationsClientConnectorServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesDeleteCall { +func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysGetIamPolicyCall { 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 *ProjectsLocationsClientConnectorServicesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.appGateways.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsAppGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11131,7 +10181,7 @@ func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11143,35 +10193,31 @@ func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Do(opts ...googleap } return ret, nil // { - // "description": "Deletes a single ClientConnectorService.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", - // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.clientConnectorServices.delete", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.appGateways.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the resource.", + // "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/[^/]+/clientConnectorServices/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11180,30 +10226,66 @@ func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Do(opts ...googleap } -// method id "beyondcorp.projects.locations.clientConnectorServices.get": +// method id "beyondcorp.projects.locations.appGateways.list": -type ProjectsLocationsClientConnectorServicesGetCall struct { +type ProjectsLocationsAppGatewaysListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets details of a single ClientConnectorService. +// List: Lists AppGateways in a given project and location. // -// - name: Name of the resource. -func (r *ProjectsLocationsClientConnectorServicesService) Get(name string) *ProjectsLocationsClientConnectorServicesGetCall { - c := &ProjectsLocationsClientConnectorServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the AppGateway location using the +// form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsAppGatewaysService) List(parent string) *ProjectsLocationsAppGatewaysListCall { + c := &ProjectsLocationsAppGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter specifying +// constraints of a list operation. +func (c *ProjectsLocationsAppGatewaysListCall) Filter(filter string) *ProjectsLocationsAppGatewaysListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specifies the ordering +// of results. See Sorting order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order) +// for more information. +func (c *ProjectsLocationsAppGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsAppGatewaysListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 50 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's next_page_token to determine if there are more instances +// left to be queried. +func (c *ProjectsLocationsAppGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsAppGatewaysListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous +// ListAppGatewaysRequest, if any. +func (c *ProjectsLocationsAppGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsAppGatewaysListCall { + 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 *ProjectsLocationsClientConnectorServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesGetCall { +func (c *ProjectsLocationsAppGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11213,7 +10295,7 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) Fields(s ...googleapi. // 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 *ProjectsLocationsClientConnectorServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesGetCall { +func (c *ProjectsLocationsAppGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAppGatewaysListCall { c.ifNoneMatch_ = entityTag return c } @@ -11221,21 +10303,21 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientConnectorServicesGetCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesGetCall { +func (c *ProjectsLocationsAppGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysListCall { 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 *ProjectsLocationsClientConnectorServicesGetCall) Header() http.Header { +func (c *ProjectsLocationsAppGatewaysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppGatewaysListCall) 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_ { @@ -11248,7 +10330,7 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/appGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11256,19 +10338,19 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) doRequest(alt string) } 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 "beyondcorp.projects.locations.clientConnectorServices.get" call. -// Exactly one of *ClientConnectorService or error will be non-nil. Any +// Do executes the "beyondcorp.projects.locations.appGateways.list" call. +// Exactly one of *ListAppGatewaysResponse or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ClientConnectorService.ServerResponse.Header or (if a response was +// *ListAppGatewaysResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesGetCall) Do(opts ...googleapi.CallOption) (*ClientConnectorService, error) { +func (c *ProjectsLocationsAppGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListAppGatewaysResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11287,7 +10369,7 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ClientConnectorService{ + ret := &ListAppGatewaysResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11299,25 +10381,46 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets details of a single ClientConnectorService.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", + // "description": "Lists AppGateways in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientConnectorServices.get", + // "id": "beyondcorp.projects.locations.appGateways.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Name of the resource.", + // "filter": { + // "description": "Optional. A filter specifying constraints of a list operation.", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. The next_page_token value returned from a previous ListAppGatewaysRequest, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the AppGateway location using the form: `projects/{project_id}/locations/{location_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/appGateways", // "response": { - // "$ref": "ClientConnectorService" + // "$ref": "ListAppGatewaysResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11326,100 +10429,96 @@ func (c *ProjectsLocationsClientConnectorServicesGetCall) Do(opts ...googleapi.C } -// method id "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy": +// 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 *ProjectsLocationsAppGatewaysListCall) Pages(ctx context.Context, f func(*ListAppGatewaysResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsClientConnectorServicesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "beyondcorp.projects.locations.appGateways.setIamPolicy": + +type ProjectsLocationsAppGatewaysSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + 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. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // // - resource: REQUIRED: The resource for which the policy is being -// requested. See Resource names +// specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsClientConnectorServicesService) GetIamPolicy(resource string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { - c := &ProjectsLocationsClientConnectorServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsAppGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsAppGatewaysSetIamPolicyCall { + c := &ProjectsLocationsAppGatewaysSetIamPolicyCall{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 *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { +func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysSetIamPolicyCall { 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 *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { - 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 *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { +func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysSetIamPolicyCall { 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 *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) + 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, "v1alpha/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -11430,14 +10529,14 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.appGateways.setIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsAppGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11468,29 +10567,26 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...go } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:getIamPolicy", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appGateways.setIamPolicy", // "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.", + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:getIamPolicy", + // "path": "v1alpha/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, // "response": { // "$ref": "GoogleIamV1Policy" // }, @@ -11501,124 +10597,97 @@ func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...go } -// method id "beyondcorp.projects.locations.clientConnectorServices.list": +// method id "beyondcorp.projects.locations.appGateways.testIamPermissions": -type ProjectsLocationsClientConnectorServicesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsAppGatewaysTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists ClientConnectorServices in a given project and location. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - parent: Parent value for ListClientConnectorServicesRequest. -func (r *ProjectsLocationsClientConnectorServicesService) List(parent string) *ProjectsLocationsClientConnectorServicesListCall { - c := &ProjectsLocationsClientConnectorServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results. -func (c *ProjectsLocationsClientConnectorServicesListCall) Filter(filter string) *ProjectsLocationsClientConnectorServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results. -func (c *ProjectsLocationsClientConnectorServicesListCall) OrderBy(orderBy string) *ProjectsLocationsClientConnectorServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. -func (c *ProjectsLocationsClientConnectorServicesListCall) PageSize(pageSize int64) *ProjectsLocationsClientConnectorServicesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results the server should return. -func (c *ProjectsLocationsClientConnectorServicesListCall) PageToken(pageToken string) *ProjectsLocationsClientConnectorServicesListCall { - c.urlParams_.Set("pageToken", pageToken) +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsAppGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsAppGatewaysTestIamPermissionsCall { + c := &ProjectsLocationsAppGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientConnectorServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesListCall { +func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAppGatewaysTestIamPermissionsCall { 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 *ProjectsLocationsClientConnectorServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesListCall { - 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 *ProjectsLocationsClientConnectorServicesListCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesListCall { +func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAppGatewaysTestIamPermissionsCall { 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 *ProjectsLocationsClientConnectorServicesListCall) Header() http.Header { +func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) 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.googleiamv1testiampermissionsrequest) + 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, "v1alpha/{+parent}/clientConnectorServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.list" call. -// Exactly one of *ListClientConnectorServicesResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ListClientConnectorServicesResponse.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsClientConnectorServicesListCall) Do(opts ...googleapi.CallOption) (*ListClientConnectorServicesResponse, error) { + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.appGateways.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsAppGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11637,7 +10706,7 @@ func (c *ProjectsLocationsClientConnectorServicesListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListClientConnectorServicesResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11649,46 +10718,28 @@ func (c *ProjectsLocationsClientConnectorServicesListCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Lists ClientConnectorServices in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientConnectorServices.list", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/appGateways/{appGatewaysId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.appGateways.testIamPermissions", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filtering results.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Hint for how to order the results.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token identifying a page of results the server should return.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Parent value for ListClientConnectorServicesRequest.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/appGateways/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/clientConnectorServices", + // "path": "v1alpha/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "ListClientConnectorServicesResponse" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11697,154 +10748,118 @@ func (c *ProjectsLocationsClientConnectorServicesListCall) Do(opts ...googleapi. } -// 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 *ProjectsLocationsClientConnectorServicesListCall) Pages(ctx context.Context, f func(*ListClientConnectorServicesResponse) 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 "beyondcorp.projects.locations.clientConnectorServices.patch": +// method id "beyondcorp.projects.locations.applications.getIamPolicy": -type ProjectsLocationsClientConnectorServicesPatchCall struct { - s *Service - name string - clientconnectorservice *ClientConnectorService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsApplicationsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single ClientConnectorService. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: Name of resource. The name is ignored during creation. -func (r *ProjectsLocationsClientConnectorServicesService) Patch(name string, clientconnectorservice *ClientConnectorService) *ProjectsLocationsClientConnectorServicesPatchCall { - c := &ProjectsLocationsClientConnectorServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.clientconnectorservice = clientconnectorservice - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set as -// true, will create the resource if it is not found. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClientConnectorServicesPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsClientConnectorServicesPatchCall) RequestId(requestId string) *ProjectsLocationsClientConnectorServicesPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Field -// mask is used to specify the fields to be overwritten in the -// 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. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClientConnectorServicesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsApplicationsService) GetIamPolicy(resource string) *ProjectsLocationsApplicationsGetIamPolicyCall { + c := &ProjectsLocationsApplicationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientConnectorServicesPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApplicationsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesPatchCall { +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApplicationsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesPatchCall { +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) Header() http.Header { +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientconnectorservice) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.applications.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsApplicationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11863,7 +10878,7 @@ func (c *ProjectsLocationsClientConnectorServicesPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11875,49 +10890,31 @@ func (c *ProjectsLocationsClientConnectorServicesPatchCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Updates the parameters of a single ClientConnectorService.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", - // "httpMethod": "PATCH", - // "id": "beyondcorp.projects.locations.clientConnectorServices.patch", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.applications.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "allowMissing": { - // "description": "Optional. If set as true, will create the resource if it is not found.", + // "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": "boolean" + // "type": "integer" // }, - // "name": { - // "description": "Required. Name of resource. The name is ignored during creation.", + // "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/[^/]+/clientConnectorServices/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Field mask is used to specify the fields to be overwritten in the 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" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "ClientConnectorService" - // }, + // "path": "v1alpha/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -11926,9 +10923,9 @@ func (c *ProjectsLocationsClientConnectorServicesPatchCall) Do(opts ...googleapi } -// method id "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy": +// method id "beyondcorp.projects.locations.applications.setIamPolicy": -type ProjectsLocationsClientConnectorServicesSetIamPolicyCall struct { +type ProjectsLocationsApplicationsSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -11945,8 +10942,8 @@ type ProjectsLocationsClientConnectorServicesSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsClientConnectorServicesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { - c := &ProjectsLocationsClientConnectorServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsApplicationsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsApplicationsSetIamPolicyCall { + c := &ProjectsLocationsApplicationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -11955,7 +10952,7 @@ func (r *ProjectsLocationsClientConnectorServicesService) SetIamPolicy(resource // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11963,21 +10960,21 @@ func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Fields(s ...g // 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 *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApplicationsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12005,14 +11002,14 @@ func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.applications.setIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsApplicationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12044,9 +11041,9 @@ func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Do(opts ...go return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:setIamPolicy", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:setIamPolicy", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy", + // "id": "beyondcorp.projects.locations.applications.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -12054,7 +11051,7 @@ func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Do(opts ...go // "resource": { // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", // "required": true, // "type": "string" // } @@ -12073,9 +11070,9 @@ func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Do(opts ...go } -// method id "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions": +// method id "beyondcorp.projects.locations.applications.testIamPermissions": -type ProjectsLocationsClientConnectorServicesTestIamPermissionsCall struct { +type ProjectsLocationsApplicationsTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -12095,8 +11092,8 @@ type ProjectsLocationsClientConnectorServicesTestIamPermissionsCall struct { // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsClientConnectorServicesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { - c := &ProjectsLocationsClientConnectorServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsApplicationsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsApplicationsTestIamPermissionsCall { + c := &ProjectsLocationsApplicationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -12105,7 +11102,7 @@ func (r *ProjectsLocationsClientConnectorServicesService) TestIamPermissions(res // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12113,21 +11110,21 @@ func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Fields( // 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 *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApplicationsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12155,7 +11152,7 @@ func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions" call. +// Do executes the "beyondcorp.projects.locations.applications.testIamPermissions" call. // Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -12163,7 +11160,7 @@ func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) doReque // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsApplicationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12195,9 +11192,9 @@ func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Do(opts return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:testIamPermissions", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}:testIamPermissions", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions", + // "id": "beyondcorp.projects.locations.applications.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -12205,7 +11202,7 @@ func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Do(opts // "resource": { // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/applications/[^/]+$", // "required": true, // "type": "string" // } @@ -12224,33 +11221,36 @@ func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Do(opts } -// method id "beyondcorp.projects.locations.clientGateways.create": +// method id "beyondcorp.projects.locations.clientConnectorServices.create": -type ProjectsLocationsClientGatewaysCreateCall struct { - s *Service - parent string - clientgateway *ClientGateway - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsClientConnectorServicesCreateCall struct { + s *Service + parent string + clientconnectorservice *ClientConnectorService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new ClientGateway in a given project and location. +// Create: Creates a new ClientConnectorService in a given project and +// location. // // - parent: Value for parent. -func (r *ProjectsLocationsClientGatewaysService) Create(parent string, clientgateway *ClientGateway) *ProjectsLocationsClientGatewaysCreateCall { - c := &ProjectsLocationsClientGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsClientConnectorServicesService) Create(parent string, clientconnectorservice *ClientConnectorService) *ProjectsLocationsClientConnectorServicesCreateCall { + c := &ProjectsLocationsClientConnectorServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.clientgateway = clientgateway + c.clientconnectorservice = clientconnectorservice return c } -// ClientGatewayId sets the optional parameter "clientGatewayId": -// User-settable client gateway resource ID. * Must start with a letter. -// * Must contain between 4-63 characters from `/a-z-/`. * Must end with -// a number or a letter. -func (c *ProjectsLocationsClientGatewaysCreateCall) ClientGatewayId(clientGatewayId string) *ProjectsLocationsClientGatewaysCreateCall { - c.urlParams_.Set("clientGatewayId", clientGatewayId) +// ClientConnectorServiceId sets the optional parameter +// "clientConnectorServiceId": User-settable client connector service +// resource ID. * Must start with a letter. * Must contain between 4-63 +// characters from `/a-z-/`. * Must end with a number or a letter. A +// random system generated name will be assigned if not specified by the +// user. +func (c *ProjectsLocationsClientConnectorServicesCreateCall) ClientConnectorServiceId(clientConnectorServiceId string) *ProjectsLocationsClientConnectorServicesCreateCall { + c.urlParams_.Set("clientConnectorServiceId", clientConnectorServiceId) return c } @@ -12267,7 +11267,7 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) ClientGatewayId(clientGatewa // 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 *ProjectsLocationsClientGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsClientGatewaysCreateCall { +func (c *ProjectsLocationsClientConnectorServicesCreateCall) RequestId(requestId string) *ProjectsLocationsClientConnectorServicesCreateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -12275,7 +11275,7 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) RequestId(requestId string) // ValidateOnly sets the optional parameter "validateOnly": If set, // validates request by executing a dry-run which would not alter the // resource in any way. -func (c *ProjectsLocationsClientGatewaysCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientGatewaysCreateCall { +func (c *ProjectsLocationsClientConnectorServicesCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientConnectorServicesCreateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -12283,7 +11283,7 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) ValidateOnly(validateOnly bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysCreateCall { +func (c *ProjectsLocationsClientConnectorServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12291,21 +11291,21 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) Fields(s ...googleapi.Field) // 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 *ProjectsLocationsClientGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysCreateCall { +func (c *ProjectsLocationsClientConnectorServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesCreateCall { 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 *ProjectsLocationsClientGatewaysCreateCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientGatewaysCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesCreateCall) 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_ { @@ -12313,14 +11313,14 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientgateway) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientconnectorservice) 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, "v1alpha/{+parent}/clientGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clientConnectorServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12333,14 +11333,14 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientGateways.create" call. +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsClientConnectorServicesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12371,16 +11371,16 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Creates a new ClientGateway in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways", + // "description": "Creates a new ClientConnectorService in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientGateways.create", + // "id": "beyondcorp.projects.locations.clientConnectorServices.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "clientGatewayId": { - // "description": "Optional. User-settable client gateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", + // "clientConnectorServiceId": { + // "description": "Optional. User-settable client connector service resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter. A random system generated name will be assigned if not specified by the user.", // "location": "query", // "type": "string" // }, @@ -12402,9 +11402,9 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) Do(opts ...googleapi.CallOpt // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/clientGateways", + // "path": "v1alpha/{+parent}/clientConnectorServices", // "request": { - // "$ref": "ClientGateway" + // "$ref": "ClientConnectorService" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -12416,9 +11416,9 @@ func (c *ProjectsLocationsClientGatewaysCreateCall) Do(opts ...googleapi.CallOpt } -// method id "beyondcorp.projects.locations.clientGateways.delete": +// method id "beyondcorp.projects.locations.clientConnectorServices.delete": -type ProjectsLocationsClientGatewaysDeleteCall struct { +type ProjectsLocationsClientConnectorServicesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12426,11 +11426,11 @@ type ProjectsLocationsClientGatewaysDeleteCall struct { header_ http.Header } -// Delete: Deletes a single ClientGateway. +// Delete: Deletes a single ClientConnectorService. // // - name: Name of the resource. -func (r *ProjectsLocationsClientGatewaysService) Delete(name string) *ProjectsLocationsClientGatewaysDeleteCall { - c := &ProjectsLocationsClientGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsClientConnectorServicesService) Delete(name string) *ProjectsLocationsClientConnectorServicesDeleteCall { + c := &ProjectsLocationsClientConnectorServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12448,7 +11448,7 @@ func (r *ProjectsLocationsClientGatewaysService) Delete(name string) *ProjectsLo // 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 *ProjectsLocationsClientGatewaysDeleteCall) RequestId(requestId string) *ProjectsLocationsClientGatewaysDeleteCall { +func (c *ProjectsLocationsClientConnectorServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsClientConnectorServicesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -12456,7 +11456,7 @@ func (c *ProjectsLocationsClientGatewaysDeleteCall) RequestId(requestId string) // ValidateOnly sets the optional parameter "validateOnly": If set, // validates request by executing a dry-run which would not alter the // resource in any way. -func (c *ProjectsLocationsClientGatewaysDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientGatewaysDeleteCall { +func (c *ProjectsLocationsClientConnectorServicesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientConnectorServicesDeleteCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -12464,7 +11464,7 @@ func (c *ProjectsLocationsClientGatewaysDeleteCall) ValidateOnly(validateOnly bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysDeleteCall { +func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12472,21 +11472,21 @@ func (c *ProjectsLocationsClientGatewaysDeleteCall) Fields(s ...googleapi.Field) // 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 *ProjectsLocationsClientGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysDeleteCall { +func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesDeleteCall { 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 *ProjectsLocationsClientGatewaysDeleteCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesDeleteCall) 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_ { @@ -12509,14 +11509,14 @@ func (c *ProjectsLocationsClientGatewaysDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientGateways.delete" call. +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.delete" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsClientConnectorServicesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12547,18 +11547,18 @@ func (c *ProjectsLocationsClientGatewaysDeleteCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Deletes a single ClientGateway.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}", + // "description": "Deletes a single ClientConnectorService.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.clientGateways.delete", + // "id": "beyondcorp.projects.locations.clientConnectorServices.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the resource", + // "description": "Required. Name of the resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", // "required": true, // "type": "string" // }, @@ -12584,9 +11584,9 @@ func (c *ProjectsLocationsClientGatewaysDeleteCall) Do(opts ...googleapi.CallOpt } -// method id "beyondcorp.projects.locations.clientGateways.get": +// method id "beyondcorp.projects.locations.clientConnectorServices.get": -type ProjectsLocationsClientGatewaysGetCall struct { +type ProjectsLocationsClientConnectorServicesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12595,11 +11595,11 @@ type ProjectsLocationsClientGatewaysGetCall struct { header_ http.Header } -// Get: Gets details of a single ClientGateway. +// Get: Gets details of a single ClientConnectorService. // // - name: Name of the resource. -func (r *ProjectsLocationsClientGatewaysService) Get(name string) *ProjectsLocationsClientGatewaysGetCall { - c := &ProjectsLocationsClientGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsClientConnectorServicesService) Get(name string) *ProjectsLocationsClientConnectorServicesGetCall { + c := &ProjectsLocationsClientConnectorServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12607,7 +11607,7 @@ func (r *ProjectsLocationsClientGatewaysService) Get(name string) *ProjectsLocat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysGetCall { +func (c *ProjectsLocationsClientConnectorServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12617,7 +11617,7 @@ func (c *ProjectsLocationsClientGatewaysGetCall) Fields(s ...googleapi.Field) *P // 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 *ProjectsLocationsClientGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysGetCall { +func (c *ProjectsLocationsClientConnectorServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -12625,21 +11625,21 @@ func (c *ProjectsLocationsClientGatewaysGetCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysGetCall { +func (c *ProjectsLocationsClientConnectorServicesGetCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesGetCall { 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 *ProjectsLocationsClientGatewaysGetCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientGatewaysGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesGetCall) 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_ { @@ -12665,14 +11665,14 @@ func (c *ProjectsLocationsClientGatewaysGetCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientGateways.get" call. -// Exactly one of *ClientGateway or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *ClientGateway.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.get" call. +// Exactly one of *ClientConnectorService or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ClientConnectorService.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ClientGateway, error) { +func (c *ProjectsLocationsClientConnectorServicesGetCall) Do(opts ...googleapi.CallOption) (*ClientConnectorService, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12691,7 +11691,7 @@ func (c *ProjectsLocationsClientGatewaysGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ClientGateway{ + ret := &ClientConnectorService{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12703,25 +11703,25 @@ func (c *ProjectsLocationsClientGatewaysGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets details of a single ClientGateway.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}", + // "description": "Gets details of a single ClientConnectorService.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientGateways.get", + // "id": "beyondcorp.projects.locations.clientConnectorServices.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the resource", + // "description": "Required. Name of the resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "ClientGateway" + // "$ref": "ClientConnectorService" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12730,9 +11730,9 @@ func (c *ProjectsLocationsClientGatewaysGetCall) Do(opts ...googleapi.CallOption } -// method id "beyondcorp.projects.locations.clientGateways.getIamPolicy": +// method id "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy": -type ProjectsLocationsClientGatewaysGetIamPolicyCall struct { +type ProjectsLocationsClientConnectorServicesGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -12749,8 +11749,8 @@ type ProjectsLocationsClientGatewaysGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsClientGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { - c := &ProjectsLocationsClientGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsClientConnectorServicesService) GetIamPolicy(resource string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { + c := &ProjectsLocationsClientConnectorServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -12768,7 +11768,7 @@ func (r *ProjectsLocationsClientGatewaysService) GetIamPolicy(resource string) * // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -12776,7 +11776,7 @@ func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) OptionsRequestedPolicy // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12786,7 +11786,7 @@ func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Fields(s ...googleapi. // 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 *ProjectsLocationsClientGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -12794,21 +11794,21 @@ func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysGetIamPolicyCall { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesGetIamPolicyCall { 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 *ProjectsLocationsClientGatewaysGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) 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_ { @@ -12834,14 +11834,14 @@ func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientGateways.getIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsClientConnectorServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12873,9 +11873,9 @@ func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Do(opts ...googleapi.C 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:getIamPolicy", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:getIamPolicy", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientGateways.getIamPolicy", + // "id": "beyondcorp.projects.locations.clientConnectorServices.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -12889,7 +11889,7 @@ func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Do(opts ...googleapi.C // "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/[^/]+/clientGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", // "required": true, // "type": "string" // } @@ -12905,9 +11905,9 @@ func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Do(opts ...googleapi.C } -// method id "beyondcorp.projects.locations.clientGateways.list": +// method id "beyondcorp.projects.locations.clientConnectorServices.list": -type ProjectsLocationsClientGatewaysListCall struct { +type ProjectsLocationsClientConnectorServicesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -12916,24 +11916,24 @@ type ProjectsLocationsClientGatewaysListCall struct { header_ http.Header } -// List: Lists ClientGateways in a given project and location. -// -// - parent: Parent value for ListClientGatewaysRequest. -func (r *ProjectsLocationsClientGatewaysService) List(parent string) *ProjectsLocationsClientGatewaysListCall { - c := &ProjectsLocationsClientGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// List: Lists ClientConnectorServices in a given project and location. +// +// - parent: Parent value for ListClientConnectorServicesRequest. +func (r *ProjectsLocationsClientConnectorServicesService) List(parent string) *ProjectsLocationsClientConnectorServicesListCall { + c := &ProjectsLocationsClientConnectorServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filtering results. -func (c *ProjectsLocationsClientGatewaysListCall) Filter(filter string) *ProjectsLocationsClientGatewaysListCall { +func (c *ProjectsLocationsClientConnectorServicesListCall) Filter(filter string) *ProjectsLocationsClientConnectorServicesListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Hint for how to order // the results. -func (c *ProjectsLocationsClientGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsClientGatewaysListCall { +func (c *ProjectsLocationsClientConnectorServicesListCall) OrderBy(orderBy string) *ProjectsLocationsClientConnectorServicesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -12941,14 +11941,14 @@ func (c *ProjectsLocationsClientGatewaysListCall) OrderBy(orderBy string) *Proje // PageSize sets the optional parameter "pageSize": Requested page size. // Server may return fewer items than requested. If unspecified, server // will pick an appropriate default. -func (c *ProjectsLocationsClientGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsClientGatewaysListCall { +func (c *ProjectsLocationsClientConnectorServicesListCall) PageSize(pageSize int64) *ProjectsLocationsClientConnectorServicesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A token // identifying a page of results the server should return. -func (c *ProjectsLocationsClientGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsClientGatewaysListCall { +func (c *ProjectsLocationsClientConnectorServicesListCall) PageToken(pageToken string) *ProjectsLocationsClientConnectorServicesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -12956,7 +11956,7 @@ func (c *ProjectsLocationsClientGatewaysListCall) PageToken(pageToken string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysListCall { +func (c *ProjectsLocationsClientConnectorServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12966,7 +11966,7 @@ func (c *ProjectsLocationsClientGatewaysListCall) Fields(s ...googleapi.Field) * // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsClientGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysListCall { +func (c *ProjectsLocationsClientConnectorServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientConnectorServicesListCall { c.ifNoneMatch_ = entityTag return c } @@ -12974,21 +11974,21 @@ func (c *ProjectsLocationsClientGatewaysListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysListCall { +func (c *ProjectsLocationsClientConnectorServicesListCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesListCall { 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 *ProjectsLocationsClientGatewaysListCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientGatewaysListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesListCall) 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_ { @@ -13001,7 +12001,7 @@ func (c *ProjectsLocationsClientGatewaysListCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clientGateways") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clientConnectorServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13014,14 +12014,15 @@ func (c *ProjectsLocationsClientGatewaysListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientGateways.list" call. -// Exactly one of *ListClientGatewaysResponse or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *ListClientGatewaysResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListClientGatewaysResponse, error) { +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.list" call. +// Exactly one of *ListClientConnectorServicesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListClientConnectorServicesResponse.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsClientConnectorServicesListCall) Do(opts ...googleapi.CallOption) (*ListClientConnectorServicesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13040,7 +12041,7 @@ func (c *ProjectsLocationsClientGatewaysListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListClientGatewaysResponse{ + ret := &ListClientConnectorServicesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13052,10 +12053,10 @@ func (c *ProjectsLocationsClientGatewaysListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Lists ClientGateways in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways", + // "description": "Lists ClientConnectorServices in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.clientGateways.list", + // "id": "beyondcorp.projects.locations.clientConnectorServices.list", // "parameterOrder": [ // "parent" // ], @@ -13082,16 +12083,16 @@ func (c *ProjectsLocationsClientGatewaysListCall) Do(opts ...googleapi.CallOptio // "type": "string" // }, // "parent": { - // "description": "Required. Parent value for ListClientGatewaysRequest.", + // "description": "Required. Parent value for ListClientConnectorServicesRequest.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/clientGateways", + // "path": "v1alpha/{+parent}/clientConnectorServices", // "response": { - // "$ref": "ListClientGatewaysResponse" + // "$ref": "ListClientConnectorServicesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13103,7 +12104,7 @@ func (c *ProjectsLocationsClientGatewaysListCall) Do(opts ...googleapi.CallOptio // 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 *ProjectsLocationsClientGatewaysListCall) Pages(ctx context.Context, f func(*ListClientGatewaysResponse) error) error { +func (c *ProjectsLocationsClientConnectorServicesListCall) Pages(ctx context.Context, f func(*ListClientConnectorServicesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -13121,9 +12122,217 @@ func (c *ProjectsLocationsClientGatewaysListCall) Pages(ctx context.Context, f f } } -// method id "beyondcorp.projects.locations.clientGateways.setIamPolicy": +// method id "beyondcorp.projects.locations.clientConnectorServices.patch": + +type ProjectsLocationsClientConnectorServicesPatchCall struct { + s *Service + name string + clientconnectorservice *ClientConnectorService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single ClientConnectorService. +// +// - name: Name of resource. The name is ignored during creation. +func (r *ProjectsLocationsClientConnectorServicesService) Patch(name string, clientconnectorservice *ClientConnectorService) *ProjectsLocationsClientConnectorServicesPatchCall { + c := &ProjectsLocationsClientConnectorServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.clientconnectorservice = clientconnectorservice + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set as +// true, will create the resource if it is not found. +func (c *ProjectsLocationsClientConnectorServicesPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsClientConnectorServicesPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsClientConnectorServicesPatchCall) RequestId(requestId string) *ProjectsLocationsClientConnectorServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Field +// mask is used to specify the fields to be overwritten in the +// 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. +func (c *ProjectsLocationsClientConnectorServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsClientConnectorServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsClientConnectorServicesPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientConnectorServicesPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClientConnectorServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesPatchCall { + 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 *ProjectsLocationsClientConnectorServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesPatchCall { + 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 *ProjectsLocationsClientConnectorServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClientConnectorServicesPatchCall) 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.clientconnectorservice) + 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, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsClientConnectorServicesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single ClientConnectorService.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}", + // "httpMethod": "PATCH", + // "id": "beyondcorp.projects.locations.clientConnectorServices.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "Optional. If set as true, will create the resource if it is not found.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Required. Name of resource. The name is ignored during creation.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Field mask is used to specify the fields to be overwritten in the 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" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "ClientConnectorService" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy": -type ProjectsLocationsClientGatewaysSetIamPolicyCall struct { +type ProjectsLocationsClientConnectorServicesSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -13140,8 +12349,8 @@ type ProjectsLocationsClientGatewaysSetIamPolicyCall struct { // specified. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsClientGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsClientGatewaysSetIamPolicyCall { - c := &ProjectsLocationsClientGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsClientConnectorServicesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { + c := &ProjectsLocationsClientConnectorServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -13150,7 +12359,7 @@ func (r *ProjectsLocationsClientGatewaysService) SetIamPolicy(resource string, g // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysSetIamPolicyCall { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13158,21 +12367,21 @@ func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Fields(s ...googleapi. // 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 *ProjectsLocationsClientGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysSetIamPolicyCall { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesSetIamPolicyCall { 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 *ProjectsLocationsClientGatewaysSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) 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_ { @@ -13200,14 +12409,14 @@ func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientGateways.setIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsClientConnectorServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13239,9 +12448,9 @@ func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Do(opts ...googleapi.C return ret, nil // { // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:setIamPolicy", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:setIamPolicy", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientGateways.setIamPolicy", + // "id": "beyondcorp.projects.locations.clientConnectorServices.setIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -13249,7 +12458,7 @@ func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Do(opts ...googleapi.C // "resource": { // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", // "required": true, // "type": "string" // } @@ -13268,9 +12477,9 @@ func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Do(opts ...googleapi.C } -// method id "beyondcorp.projects.locations.clientGateways.testIamPermissions": +// method id "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions": -type ProjectsLocationsClientGatewaysTestIamPermissionsCall struct { +type ProjectsLocationsClientConnectorServicesTestIamPermissionsCall struct { s *Service resource string googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest @@ -13290,8 +12499,8 @@ type ProjectsLocationsClientGatewaysTestIamPermissionsCall struct { // being requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsClientGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsClientGatewaysTestIamPermissionsCall { - c := &ProjectsLocationsClientGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsClientConnectorServicesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { + c := &ProjectsLocationsClientConnectorServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c @@ -13300,7 +12509,7 @@ func (r *ProjectsLocationsClientGatewaysService) TestIamPermissions(resource str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13308,21 +12517,21 @@ func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysTestIamPermissionsCall { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall { 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 *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) 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_ { @@ -13350,7 +12559,7 @@ func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.clientGateways.testIamPermissions" call. +// Do executes the "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions" call. // Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -13358,7 +12567,7 @@ func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) doRequest(alt st // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsClientConnectorServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13390,9 +12599,9 @@ func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Do(opts ...googl return ret, nil // { // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:testIamPermissions", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientConnectorServices/{clientConnectorServicesId}:testIamPermissions", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.clientGateways.testIamPermissions", + // "id": "beyondcorp.projects.locations.clientConnectorServices.testIamPermissions", // "parameterOrder": [ // "resource" // ], @@ -13400,7 +12609,7 @@ func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Do(opts ...googl // "resource": { // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientConnectorServices/[^/]+$", // "required": true, // "type": "string" // } @@ -13419,34 +12628,33 @@ func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Do(opts ...googl } -// method id "beyondcorp.projects.locations.connections.create": +// method id "beyondcorp.projects.locations.clientGateways.create": -type ProjectsLocationsConnectionsCreateCall struct { - s *Service - parent string - connection *Connection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsClientGatewaysCreateCall struct { + s *Service + parent string + clientgateway *ClientGateway + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Connection in a given project and location. +// Create: Creates a new ClientGateway in a given project and location. // -// - parent: The resource project name of the connection location using -// the form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsConnectionsService) Create(parent string, connection *Connection) *ProjectsLocationsConnectionsCreateCall { - c := &ProjectsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Value for parent. +func (r *ProjectsLocationsClientGatewaysService) Create(parent string, clientgateway *ClientGateway) *ProjectsLocationsClientGatewaysCreateCall { + c := &ProjectsLocationsClientGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.connection = connection + c.clientgateway = clientgateway return c } -// ConnectionId sets the optional parameter "connectionId": -// User-settable connection resource ID. * Must start with a letter. * -// Must contain between 4-63 characters from `/a-z-/`. * Must end with a -// number or a letter. -func (c *ProjectsLocationsConnectionsCreateCall) ConnectionId(connectionId string) *ProjectsLocationsConnectionsCreateCall { - c.urlParams_.Set("connectionId", connectionId) +// ClientGatewayId sets the optional parameter "clientGatewayId": +// User-settable client gateway resource ID. * Must start with a letter. +// * Must contain between 4-63 characters from `/a-z-/`. * Must end with +// a number or a letter. +func (c *ProjectsLocationsClientGatewaysCreateCall) ClientGatewayId(clientGatewayId string) *ProjectsLocationsClientGatewaysCreateCall { + c.urlParams_.Set("clientGatewayId", clientGatewayId) return c } @@ -13463,7 +12671,7 @@ func (c *ProjectsLocationsConnectionsCreateCall) ConnectionId(connectionId strin // 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 *ProjectsLocationsConnectionsCreateCall) RequestId(requestId string) *ProjectsLocationsConnectionsCreateCall { +func (c *ProjectsLocationsClientGatewaysCreateCall) RequestId(requestId string) *ProjectsLocationsClientGatewaysCreateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -13471,7 +12679,7 @@ func (c *ProjectsLocationsConnectionsCreateCall) RequestId(requestId string) *Pr // ValidateOnly sets the optional parameter "validateOnly": If set, // validates request by executing a dry-run which would not alter the // resource in any way. -func (c *ProjectsLocationsConnectionsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsCreateCall { +func (c *ProjectsLocationsClientGatewaysCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientGatewaysCreateCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -13479,7 +12687,7 @@ func (c *ProjectsLocationsConnectionsCreateCall) ValidateOnly(validateOnly bool) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsCreateCall { +func (c *ProjectsLocationsClientGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13487,21 +12695,21 @@ func (c *ProjectsLocationsConnectionsCreateCall) Fields(s ...googleapi.Field) *P // 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 *ProjectsLocationsConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsCreateCall { +func (c *ProjectsLocationsClientGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysCreateCall { 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 *ProjectsLocationsConnectionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsClientGatewaysCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientGatewaysCreateCall) 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_ { @@ -13509,14 +12717,14 @@ func (c *ProjectsLocationsConnectionsCreateCall) doRequest(alt string) (*http.Re } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.clientgateway) 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, "v1alpha/{+parent}/connections") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clientGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -13529,14 +12737,14 @@ func (c *ProjectsLocationsConnectionsCreateCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connections.create" call. +// Do executes the "beyondcorp.projects.locations.clientGateways.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsClientGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13567,21 +12775,21 @@ func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Creates a new Connection in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections", + // "description": "Creates a new ClientGateway in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.connections.create", + // "id": "beyondcorp.projects.locations.clientGateways.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "connectionId": { - // "description": "Optional. User-settable connection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", + // "clientGatewayId": { + // "description": "Optional. User-settable client gateway resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource project name of the connection location using the form: `projects/{project_id}/locations/{location_id}`", + // "description": "Required. Value for parent.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -13598,9 +12806,9 @@ func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/connections", + // "path": "v1alpha/{+parent}/clientGateways", // "request": { - // "$ref": "Connection" + // "$ref": "ClientGateway" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -13612,9 +12820,9 @@ func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption } -// method id "beyondcorp.projects.locations.connections.delete": +// method id "beyondcorp.projects.locations.clientGateways.delete": -type ProjectsLocationsConnectionsDeleteCall struct { +type ProjectsLocationsClientGatewaysDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13622,13 +12830,11 @@ type ProjectsLocationsConnectionsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Connection. +// Delete: Deletes a single ClientGateway. // -// - name: BeyondCorp Connector name using the form: -// `projects/{project_id}/locations/{location_id}/connections/{connecti -// on_id}`. -func (r *ProjectsLocationsConnectionsService) Delete(name string) *ProjectsLocationsConnectionsDeleteCall { - c := &ProjectsLocationsConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsClientGatewaysService) Delete(name string) *ProjectsLocationsClientGatewaysDeleteCall { + c := &ProjectsLocationsClientGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13646,7 +12852,7 @@ func (r *ProjectsLocationsConnectionsService) Delete(name string) *ProjectsLocat // 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 *ProjectsLocationsConnectionsDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectionsDeleteCall { +func (c *ProjectsLocationsClientGatewaysDeleteCall) RequestId(requestId string) *ProjectsLocationsClientGatewaysDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -13654,7 +12860,7 @@ func (c *ProjectsLocationsConnectionsDeleteCall) RequestId(requestId string) *Pr // ValidateOnly sets the optional parameter "validateOnly": If set, // validates request by executing a dry-run which would not alter the // resource in any way. -func (c *ProjectsLocationsConnectionsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsDeleteCall { +func (c *ProjectsLocationsClientGatewaysDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsClientGatewaysDeleteCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } @@ -13662,7 +12868,7 @@ func (c *ProjectsLocationsConnectionsDeleteCall) ValidateOnly(validateOnly bool) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsDeleteCall { +func (c *ProjectsLocationsClientGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13670,21 +12876,21 @@ func (c *ProjectsLocationsConnectionsDeleteCall) Fields(s ...googleapi.Field) *P // 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 *ProjectsLocationsConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsDeleteCall { +func (c *ProjectsLocationsClientGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysDeleteCall { 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 *ProjectsLocationsConnectionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsClientGatewaysDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientGatewaysDeleteCall) 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_ { @@ -13707,14 +12913,14 @@ func (c *ProjectsLocationsConnectionsDeleteCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connections.delete" call. +// Do executes the "beyondcorp.projects.locations.clientGateways.delete" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsClientGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13745,18 +12951,18 @@ func (c *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Deletes a single Connection.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "description": "Deletes a single ClientGateway.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}", // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.connections.delete", + // "id": "beyondcorp.projects.locations.clientGateways.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connections/{connection_id}`", + // "description": "Required. Name of the resource", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", // "required": true, // "type": "string" // }, @@ -13782,9 +12988,9 @@ func (c *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption } -// method id "beyondcorp.projects.locations.connections.get": +// method id "beyondcorp.projects.locations.clientGateways.get": -type ProjectsLocationsConnectionsGetCall struct { +type ProjectsLocationsClientGatewaysGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -13793,13 +12999,11 @@ type ProjectsLocationsConnectionsGetCall struct { header_ http.Header } -// Get: Gets details of a single Connection. +// Get: Gets details of a single ClientGateway. // -// - name: BeyondCorp Connection name using the form: -// `projects/{project_id}/locations/{location_id}/connections/{connecti -// on_id}`. -func (r *ProjectsLocationsConnectionsService) Get(name string) *ProjectsLocationsConnectionsGetCall { - c := &ProjectsLocationsConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsClientGatewaysService) Get(name string) *ProjectsLocationsClientGatewaysGetCall { + c := &ProjectsLocationsClientGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13807,7 +13011,7 @@ func (r *ProjectsLocationsConnectionsService) Get(name string) *ProjectsLocation // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetCall { +func (c *ProjectsLocationsClientGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13817,7 +13021,7 @@ func (c *ProjectsLocationsConnectionsGetCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetCall { +func (c *ProjectsLocationsClientGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysGetCall { c.ifNoneMatch_ = entityTag return c } @@ -13825,21 +13029,21 @@ func (c *ProjectsLocationsConnectionsGetCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetCall { +func (c *ProjectsLocationsClientGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysGetCall { 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 *ProjectsLocationsConnectionsGetCall) Header() http.Header { +func (c *ProjectsLocationsClientGatewaysGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientGatewaysGetCall) 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_ { @@ -13865,14 +13069,14 @@ func (c *ProjectsLocationsConnectionsGetCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connections.get" call. -// Exactly one of *Connection or error will be non-nil. Any non-2xx +// Do executes the "beyondcorp.projects.locations.clientGateways.get" call. +// Exactly one of *ClientGateway or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either -// *Connection.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) (*Connection, error) { +// *ClientGateway.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsClientGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ClientGateway, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13891,7 +13095,7 @@ func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Connection{ + ret := &ClientGateway{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13903,25 +13107,25 @@ func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Gets details of a single Connection.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "description": "Gets details of a single ClientGateway.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.connections.get", + // "id": "beyondcorp.projects.locations.clientGateways.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. BeyondCorp Connection name using the form: `projects/{project_id}/locations/{location_id}/connections/{connection_id}`", + // "description": "Required. Name of the resource", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "Connection" + // "$ref": "ClientGateway" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13930,9 +13134,9 @@ func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) ( } -// method id "beyondcorp.projects.locations.connections.getIamPolicy": +// method id "beyondcorp.projects.locations.clientGateways.getIamPolicy": -type ProjectsLocationsConnectionsGetIamPolicyCall struct { +type ProjectsLocationsClientGatewaysGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -13949,8 +13153,8 @@ type ProjectsLocationsConnectionsGetIamPolicyCall struct { // requested. See Resource names // (https://cloud.google.com/apis/design/resource_names) for the // appropriate value for this field. -func (r *ProjectsLocationsConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsConnectionsGetIamPolicyCall { - c := &ProjectsLocationsConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsClientGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { + c := &ProjectsLocationsClientGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -13968,7 +13172,7 @@ func (r *ProjectsLocationsConnectionsService) GetIamPolicy(resource string) *Pro // which resources support conditions in their IAM policies, see the IAM // documentation // (https://cloud.google.com/iam/help/conditions/resource-policies). -func (c *ProjectsLocationsConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsClientGatewaysGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -13976,7 +13180,7 @@ func (c *ProjectsLocationsConnectionsGetIamPolicyCall) OptionsRequestedPolicyVer // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13986,7 +13190,7 @@ func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Fields(s ...googleapi.Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } @@ -13994,21 +13198,21 @@ func (c *ProjectsLocationsConnectionsGetIamPolicyCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysGetIamPolicyCall { 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 *ProjectsLocationsConnectionsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) 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_ { @@ -14034,14 +13238,14 @@ func (c *ProjectsLocationsConnectionsGetIamPolicyCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connections.getIamPolicy" call. +// Do executes the "beyondcorp.projects.locations.clientGateways.getIamPolicy" call. // Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsClientGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14073,9 +13277,9 @@ func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Do(opts ...googleapi.Call 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:getIamPolicy", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:getIamPolicy", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.connections.getIamPolicy", + // "id": "beyondcorp.projects.locations.clientGateways.getIamPolicy", // "parameterOrder": [ // "resource" // ], @@ -14089,7 +13293,7 @@ func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Do(opts ...googleapi.Call // "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/[^/]+/connections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", // "required": true, // "type": "string" // } @@ -14105,9 +13309,9 @@ func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Do(opts ...googleapi.Call } -// method id "beyondcorp.projects.locations.connections.list": +// method id "beyondcorp.projects.locations.clientGateways.list": -type ProjectsLocationsConnectionsListCall struct { +type ProjectsLocationsClientGatewaysListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -14116,47 +13320,39 @@ type ProjectsLocationsConnectionsListCall struct { header_ http.Header } -// List: Lists Connections in a given project and location. +// List: Lists ClientGateways in a given project and location. // -// - parent: The resource name of the connection location using the -// form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsConnectionsService) List(parent string) *ProjectsLocationsConnectionsListCall { - c := &ProjectsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent value for ListClientGatewaysRequest. +func (r *ProjectsLocationsClientGatewaysService) List(parent string) *ProjectsLocationsClientGatewaysListCall { + c := &ProjectsLocationsClientGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter specifying -// constraints of a list operation. -func (c *ProjectsLocationsConnectionsListCall) Filter(filter string) *ProjectsLocationsConnectionsListCall { +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsClientGatewaysListCall) Filter(filter string) *ProjectsLocationsClientGatewaysListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results. See Sorting order -// (https://cloud.google.com/apis/design/design_patterns#sorting_order) -// for more information. -func (c *ProjectsLocationsConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsConnectionsListCall { +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results. +func (c *ProjectsLocationsClientGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsClientGatewaysListCall { c.urlParams_.Set("orderBy", orderBy) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If not specified, a default value of 50 will be -// used by the service. Regardless of the page_size value, the response -// may include a partial list and a caller should only rely on -// response's next_page_token to determine if there are more instances -// left to be queried. -func (c *ProjectsLocationsConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsClientGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsClientGatewaysListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous -// ListConnectionsRequest, if any. -func (c *ProjectsLocationsConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsListCall { +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsClientGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsClientGatewaysListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -14164,7 +13360,7 @@ func (c *ProjectsLocationsConnectionsListCall) PageToken(pageToken string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsListCall { +func (c *ProjectsLocationsClientGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14174,7 +13370,7 @@ func (c *ProjectsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *Pro // 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 *ProjectsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsListCall { +func (c *ProjectsLocationsClientGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsClientGatewaysListCall { c.ifNoneMatch_ = entityTag return c } @@ -14182,21 +13378,21 @@ func (c *ProjectsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsListCall { +func (c *ProjectsLocationsClientGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysListCall { 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 *ProjectsLocationsConnectionsListCall) Header() http.Header { +func (c *ProjectsLocationsClientGatewaysListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientGatewaysListCall) 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_ { @@ -14209,7 +13405,7 @@ func (c *ProjectsLocationsConnectionsListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/connections") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clientGateways") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14222,14 +13418,14 @@ func (c *ProjectsLocationsConnectionsListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connections.list" call. -// Exactly one of *ListConnectionsResponse or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *ListConnectionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.clientGateways.list" call. +// Exactly one of *ListClientGatewaysResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListClientGatewaysResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { +func (c *ProjectsLocationsClientGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListClientGatewaysResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14248,7 +13444,7 @@ func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListConnectionsResponse{ + ret := &ListClientGatewaysResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14260,46 +13456,46 @@ func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Lists Connections in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections", + // "description": "Lists ClientGateways in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.connections.list", + // "id": "beyondcorp.projects.locations.clientGateways.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "filter": { - // "description": "Optional. A filter specifying constraints of a list operation.", + // "description": "Optional. Filtering results.", // "location": "query", // "type": "string" // }, // "orderBy": { - // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + // "description": "Optional. Hint for how to order the results.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous ListConnectionsRequest, if any.", + // "description": "Optional. A token identifying a page of results the server should return.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the connection location using the form: `projects/{project_id}/locations/{location_id}`", + // "description": "Required. Parent value for ListClientGatewaysRequest.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/connections", + // "path": "v1alpha/{+parent}/clientGateways", // "response": { - // "$ref": "ListConnectionsResponse" + // "$ref": "ListClientGatewaysResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14311,7 +13507,7 @@ func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error { +func (c *ProjectsLocationsClientGatewaysListCall) Pages(ctx context.Context, f func(*ListClientGatewaysResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -14329,75 +13525,186 @@ func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func } } -// method id "beyondcorp.projects.locations.connections.patch": +// method id "beyondcorp.projects.locations.clientGateways.setIamPolicy": -type ProjectsLocationsConnectionsPatchCall struct { - s *Service - name string - connection *Connection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsClientGatewaysSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single Connection. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // -// - name: Unique resource name of the connection. The name is ignored -// when creating a connection. -func (r *ProjectsLocationsConnectionsService) Patch(name string, connection *Connection) *ProjectsLocationsConnectionsPatchCall { - c := &ProjectsLocationsConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.connection = connection +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientGatewaysService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsClientGatewaysSetIamPolicyCall { + c := &ProjectsLocationsClientGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } -// AllowMissing sets the optional parameter "allowMissing": If set as -// true, will create the resource if it is not found. -func (c *ProjectsLocationsConnectionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsConnectionsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsConnectionsPatchCall) RequestId(requestId string) *ProjectsLocationsConnectionsPatchCall { - c.urlParams_.Set("requestId", requestId) +// 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 *ProjectsLocationsClientGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysSetIamPolicyCall { + c.ctx_ = ctx return c } -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. At least one path must be supplied in this -// field. The elements of the repeated paths field may only include -// these fields from [BeyondCorp.Connection]: * `labels` * -// `display_name` * `application_endpoint` * `connectors` -func (c *ProjectsLocationsConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) + 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, "v1alpha/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.clientGateways.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsClientGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.clientGateways.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "GoogleIamV1Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "beyondcorp.projects.locations.clientGateways.testIamPermissions": + +type ProjectsLocationsClientGatewaysTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsConnectionsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsClientGatewaysService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsClientGatewaysTestIamPermissionsCall { + c := &ProjectsLocationsClientGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsPatchCall { +func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsClientGatewaysTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14405,21 +13712,21 @@ func (c *ProjectsLocationsConnectionsPatchCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsPatchCall { +func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsClientGatewaysTestIamPermissionsCall { 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 *ProjectsLocationsConnectionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) 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_ { @@ -14427,34 +13734,35 @@ func (c *ProjectsLocationsConnectionsPatchCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) 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, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connections.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.clientGateways.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsClientGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14473,7 +13781,7 @@ func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14485,49 +13793,28 @@ func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates the parameters of a single Connection.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", - // "httpMethod": "PATCH", - // "id": "beyondcorp.projects.locations.connections.patch", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clientGateways/{clientGatewaysId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.clientGateways.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "allowMissing": { - // "description": "Optional. If set as true, will create the resource if it is not found.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "Required. Unique resource name of the connection. The name is ignored when creating a connection.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/clientGateways/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.Connection]: * `labels` * `display_name` * `application_endpoint` * `connectors`", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+resource}:testIamPermissions", // "request": { - // "$ref": "Connection" + // "$ref": "GoogleIamV1TestIamPermissionsRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14536,109 +13823,106 @@ func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) } -// method id "beyondcorp.projects.locations.connections.resolve": +// method id "beyondcorp.projects.locations.connections.create": -type ProjectsLocationsConnectionsResolveCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectionsCreateCall struct { + s *Service + parent string + connection *Connection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resolve: Resolves connections details for a given connector. An -// internal method called by a connector to find connections to connect -// to. +// Create: Creates a new Connection in a given project and location. // -// - parent: The resource name of the connection location using the -// form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsConnectionsService) Resolve(parent string) *ProjectsLocationsConnectionsResolveCall { - c := &ProjectsLocationsConnectionsResolveCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource project name of the connection location using +// the form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsConnectionsService) Create(parent string, connection *Connection) *ProjectsLocationsConnectionsCreateCall { + c := &ProjectsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.connection = connection return c } -// ConnectorId sets the optional parameter "connectorId": Required. -// BeyondCorp Connector name of the connector associated with those -// connections using the form: -// `projects/{project_id}/locations/{location_id}/connectors/{connector_i -// d}` -func (c *ProjectsLocationsConnectionsResolveCall) ConnectorId(connectorId string) *ProjectsLocationsConnectionsResolveCall { - c.urlParams_.Set("connectorId", connectorId) +// ConnectionId sets the optional parameter "connectionId": +// User-settable connection resource ID. * Must start with a letter. * +// Must contain between 4-63 characters from `/a-z-/`. * Must end with a +// number or a letter. +func (c *ProjectsLocationsConnectionsCreateCall) ConnectionId(connectionId string) *ProjectsLocationsConnectionsCreateCall { + c.urlParams_.Set("connectionId", connectionId) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If not specified, a default value of 50 will be -// used by the service. Regardless of the page_size value, the response -// may include a partial list and a caller should only rely on -// response's next_page_token to determine if there are more instances -// left to be queried. -func (c *ProjectsLocationsConnectionsResolveCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsResolveCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsConnectionsCreateCall) RequestId(requestId string) *ProjectsLocationsConnectionsCreateCall { + c.urlParams_.Set("requestId", requestId) return c } -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous -// ResolveConnectionsResponse, if any. -func (c *ProjectsLocationsConnectionsResolveCall) PageToken(pageToken string) *ProjectsLocationsConnectionsResolveCall { - c.urlParams_.Set("pageToken", pageToken) +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsConnectionsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionsResolveCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsResolveCall { +func (c *ProjectsLocationsConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsCreateCall { 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 *ProjectsLocationsConnectionsResolveCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsResolveCall { - 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 *ProjectsLocationsConnectionsResolveCall) Context(ctx context.Context) *ProjectsLocationsConnectionsResolveCall { +func (c *ProjectsLocationsConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsCreateCall { 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 *ProjectsLocationsConnectionsResolveCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionsResolveCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsCreateCall) 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.connection) + 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, "v1alpha/{+parent}/connections:resolve") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/connections") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -14649,14 +13933,14 @@ func (c *ProjectsLocationsConnectionsResolveCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connections.resolve" call. -// Exactly one of *ResolveConnectionsResponse or error will be non-nil. +// Do executes the "beyondcorp.projects.locations.connections.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either -// *ResolveConnectionsResponse.ServerResponse.Header or (if a response +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionsResolveCall) Do(opts ...googleapi.CallOption) (*ResolveConnectionsResponse, error) { +func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14675,7 +13959,7 @@ func (c *ProjectsLocationsConnectionsResolveCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ResolveConnectionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14685,43 +13969,45 @@ func (c *ProjectsLocationsConnectionsResolveCall) Do(opts ...googleapi.CallOptio if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil - // { - // "description": "Resolves connections details for a given connector. An internal method called by a connector to find connections to connect to.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections:resolve", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.connections.resolve", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "connectorId": { - // "description": "Required. BeyondCorp Connector name of the connector associated with those connections using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector_id}`", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous ResolveConnectionsResponse, if any.", + return ret, nil + // { + // "description": "Creates a new Connection in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.connections.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "connectionId": { + // "description": "Optional. User-settable connection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the connection location using the form: `projects/{project_id}/locations/{location_id}`", + // "description": "Required. The resource project name of the connection location using the form: `projects/{project_id}/locations/{location_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/connections:resolve", + // "path": "v1alpha/{+parent}/connections", + // "request": { + // "$ref": "Connection" + // }, // "response": { - // "$ref": "ResolveConnectionsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14730,57 +14016,57 @@ func (c *ProjectsLocationsConnectionsResolveCall) Do(opts ...googleapi.CallOptio } -// 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 *ProjectsLocationsConnectionsResolveCall) Pages(ctx context.Context, f func(*ResolveConnectionsResponse) 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 "beyondcorp.projects.locations.connections.delete": + +type ProjectsLocationsConnectionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// method id "beyondcorp.projects.locations.connections.setIamPolicy": +// Delete: Deletes a single Connection. +// +// - name: BeyondCorp Connector name using the form: +// `projects/{project_id}/locations/{location_id}/connections/{connecti +// on_id}`. +func (r *ProjectsLocationsConnectionsService) Delete(name string) *ProjectsLocationsConnectionsDeleteCall { + c := &ProjectsLocationsConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} -type ProjectsLocationsConnectionsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsConnectionsDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectionsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. -// -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsConnectionsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsConnectionsSetIamPolicyCall { - c := &ProjectsLocationsConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsConnectionsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsSetIamPolicyCall { +func (c *ProjectsLocationsConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14788,21 +14074,21 @@ func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Fields(s ...googleapi.Fie // 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 *ProjectsLocationsConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsSetIamPolicyCall { +func (c *ProjectsLocationsConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsDeleteCall { 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 *ProjectsLocationsConnectionsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsDeleteCall) 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_ { @@ -14810,34 +14096,29 @@ func (c *ProjectsLocationsConnectionsSetIamPolicyCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - 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, "v1alpha/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connections.setIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.connections.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14856,7 +14137,7 @@ func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14868,28 +14149,35 @@ func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.connections.setIamPolicy", + // "description": "Deletes a single Connection.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "httpMethod": "DELETE", + // "id": "beyondcorp.projects.locations.connections.delete", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connections/{connection_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14898,97 +14186,97 @@ func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Do(opts ...googleapi.Call } -// method id "beyondcorp.projects.locations.connections.testIamPermissions": +// method id "beyondcorp.projects.locations.connections.get": -type ProjectsLocationsConnectionsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// Get: Gets details of a single Connection. // -// - resource: REQUIRED: The resource for which the policy detail is -// being requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsConnectionsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsConnectionsTestIamPermissionsCall { - c := &ProjectsLocationsConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest +// - name: BeyondCorp Connection name using the form: +// `projects/{project_id}/locations/{location_id}/connections/{connecti +// on_id}`. +func (r *ProjectsLocationsConnectionsService) Get(name string) *ProjectsLocationsConnectionsGetCall { + c := &ProjectsLocationsConnectionsGetCall{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 *ProjectsLocationsConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsTestIamPermissionsCall { +func (c *ProjectsLocationsConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetCall { 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 *ProjectsLocationsConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetCall { + 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 *ProjectsLocationsConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsTestIamPermissionsCall { +func (c *ProjectsLocationsConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetCall { 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 *ProjectsLocationsConnectionsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsGetCall) 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.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "beyondcorp.projects.locations.connections.testIamPermissions" call. -// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.connections.get" call. +// Exactly one of *Connection or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Connection.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) (*Connection, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15007,7 +14295,7 @@ func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &Connection{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15019,28 +14307,25 @@ func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleap } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.connections.testIamPermissions", + // "description": "Gets details of a single Connection.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.connections.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. BeyondCorp Connection name using the form: `projects/{project_id}/locations/{location_id}/connections/{connection_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "Connection" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15049,124 +14334,118 @@ func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleap } -// method id "beyondcorp.projects.locations.connectors.create": +// method id "beyondcorp.projects.locations.connections.getIamPolicy": -type ProjectsLocationsConnectorsCreateCall struct { - s *Service - parent string - connector *Connector - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectionsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Connector in a given project and location. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - parent: The resource project name of the connector location using -// the form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsConnectorsService) Create(parent string, connector *Connector) *ProjectsLocationsConnectorsCreateCall { - c := &ProjectsLocationsConnectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.connector = connector - return c -} - -// ConnectorId sets the optional parameter "connectorId": User-settable -// connector resource ID. * Must start with a letter. * Must contain -// between 4-63 characters from `/a-z-/`. * Must end with a number or a -// letter. -func (c *ProjectsLocationsConnectorsCreateCall) ConnectorId(connectorId string) *ProjectsLocationsConnectorsCreateCall { - c.urlParams_.Set("connectorId", connectorId) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsConnectorsCreateCall) RequestId(requestId string) *ProjectsLocationsConnectorsCreateCall { - c.urlParams_.Set("requestId", requestId) +// - 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 *ProjectsLocationsConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsConnectionsGetIamPolicyCall { + c := &ProjectsLocationsConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsConnectorsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectorsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// 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 *ProjectsLocationsConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectionsGetIamPolicyCall { + 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 *ProjectsLocationsConnectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsCreateCall { +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetIamPolicyCall { 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 *ProjectsLocationsConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetIamPolicyCall { + 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 *ProjectsLocationsConnectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectorsCreateCall { +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetIamPolicyCall { 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 *ProjectsLocationsConnectorsCreateCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) 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.connector) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/connectors") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.connections.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15185,7 +14464,7 @@ func (c *ProjectsLocationsConnectorsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15197,43 +14476,31 @@ func (c *ProjectsLocationsConnectorsCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a new Connector in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.connectors.create", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.connections.getIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "connectorId": { - // "description": "Optional. User-settable connector resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", + // "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": "string" + // "type": "integer" // }, - // "parent": { - // "description": "Required. The resource project name of the connector location using the form: `projects/{project_id}/locations/{location_id}`", + // "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/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/connectors", - // "request": { - // "$ref": "Connector" - // }, + // "path": "v1alpha/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15242,109 +14509,131 @@ func (c *ProjectsLocationsConnectorsCreateCall) Do(opts ...googleapi.CallOption) } -// method id "beyondcorp.projects.locations.connectors.delete": +// method id "beyondcorp.projects.locations.connections.list": -type ProjectsLocationsConnectorsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single Connector. +// List: Lists Connections in a given project and location. // -// - name: BeyondCorp Connector name using the form: -// `projects/{project_id}/locations/{location_id}/connectors/{connector -// _id}`. -func (r *ProjectsLocationsConnectorsService) Delete(name string) *ProjectsLocationsConnectorsDeleteCall { - c := &ProjectsLocationsConnectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the connection location using the +// form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsConnectionsService) List(parent string) *ProjectsLocationsConnectionsListCall { + c := &ProjectsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes after the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsConnectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectorsDeleteCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter specifying +// constraints of a list operation. +func (c *ProjectsLocationsConnectionsListCall) Filter(filter string) *ProjectsLocationsConnectionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specifies the ordering +// of results. See Sorting order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order) +// for more information. +func (c *ProjectsLocationsConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsConnectionsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsConnectorsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectorsDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 50 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's next_page_token to determine if there are more instances +// left to be queried. +func (c *ProjectsLocationsConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous +// ListConnectionsRequest, if any. +func (c *ProjectsLocationsConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsListCall { + 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 *ProjectsLocationsConnectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsDeleteCall { +func (c *ProjectsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsListCall { 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 *ProjectsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsListCall { + 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 *ProjectsLocationsConnectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectorsDeleteCall { +func (c *ProjectsLocationsConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsListCall { 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 *ProjectsLocationsConnectorsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/connections") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.connections.list" call. +// Exactly one of *ListConnectionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListConnectionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15363,7 +14652,7 @@ func (c *ProjectsLocationsConnectorsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &ListConnectionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15375,35 +14664,46 @@ func (c *ProjectsLocationsConnectorsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a single Connector.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", - // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.connectors.delete", + // "description": "Lists Connections in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.connections.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector_id}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", - // "required": true, + // "filter": { + // "description": "Optional. A filter specifying constraints of a list operation.", + // "location": "query", // "type": "string" // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he 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).", + // "orderBy": { + // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", // "location": "query", // "type": "string" // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "pageSize": { + // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + // "format": "int32", // "location": "query", - // "type": "boolean" + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. The next_page_token value returned from a previous ListConnectionsRequest, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the connection location using the form: `projects/{project_id}/locations/{location_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/connections", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "ListConnectionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15412,79 +14712,135 @@ func (c *ProjectsLocationsConnectorsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "beyondcorp.projects.locations.connectors.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsConnectorsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "beyondcorp.projects.locations.connections.patch": + +type ProjectsLocationsConnectionsPatchCall struct { + s *Service + name string + connection *Connection + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single Connector. +// Patch: Updates the parameters of a single Connection. // -// - name: BeyondCorp Connector name using the form: -// `projects/{project_id}/locations/{location_id}/connectors/{connector -// _id}`. -func (r *ProjectsLocationsConnectorsService) Get(name string) *ProjectsLocationsConnectorsGetCall { - c := &ProjectsLocationsConnectorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Unique resource name of the connection. The name is ignored +// when creating a connection. +func (r *ProjectsLocationsConnectionsService) Patch(name string, connection *Connection) *ProjectsLocationsConnectionsPatchCall { + c := &ProjectsLocationsConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.connection = connection + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set as +// true, will create the resource if it is not found. +func (c *ProjectsLocationsConnectionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsConnectionsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsConnectionsPatchCall) RequestId(requestId string) *ProjectsLocationsConnectionsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. At least one path must be supplied in this +// field. The elements of the repeated paths field may only include +// these fields from [BeyondCorp.Connection]: * `labels` * +// `display_name` * `application_endpoint` * `connectors` +func (c *ProjectsLocationsConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsConnectionsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsGetCall { +func (c *ProjectsLocationsConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsPatchCall { 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 *ProjectsLocationsConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectorsGetCall { - 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 *ProjectsLocationsConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectorsGetCall { +func (c *ProjectsLocationsConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsPatchCall { 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 *ProjectsLocationsConnectorsGetCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsPatchCall) 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.connection) + 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, "v1alpha/{+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 } @@ -15495,14 +14851,14 @@ func (c *ProjectsLocationsConnectorsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.get" call. -// Exactly one of *Connector or error will be non-nil. Any non-2xx -// status code is an error. Response headers are in either -// *Connector.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified -// to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsGetCall) Do(opts ...googleapi.CallOption) (*Connector, error) { +// Do executes the "beyondcorp.projects.locations.connections.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15521,7 +14877,7 @@ func (c *ProjectsLocationsConnectorsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Connector{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15533,25 +14889,49 @@ func (c *ProjectsLocationsConnectorsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets details of a single Connector.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.connectors.get", + // "description": "Updates the parameters of a single Connection.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", + // "httpMethod": "PATCH", + // "id": "beyondcorp.projects.locations.connections.patch", // "parameterOrder": [ // "name" // ], // "parameters": { + // "allowMissing": { + // "description": "Optional. If set as true, will create the resource if it is not found.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector_id}`", + // "description": "Required. Unique resource name of the connection. The name is ignored when creating a connection.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.Connection]: * `labels` * `display_name` * `application_endpoint` * `connectors`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "Connection" + // }, // "response": { - // "$ref": "Connector" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15560,53 +14940,62 @@ func (c *ProjectsLocationsConnectorsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "beyondcorp.projects.locations.connectors.getIamPolicy": +// method id "beyondcorp.projects.locations.connections.resolve": -type ProjectsLocationsConnectorsGetIamPolicyCall struct { +type ProjectsLocationsConnectionsResolveCall struct { s *Service - resource string + parent 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. +// Resolve: Resolves connections details for a given connector. An +// internal method called by a connector to find connections to connect +// to. // -// - 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 *ProjectsLocationsConnectorsService) GetIamPolicy(resource string) *ProjectsLocationsConnectorsGetIamPolicyCall { - c := &ProjectsLocationsConnectorsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the connection location using the +// form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsConnectionsService) Resolve(parent string) *ProjectsLocationsConnectionsResolveCall { + c := &ProjectsLocationsConnectionsResolveCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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 *ProjectsLocationsConnectorsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectorsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// ConnectorId sets the optional parameter "connectorId": Required. +// BeyondCorp Connector name of the connector associated with those +// connections using the form: +// `projects/{project_id}/locations/{location_id}/connectors/{connector_i +// d}` +func (c *ProjectsLocationsConnectionsResolveCall) ConnectorId(connectorId string) *ProjectsLocationsConnectionsResolveCall { + c.urlParams_.Set("connectorId", connectorId) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 50 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's next_page_token to determine if there are more instances +// left to be queried. +func (c *ProjectsLocationsConnectionsResolveCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsResolveCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous +// ResolveConnectionsResponse, if any. +func (c *ProjectsLocationsConnectionsResolveCall) PageToken(pageToken string) *ProjectsLocationsConnectionsResolveCall { + 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 *ProjectsLocationsConnectorsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsGetIamPolicyCall { +func (c *ProjectsLocationsConnectionsResolveCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsResolveCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15616,7 +15005,7 @@ func (c *ProjectsLocationsConnectorsGetIamPolicyCall) Fields(s ...googleapi.Fiel // 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 *ProjectsLocationsConnectorsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectorsGetIamPolicyCall { +func (c *ProjectsLocationsConnectionsResolveCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsResolveCall { c.ifNoneMatch_ = entityTag return c } @@ -15624,21 +15013,21 @@ func (c *ProjectsLocationsConnectorsGetIamPolicyCall) IfNoneMatch(entityTag stri // 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 *ProjectsLocationsConnectorsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectorsGetIamPolicyCall { +func (c *ProjectsLocationsConnectionsResolveCall) Context(ctx context.Context) *ProjectsLocationsConnectionsResolveCall { 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 *ProjectsLocationsConnectorsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsResolveCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsResolveCall) 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_ { @@ -15651,7 +15040,7 @@ func (c *ProjectsLocationsConnectorsGetIamPolicyCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/connections:resolve") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15659,19 +15048,19 @@ func (c *ProjectsLocationsConnectorsGetIamPolicyCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.getIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.connections.resolve" call. +// Exactly one of *ResolveConnectionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ResolveConnectionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsConnectionsResolveCall) Do(opts ...googleapi.CallOption) (*ResolveConnectionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15690,7 +15079,7 @@ func (c *ProjectsLocationsConnectorsGetIamPolicyCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &ResolveConnectionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15702,31 +15091,41 @@ func (c *ProjectsLocationsConnectorsGetIamPolicyCall) Do(opts ...googleapi.CallO } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:getIamPolicy", + // "description": "Resolves connections details for a given connector. An internal method called by a connector to find connections to connect to.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections:resolve", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.connectors.getIamPolicy", + // "id": "beyondcorp.projects.locations.connections.resolve", // "parameterOrder": [ - // "resource" + // "parent" // ], // "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).", + // "connectorId": { + // "description": "Required. BeyondCorp Connector name of the connector associated with those connections using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector_id}`", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", // "format": "int32", // "location": "query", // "type": "integer" // }, - // "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.", + // "pageToken": { + // "description": "Optional. The next_page_token value returned from a previous ResolveConnectionsResponse, if any.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the connection location using the form: `projects/{project_id}/locations/{location_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:getIamPolicy", + // "path": "v1alpha/{+parent}/connections:resolve", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "ResolveConnectionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15735,131 +15134,114 @@ func (c *ProjectsLocationsConnectorsGetIamPolicyCall) Do(opts ...googleapi.CallO } -// method id "beyondcorp.projects.locations.connectors.list": - -type ProjectsLocationsConnectorsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Connectors in a given project and location. -// -// - parent: The resource name of the connector location using the form: -// `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsConnectorsService) List(parent string) *ProjectsLocationsConnectorsListCall { - c := &ProjectsLocationsConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter specifying -// constraints of a list operation. -func (c *ProjectsLocationsConnectorsListCall) Filter(filter string) *ProjectsLocationsConnectorsListCall { - c.urlParams_.Set("filter", filter) - return c +// 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 *ProjectsLocationsConnectionsResolveCall) Pages(ctx context.Context, f func(*ResolveConnectionsResponse) 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) + } } -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results. See Sorting order -// (https://cloud.google.com/apis/design/design_patterns#sorting_order) -// for more information. -func (c *ProjectsLocationsConnectorsListCall) OrderBy(orderBy string) *ProjectsLocationsConnectorsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} +// method id "beyondcorp.projects.locations.connections.setIamPolicy": -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If not specified, a default value of 50 will be -// used by the service. Regardless of the page_size value, the response -// may include a partial list and a caller should only rely on -// response's next_page_token to determine if there are more instances -// left to be queried. -func (c *ProjectsLocationsConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectorsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsConnectionsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous ListConnectorsRequest, -// if any. -func (c *ProjectsLocationsConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsConnectorsListCall { - c.urlParams_.Set("pageToken", pageToken) +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectionsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsConnectionsSetIamPolicyCall { + c := &ProjectsLocationsConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsListCall { - 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 *ProjectsLocationsConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectorsListCall { - c.ifNoneMatch_ = entityTag +// for more information. +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsSetIamPolicyCall { + 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 *ProjectsLocationsConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsConnectorsListCall { +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsSetIamPolicyCall { 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 *ProjectsLocationsConnectorsListCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) 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.googleiamv1setiampolicyrequest) + 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, "v1alpha/{+parent}/connectors") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.list" call. -// Exactly one of *ListConnectorsResponse or error will be non-nil. Any +// Do executes the "beyondcorp.projects.locations.connections.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *ListConnectorsResponse.ServerResponse.Header or (if a response was +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsListCall) Do(opts ...googleapi.CallOption) (*ListConnectorsResponse, error) { +func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15878,7 +15260,7 @@ func (c *ProjectsLocationsConnectorsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ListConnectorsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15890,46 +15272,28 @@ func (c *ProjectsLocationsConnectorsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists Connectors in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.connectors.list", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.connections.setIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "filter": { - // "description": "Optional. A filter specifying constraints of a list operation.", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous ListConnectorsRequest, if any.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of the connector location using the form: `projects/{project_id}/locations/{location_id}`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/connectors", + // "path": "v1alpha/{+resource}:setIamPolicy", + // "request": { + // "$ref": "GoogleIamV1SetIamPolicyRequest" + // }, // "response": { - // "$ref": "ListConnectorsResponse" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15938,88 +15302,39 @@ func (c *ProjectsLocationsConnectorsListCall) Do(opts ...googleapi.CallOption) ( } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsConnectorsListCall) Pages(ctx context.Context, f func(*ListConnectorsResponse) 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 "beyondcorp.projects.locations.connectors.patch": +// method id "beyondcorp.projects.locations.connections.testIamPermissions": -type ProjectsLocationsConnectorsPatchCall struct { - s *Service - name string - connector *Connector - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectionsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single Connector. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - name: Unique resource name of the connector. The name is ignored -// when creating a connector. -func (r *ProjectsLocationsConnectorsService) Patch(name string, connector *Connector) *ProjectsLocationsConnectorsPatchCall { - c := &ProjectsLocationsConnectorsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.connector = connector - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsConnectorsPatchCall) RequestId(requestId string) *ProjectsLocationsConnectorsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. At least one path must be supplied in this -// field. The elements of the repeated paths field may only include -// these fields from [BeyondCorp.Connector]: * `labels` * `display_name` -func (c *ProjectsLocationsConnectorsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectorsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsConnectorsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectorsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectionsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsConnectionsTestIamPermissionsCall { + c := &ProjectsLocationsConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectorsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsPatchCall { +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16027,21 +15342,21 @@ func (c *ProjectsLocationsConnectorsPatchCall) Fields(s ...googleapi.Field) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsConnectorsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectorsPatchCall { +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsTestIamPermissionsCall { 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 *ProjectsLocationsConnectorsPatchCall) Header() http.Header { +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) 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_ { @@ -16049,34 +15364,35 @@ func (c *ProjectsLocationsConnectorsPatchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.connector) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) 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, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.connections.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16095,7 +15411,7 @@ func (c *ProjectsLocationsConnectorsPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16107,44 +15423,28 @@ func (c *ProjectsLocationsConnectorsPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates the parameters of a single Connector.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", - // "httpMethod": "PATCH", - // "id": "beyondcorp.projects.locations.connectors.patch", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.connections.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. Unique resource name of the connector. The name is ignored when creating a connector.", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.Connector]: * `labels` * `display_name`", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+resource}:testIamPermissions", // "request": { - // "$ref": "Connector" + // "$ref": "GoogleIamV1TestIamPermissionsRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16153,33 +15453,67 @@ func (c *ProjectsLocationsConnectorsPatchCall) Do(opts ...googleapi.CallOption) } -// method id "beyondcorp.projects.locations.connectors.reportStatus": +// method id "beyondcorp.projects.locations.connectors.create": + +type ProjectsLocationsConnectorsCreateCall struct { + s *Service + parent string + connector *Connector + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Connector in a given project and location. +// +// - parent: The resource project name of the connector location using +// the form: `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsConnectorsService) Create(parent string, connector *Connector) *ProjectsLocationsConnectorsCreateCall { + c := &ProjectsLocationsConnectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.connector = connector + return c +} + +// ConnectorId sets the optional parameter "connectorId": User-settable +// connector resource ID. * Must start with a letter. * Must contain +// between 4-63 characters from `/a-z-/`. * Must end with a number or a +// letter. +func (c *ProjectsLocationsConnectorsCreateCall) ConnectorId(connectorId string) *ProjectsLocationsConnectorsCreateCall { + c.urlParams_.Set("connectorId", connectorId) + return c +} -type ProjectsLocationsConnectorsReportStatusCall struct { - s *Service - connector string - reportstatusrequest *ReportStatusRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsConnectorsCreateCall) RequestId(requestId string) *ProjectsLocationsConnectorsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c } -// ReportStatus: Report status for a given connector. -// -// - connector: BeyondCorp Connector name using the form: -// `projects/{project_id}/locations/{location_id}/connectors/{connector -// }`. -func (r *ProjectsLocationsConnectorsService) ReportStatus(connector string, reportstatusrequest *ReportStatusRequest) *ProjectsLocationsConnectorsReportStatusCall { - c := &ProjectsLocationsConnectorsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.connector = connector - c.reportstatusrequest = reportstatusrequest +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsConnectorsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectorsCreateCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectorsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsReportStatusCall { +func (c *ProjectsLocationsConnectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16187,21 +15521,21 @@ func (c *ProjectsLocationsConnectorsReportStatusCall) Fields(s ...googleapi.Fiel // 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 *ProjectsLocationsConnectorsReportStatusCall) Context(ctx context.Context) *ProjectsLocationsConnectorsReportStatusCall { +func (c *ProjectsLocationsConnectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectorsCreateCall { 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 *ProjectsLocationsConnectorsReportStatusCall) Header() http.Header { +func (c *ProjectsLocationsConnectorsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsReportStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectorsCreateCall) 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_ { @@ -16209,14 +15543,14 @@ func (c *ProjectsLocationsConnectorsReportStatusCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.reportstatusrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.connector) 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, "v1alpha/{+connector}:reportStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/connectors") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -16224,19 +15558,19 @@ func (c *ProjectsLocationsConnectorsReportStatusCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "connector": c.connector, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.reportStatus" call. +// Do executes the "beyondcorp.projects.locations.connectors.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsReportStatusCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsConnectorsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16267,25 +15601,40 @@ func (c *ProjectsLocationsConnectorsReportStatusCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Report status for a given connector.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:reportStatus", + // "description": "Creates a new Connector in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.connectors.reportStatus", + // "id": "beyondcorp.projects.locations.connectors.create", // "parameterOrder": [ - // "connector" + // "parent" // ], // "parameters": { - // "connector": { - // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector}`", + // "connectorId": { + // "description": "Optional. User-settable connector resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource project name of the connector location using the form: `projects/{project_id}/locations/{location_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+connector}:reportStatus", + // "path": "v1alpha/{+parent}/connectors", // "request": { - // "$ref": "ReportStatusRequest" + // "$ref": "Connector" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -16297,99 +15646,109 @@ func (c *ProjectsLocationsConnectorsReportStatusCall) Do(opts ...googleapi.CallO } -// method id "beyondcorp.projects.locations.connectors.resolveInstanceConfig": +// method id "beyondcorp.projects.locations.connectors.delete": -type ProjectsLocationsConnectorsResolveInstanceConfigCall struct { - s *Service - connector string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectorsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ResolveInstanceConfig: Gets instance configuration for a given -// connector. An internal method called by a connector to get its -// container config. +// Delete: Deletes a single Connector. // -// - connector: BeyondCorp Connector name using the form: +// - name: BeyondCorp Connector name using the form: // `projects/{project_id}/locations/{location_id}/connectors/{connector -// }`. -func (r *ProjectsLocationsConnectorsService) ResolveInstanceConfig(connector string) *ProjectsLocationsConnectorsResolveInstanceConfigCall { - c := &ProjectsLocationsConnectorsResolveInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.connector = connector +// _id}`. +func (r *ProjectsLocationsConnectorsService) Delete(name string) *ProjectsLocationsConnectorsDeleteCall { + c := &ProjectsLocationsConnectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsConnectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectorsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsConnectorsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectorsDeleteCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsResolveInstanceConfigCall { +func (c *ProjectsLocationsConnectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsDeleteCall { 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 *ProjectsLocationsConnectorsResolveInstanceConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectorsResolveInstanceConfigCall { - 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 *ProjectsLocationsConnectorsResolveInstanceConfigCall) Context(ctx context.Context) *ProjectsLocationsConnectorsResolveInstanceConfigCall { +func (c *ProjectsLocationsConnectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectorsDeleteCall { 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 *ProjectsLocationsConnectorsResolveInstanceConfigCall) Header() http.Header { +func (c *ProjectsLocationsConnectorsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectorsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+connector}:resolveInstanceConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "connector": c.connector, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.resolveInstanceConfig" call. -// Exactly one of *ResolveInstanceConfigResponse or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *ResolveInstanceConfigResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.connectors.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) Do(opts ...googleapi.CallOption) (*ResolveInstanceConfigResponse, error) { +func (c *ProjectsLocationsConnectorsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16408,7 +15767,7 @@ func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &ResolveInstanceConfigResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16420,25 +15779,35 @@ func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) Do(opts ...google } return ret, nil // { - // "description": "Gets instance configuration for a given connector. An internal method called by a connector to get its container config.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:resolveInstanceConfig", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.connectors.resolveInstanceConfig", + // "description": "Deletes a single Connector.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", + // "httpMethod": "DELETE", + // "id": "beyondcorp.projects.locations.connectors.delete", // "parameterOrder": [ - // "connector" + // "name" // ], // "parameters": { - // "connector": { - // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector}`", + // "name": { + // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1alpha/{+connector}:resolveInstanceConfig", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "ResolveInstanceConfigResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16447,93 +15816,97 @@ func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) Do(opts ...google } -// method id "beyondcorp.projects.locations.connectors.setIamPolicy": +// method id "beyondcorp.projects.locations.connectors.get": -type ProjectsLocationsConnectorsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectorsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified -// resource. Replaces any existing policy. Can return `NOT_FOUND`, -// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// Get: Gets details of a single Connector. // -// - resource: REQUIRED: The resource for which the policy is being -// specified. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the -// appropriate value for this field. -func (r *ProjectsLocationsConnectorsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsConnectorsSetIamPolicyCall { - c := &ProjectsLocationsConnectorsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: BeyondCorp Connector name using the form: +// `projects/{project_id}/locations/{location_id}/connectors/{connector +// _id}`. +func (r *ProjectsLocationsConnectorsService) Get(name string) *ProjectsLocationsConnectorsGetCall { + c := &ProjectsLocationsConnectorsGetCall{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 *ProjectsLocationsConnectorsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsSetIamPolicyCall { +func (c *ProjectsLocationsConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsGetCall { 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 *ProjectsLocationsConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectorsGetCall { + 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 *ProjectsLocationsConnectorsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectorsSetIamPolicyCall { +func (c *ProjectsLocationsConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectorsGetCall { 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 *ProjectsLocationsConnectorsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsConnectorsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectorsGetCall) 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.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.setIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// Do executes the "beyondcorp.projects.locations.connectors.get" call. +// Exactly one of *Connector or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Connector.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectorsGetCall) Do(opts ...googleapi.CallOption) (*Connector, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16552,7 +15925,7 @@ func (c *ProjectsLocationsConnectorsSetIamPolicyCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &Connector{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16564,28 +15937,25 @@ func (c *ProjectsLocationsConnectorsSetIamPolicyCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:setIamPolicy", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.connectors.setIamPolicy", + // "description": "Gets details of a single Connector.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.connectors.get", // "parameterOrder": [ - // "resource" + // "name" // ], // "parameters": { - // "resource": { - // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "name": { + // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:setIamPolicy", - // "request": { - // "$ref": "GoogleIamV1SetIamPolicyRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "Connector" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16594,78 +15964,100 @@ func (c *ProjectsLocationsConnectorsSetIamPolicyCall) Do(opts ...googleapi.CallO } -// method id "beyondcorp.projects.locations.connectors.testIamPermissions": +// method id "beyondcorp.projects.locations.connectors.getIamPolicy": -type ProjectsLocationsConnectorsTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectorsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the -// specified resource. If the resource does not exist, this will return -// an empty set of permissions, not a `NOT_FOUND` error. Note: This -// operation is designed to be used for building permission-aware UIs -// and command-line tools, not for authorization checking. This -// operation may "fail open" without warning. +// 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 detail is -// being requested. See Resource names +// - 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 *ProjectsLocationsConnectorsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsConnectorsTestIamPermissionsCall { - c := &ProjectsLocationsConnectorsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsConnectorsService) GetIamPolicy(resource string) *ProjectsLocationsConnectorsGetIamPolicyCall { + c := &ProjectsLocationsConnectorsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest + 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 *ProjectsLocationsConnectorsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectorsGetIamPolicyCall { + 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 *ProjectsLocationsConnectorsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsTestIamPermissionsCall { +func (c *ProjectsLocationsConnectorsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsGetIamPolicyCall { 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 *ProjectsLocationsConnectorsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectorsGetIamPolicyCall { + 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 *ProjectsLocationsConnectorsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectorsTestIamPermissionsCall { +func (c *ProjectsLocationsConnectorsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectorsGetIamPolicyCall { 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 *ProjectsLocationsConnectorsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsConnectorsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectorsGetIamPolicyCall) 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.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -16676,15 +16068,14 @@ func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.connectors.testIamPermissions" call. -// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.connectors.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsConnectorsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16703,7 +16094,7 @@ func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16715,28 +16106,31 @@ func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:testIamPermissions", - // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.connectors.testIamPermissions", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.connectors.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 detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "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/[^/]+/connectors/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:testIamPermissions", - // "request": { - // "$ref": "GoogleIamV1TestIamPermissionsRequest" - // }, + // "path": "v1alpha/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleIamV1TestIamPermissionsResponse" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16745,133 +16139,66 @@ func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Do(opts ...googleapi } -// method id "beyondcorp.projects.locations.insights.configuredInsight": - -type ProjectsLocationsInsightsConfiguredInsightCall struct { - s *Service - insight string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ConfiguredInsight: Gets the value for a selected particular insight -// based on the provided filters. Use the organization level path for -// fetching at org level and project level path for fetching the insight -// value specific to a particular project. -// -// - insight: The resource name of the insight using the form: -// `organizations/{organization_id}/locations/{location_id}/insights/{i -// nsight_id}` -// `projects/{project_id}/locations/{location_id}/insights/{insight_id} -// `. -func (r *ProjectsLocationsInsightsService) ConfiguredInsight(insight string) *ProjectsLocationsInsightsConfiguredInsightCall { - c := &ProjectsLocationsInsightsConfiguredInsightCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.insight = insight - return c -} - -// Aggregation sets the optional parameter "aggregation": Required. -// Aggregation type. Available aggregation could be fetched by calling -// insight list and get APIs in `BASIC` view. -// -// Possible values: -// -// "AGGREGATION_UNSPECIFIED" - Unspecified. -// "HOURLY" - Insight should be aggregated at hourly level. -// "DAILY" - Insight should be aggregated at daily level. -// "WEEKLY" - Insight should be aggregated at weekly level. -// "MONTHLY" - Insight should be aggregated at monthly level. -// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom -// -// date range passed in as the start and end time in the request. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Aggregation(aggregation string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("aggregation", aggregation) - return c -} - -// CustomGroupingFieldFilter sets the optional parameter -// "customGrouping.fieldFilter": Filterable parameters to be added to -// the grouping clause. Available fields could be fetched by calling -// insight list and get APIs in `BASIC` view. `=` is the only comparison -// operator supported. `AND` is the only logical operator supported. -// Usage: field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". -// NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` -// from `Insight.Metadata.Field` message for the filtering the -// corresponding fields in this filter field. (These expressions are -// based on the filter language described at -// https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingFieldFilter(customGroupingFieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("customGrouping.fieldFilter", customGroupingFieldFilter) - return c -} +// method id "beyondcorp.projects.locations.connectors.list": -// CustomGroupingGroupFields sets the optional parameter -// "customGrouping.groupFields": Required. Fields to be used for -// grouping. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` -// message for declaring the fields to be grouped-by here. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingGroupFields(customGroupingGroupFields ...string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.SetMulti("customGrouping.groupFields", append([]string{}, customGroupingGroupFields...)) - return c +type ProjectsLocationsConnectorsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// EndTime sets the optional parameter "endTime": Required. Ending time -// for the duration for which insight is to be pulled. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) EndTime(endTime string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("endTime", endTime) +// List: Lists Connectors in a given project and location. +// +// - parent: The resource name of the connector location using the form: +// `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsConnectorsService) List(parent string) *ProjectsLocationsConnectorsListCall { + c := &ProjectsLocationsConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// FieldFilter sets the optional parameter "fieldFilter": Other -// filterable/configurable parameters as applicable to the selected -// insight. Available fields could be fetched by calling insight list -// and get APIs in `BASIC` view. `=` is the only comparison operator -// supported. `AND` is the only logical operator supported. Usage: -// field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: -// Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from -// `Insight.Metadata.Field` message for the filtering the corresponding -// fields in this filter field. (These expressions are based on the -// filter language described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsConfiguredInsightCall) FieldFilter(fieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("fieldFilter", fieldFilter) +// Filter sets the optional parameter "filter": A filter specifying +// constraints of a list operation. +func (c *ProjectsLocationsConnectorsListCall) Filter(filter string) *ProjectsLocationsConnectorsListCall { + c.urlParams_.Set("filter", filter) return c } -// Group sets the optional parameter "group": Group id of the available -// groupings for the insight. Available groupings could be fetched by -// calling insight list and get APIs in `BASIC` view. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Group(group string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("group", group) +// OrderBy sets the optional parameter "orderBy": Specifies the ordering +// of results. See Sorting order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order) +// for more information. +func (c *ProjectsLocationsConnectorsListCall) OrderBy(orderBy string) *ProjectsLocationsConnectorsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageSize(pageSize int64) *ProjectsLocationsInsightsConfiguredInsightCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. If not specified, a default value of 50 will be +// used by the service. Regardless of the page_size value, the response +// may include a partial list and a caller should only rely on +// response's next_page_token to determine if there are more instances +// left to be queried. +func (c *ProjectsLocationsConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectorsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Used to fetch the -// page represented by the token. Fetches the first page when not set. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageToken(pageToken string) *ProjectsLocationsInsightsConfiguredInsightCall { +// PageToken sets the optional parameter "pageToken": The +// next_page_token value returned from a previous ListConnectorsRequest, +// if any. +func (c *ProjectsLocationsConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsConnectorsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// StartTime sets the optional parameter "startTime": Required. Starting -// time for the duration for which insight is to be pulled. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) StartTime(startTime string) *ProjectsLocationsInsightsConfiguredInsightCall { - c.urlParams_.Set("startTime", startTime) - 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 *ProjectsLocationsInsightsConfiguredInsightCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfiguredInsightCall { +func (c *ProjectsLocationsConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16881,7 +16208,7 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfiguredInsightCall { +func (c *ProjectsLocationsConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectorsListCall { c.ifNoneMatch_ = entityTag return c } @@ -16889,21 +16216,21 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) IfNoneMatch(entityTag s // 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 *ProjectsLocationsInsightsConfiguredInsightCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfiguredInsightCall { +func (c *ProjectsLocationsConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsConnectorsListCall { 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 *ProjectsLocationsInsightsConfiguredInsightCall) Header() http.Header { +func (c *ProjectsLocationsConnectorsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInsightsConfiguredInsightCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectorsListCall) 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_ { @@ -16916,7 +16243,7 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+insight}:configuredInsight") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/connectors") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16924,22 +16251,19 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "insight": c.insight, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.insights.configuredInsight" call. -// Exactly one of -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResp -// onse or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResp -// onse.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse, error) { +// Do executes the "beyondcorp.projects.locations.connectors.list" call. +// Exactly one of *ListConnectorsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListConnectorsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectorsListCall) Do(opts ...googleapi.CallOption) (*ListConnectorsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16958,7 +16282,7 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse{ + ret := &ListConnectorsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16970,90 +16294,46 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Gets the value for a selected particular insight based on the provided filters. Use the organization level path for fetching at org level and project level path for fetching the insight value specific to a particular project.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/insights/{insightsId}:configuredInsight", + // "description": "Lists Connectors in a given project and location.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.insights.configuredInsight", + // "id": "beyondcorp.projects.locations.connectors.list", // "parameterOrder": [ - // "insight" + // "parent" // ], // "parameters": { - // "aggregation": { - // "description": "Required. Aggregation type. Available aggregation could be fetched by calling insight list and get APIs in `BASIC` view.", - // "enum": [ - // "AGGREGATION_UNSPECIFIED", - // "HOURLY", - // "DAILY", - // "WEEKLY", - // "MONTHLY", - // "CUSTOM_DATE_RANGE" - // ], - // "enumDescriptions": [ - // "Unspecified.", - // "Insight should be aggregated at hourly level.", - // "Insight should be aggregated at daily level.", - // "Insight should be aggregated at weekly level.", - // "Insight should be aggregated at monthly level.", - // "Insight should be aggregated at the custom date range passed in as the start and end time in the request." - // ], - // "location": "query", - // "type": "string" - // }, - // "customGrouping.fieldFilter": { - // "description": "Optional. Filterable parameters to be added to the grouping clause. Available fields could be fetched by calling insight list and get APIs in `BASIC` view. `=` is the only comparison operator supported. `AND` is the only logical operator supported. Usage: field_filter=\"fieldName1=fieldVal1 AND fieldName2=fieldVal2\". NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for the filtering the corresponding fields in this filter field. (These expressions are based on the filter language described at https://google.aip.dev/160).", - // "location": "query", - // "type": "string" - // }, - // "customGrouping.groupFields": { - // "description": "Required. Fields to be used for grouping. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for declaring the fields to be grouped-by here.", - // "location": "query", - // "repeated": true, - // "type": "string" - // }, - // "endTime": { - // "description": "Required. Ending time for the duration for which insight is to be pulled.", - // "format": "google-datetime", - // "location": "query", - // "type": "string" - // }, - // "fieldFilter": { - // "description": "Optional. Other filterable/configurable parameters as applicable to the selected insight. Available fields could be fetched by calling insight list and get APIs in `BASIC` view. `=` is the only comparison operator supported. `AND` is the only logical operator supported. Usage: field_filter=\"fieldName1=fieldVal1 AND fieldName2=fieldVal2\". NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for the filtering the corresponding fields in this filter field. (These expressions are based on the filter language described at https://google.aip.dev/160).", + // "filter": { + // "description": "Optional. A filter specifying constraints of a list operation.", // "location": "query", // "type": "string" // }, - // "group": { - // "description": "Optional. Group id of the available groupings for the insight. Available groupings could be fetched by calling insight list and get APIs in `BASIC` view.", + // "orderBy": { + // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", // "location": "query", // "type": "string" // }, - // "insight": { - // "description": "Required. The resource name of the insight using the form: `organizations/{organization_id}/locations/{location_id}/insights/{insight_id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/insights/[^/]+$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. Used to fetch the page represented by the token. Fetches the first page when not set.", + // "description": "Optional. The next_page_token value returned from a previous ListConnectorsRequest, if any.", // "location": "query", // "type": "string" // }, - // "startTime": { - // "description": "Required. Starting time for the duration for which insight is to be pulled.", - // "format": "google-datetime", - // "location": "query", + // "parent": { + // "description": "Required. The resource name of the connector location using the form: `projects/{project_id}/locations/{location_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+insight}:configuredInsight", + // "path": "v1alpha/{+parent}/connectors", // "response": { - // "$ref": "GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse" + // "$ref": "ListConnectorsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17065,7 +16345,7 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.Ca // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsInsightsConfiguredInsightCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse) error) error { +func (c *ProjectsLocationsConnectorsListCall) Pages(ctx context.Context, f func(*ListConnectorsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -17083,108 +16363,106 @@ func (c *ProjectsLocationsInsightsConfiguredInsightCall) Pages(ctx context.Conte } } -// method id "beyondcorp.projects.locations.insights.get": +// method id "beyondcorp.projects.locations.connectors.patch": -type ProjectsLocationsInsightsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectorsPatchCall struct { + s *Service + name string + connector *Connector + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the value for a selected particular insight with default -// configuration. The default aggregation level is 'DAILY' and no -// grouping will be applied or default grouping if applicable. The data -// will be returned for recent 7 days starting the day before. The -// insight data size will be limited to 50 rows. Use the organization -// level path for fetching at org level and project level path for -// fetching the insight value specific to a particular project. Setting -// the `view` to `BASIC` will only return the metadata for the insight. +// Patch: Updates the parameters of a single Connector. // -// - name: The resource name of the insight using the form: -// `organizations/{organization_id}/locations/{location_id}/insights/{i -// nsight_id}` -// `projects/{project_id}/locations/{location_id}/insights/{insight_id} -// `. -func (r *ProjectsLocationsInsightsService) Get(name string) *ProjectsLocationsInsightsGetCall { - c := &ProjectsLocationsInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Unique resource name of the connector. The name is ignored +// when creating a connector. +func (r *ProjectsLocationsConnectorsService) Patch(name string, connector *Connector) *ProjectsLocationsConnectorsPatchCall { + c := &ProjectsLocationsConnectorsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.connector = connector + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsConnectorsPatchCall) RequestId(requestId string) *ProjectsLocationsConnectorsPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// of fields to update. At least one path must be supplied in this +// field. The elements of the repeated paths field may only include +// these fields from [BeyondCorp.Connector]: * `labels` * `display_name` +func (c *ProjectsLocationsConnectorsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectorsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } -// View sets the optional parameter "view": Required. Metadata only or -// full data view. -// -// Possible values: -// -// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API -// -// will default to the BASIC view. -// -// "BASIC" - Include basic metadata about the insight, but not the -// -// insight data. This is the default value (for both ListInsights and -// GetInsight). -// -// "FULL" - Include everything. -func (c *ProjectsLocationsInsightsGetCall) View(view string) *ProjectsLocationsInsightsGetCall { - c.urlParams_.Set("view", view) +// ValidateOnly sets the optional parameter "validateOnly": If set, +// validates request by executing a dry-run which would not alter the +// resource in any way. +func (c *ProjectsLocationsConnectorsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectorsPatchCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsInsightsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsGetCall { +func (c *ProjectsLocationsConnectorsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsPatchCall { 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 *ProjectsLocationsInsightsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsGetCall { - 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 *ProjectsLocationsInsightsGetCall) Context(ctx context.Context) *ProjectsLocationsInsightsGetCall { +func (c *ProjectsLocationsConnectorsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectorsPatchCall { 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 *ProjectsLocationsInsightsGetCall) Header() http.Header { +func (c *ProjectsLocationsConnectorsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInsightsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectorsPatchCall) 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.connector) + 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, "v1alpha/{+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 } @@ -17195,17 +16473,14 @@ func (c *ProjectsLocationsInsightsGetCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.insights.get" call. -// Exactly one of -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight.ServerRespons -// e.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight, error) { +// Do executes the "beyondcorp.projects.locations.connectors.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectorsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17224,7 +16499,7 @@ func (c *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17236,40 +16511,44 @@ func (c *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Gets the value for a selected particular insight with default configuration. The default aggregation level is 'DAILY' and no grouping will be applied or default grouping if applicable. The data will be returned for recent 7 days starting the day before. The insight data size will be limited to 50 rows. Use the organization level path for fetching at org level and project level path for fetching the insight value specific to a particular project. Setting the `view` to `BASIC` will only return the metadata for the insight.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/insights/{insightsId}", - // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.insights.get", + // "description": "Updates the parameters of a single Connector.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", + // "httpMethod": "PATCH", + // "id": "beyondcorp.projects.locations.connectors.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the insight using the form: `organizations/{organization_id}/locations/{location_id}/insights/{insight_id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}`", + // "description": "Required. Unique resource name of the connector. The name is ignored when creating a connector.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/insights/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", // "required": true, // "type": "string" // }, - // "view": { - // "description": "Required. Metadata only or full data view.", - // "enum": [ - // "INSIGHT_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "The default / unset value. The API will default to the BASIC view.", - // "Include basic metadata about the insight, but not the insight data. This is the default value (for both ListInsights and GetInsight).", - // "Include everything." - // ], + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.Connector]: * `labels` * `display_name`", + // "format": "google-fieldmask", // "location": "query", // "type": "string" + // }, + // "validateOnly": { + // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", + // "location": "query", + // "type": "boolean" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "Connector" + // }, // "response": { - // "$ref": "GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17278,93 +16557,178 @@ func (c *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "beyondcorp.projects.locations.insights.list": +// method id "beyondcorp.projects.locations.connectors.reportStatus": -type ProjectsLocationsInsightsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectorsReportStatusCall struct { + s *Service + connector string + reportstatusrequest *ReportStatusRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists for all the available insights that could be fetched from -// the system. Allows to filter using category. Setting the `view` to -// `BASIC` will let you iterate over the list of insight metadatas. +// ReportStatus: Report status for a given connector. // -// - parent: The resource name of InsightMetadata using the form: -// `organizations/{organization_id}/locations/{location}` -// `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsInsightsService) List(parent string) *ProjectsLocationsInsightsListCall { - c := &ProjectsLocationsInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - connector: BeyondCorp Connector name using the form: +// `projects/{project_id}/locations/{location_id}/connectors/{connector +// }`. +func (r *ProjectsLocationsConnectorsService) ReportStatus(connector string, reportstatusrequest *ReportStatusRequest) *ProjectsLocationsConnectorsReportStatusCall { + c := &ProjectsLocationsConnectorsReportStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.connector = connector + c.reportstatusrequest = reportstatusrequest return c } -// Filter sets the optional parameter "filter": Filter expression to -// restrict the insights returned. Supported filter fields: * `type` * -// `category` * `subCategory` Examples: * "category = application AND -// type = count" * "category = application AND subCategory = iap" * -// "type = status" Allowed values: * type: [count, latency, status, -// list] * category: [application, device, request, security] * -// subCategory: [iap, webprotect] NOTE: Only equality based comparison -// is allowed. Only `AND` conjunction is allowed. NOTE: The 'AND' in the -// filter field needs to be in capital letters only. NOTE: Just -// filtering on `subCategory` is not allowed. It should be passed in -// with the parent `category` too. (These expressions are based on the -// filter language described at https://google.aip.dev/160). -func (c *ProjectsLocationsInsightsListCall) Filter(filter string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("filter", filter) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsConnectorsReportStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsReportStatusCall { + 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 *ProjectsLocationsConnectorsReportStatusCall) Context(ctx context.Context) *ProjectsLocationsConnectorsReportStatusCall { + c.ctx_ = ctx return c } -// OrderBy sets the optional parameter "orderBy": Hint for how to order -// the results. This is currently ignored. -func (c *ProjectsLocationsInsightsListCall) OrderBy(orderBy string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsConnectorsReportStatusCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsConnectorsReportStatusCall) 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.reportstatusrequest) + 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, "v1alpha/{+connector}:reportStatus") + 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{ + "connector": c.connector, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "beyondcorp.projects.locations.connectors.reportStatus" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectorsReportStatusCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Report status for a given connector.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:reportStatus", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.connectors.reportStatus", + // "parameterOrder": [ + // "connector" + // ], + // "parameters": { + // "connector": { + // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+connector}:reportStatus", + // "request": { + // "$ref": "ReportStatusRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. NOTE: Default page size is 50. -func (c *ProjectsLocationsInsightsListCall) PageSize(pageSize int64) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} +// method id "beyondcorp.projects.locations.connectors.resolveInstanceConfig": -// PageToken sets the optional parameter "pageToken": A token -// identifying a page of results the server should return. -func (c *ProjectsLocationsInsightsListCall) PageToken(pageToken string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +type ProjectsLocationsConnectorsResolveInstanceConfigCall struct { + s *Service + connector string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": Required. List only metadata -// or full data. -// -// Possible values: -// -// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API -// -// will default to the BASIC view. -// -// "BASIC" - Include basic metadata about the insight, but not the -// -// insight data. This is the default value (for both ListInsights and -// GetInsight). +// ResolveInstanceConfig: Gets instance configuration for a given +// connector. An internal method called by a connector to get its +// container config. // -// "FULL" - Include everything. -func (c *ProjectsLocationsInsightsListCall) View(view string) *ProjectsLocationsInsightsListCall { - c.urlParams_.Set("view", view) +// - connector: BeyondCorp Connector name using the form: +// `projects/{project_id}/locations/{location_id}/connectors/{connector +// }`. +func (r *ProjectsLocationsConnectorsService) ResolveInstanceConfig(connector string) *ProjectsLocationsConnectorsResolveInstanceConfigCall { + c := &ProjectsLocationsConnectorsResolveInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.connector = connector 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 *ProjectsLocationsInsightsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsListCall { +func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsResolveInstanceConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17374,7 +16738,7 @@ func (c *ProjectsLocationsInsightsListCall) Fields(s ...googleapi.Field) *Projec // 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 *ProjectsLocationsInsightsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsListCall { +func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectorsResolveInstanceConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -17382,21 +16746,21 @@ func (c *ProjectsLocationsInsightsListCall) IfNoneMatch(entityTag string) *Proje // 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 *ProjectsLocationsInsightsListCall) Context(ctx context.Context) *ProjectsLocationsInsightsListCall { +func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) Context(ctx context.Context) *ProjectsLocationsConnectorsResolveInstanceConfigCall { 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 *ProjectsLocationsInsightsListCall) Header() http.Header { +func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsInsightsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) 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_ { @@ -17409,7 +16773,7 @@ func (c *ProjectsLocationsInsightsListCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/insights") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+connector}:resolveInstanceConfig") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17417,22 +16781,19 @@ func (c *ProjectsLocationsInsightsListCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "connector": c.connector, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.insights.list" call. -// Exactly one of -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse. -// ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse, error) { +// Do executes the "beyondcorp.projects.locations.connectors.resolveInstanceConfig" call. +// Exactly one of *ResolveInstanceConfigResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ResolveInstanceConfigResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsConnectorsResolveInstanceConfigCall) Do(opts ...googleapi.CallOption) (*ResolveInstanceConfigResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17451,7 +16812,7 @@ func (c *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse{ + ret := &ResolveInstanceConfigResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17463,61 +16824,25 @@ func (c *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Lists for all the available insights that could be fetched from the system. Allows to filter using category. Setting the `view` to `BASIC` will let you iterate over the list of insight metadatas.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/insights", + // "description": "Gets instance configuration for a given connector. An internal method called by a connector to get its container config.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:resolveInstanceConfig", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.insights.list", + // "id": "beyondcorp.projects.locations.connectors.resolveInstanceConfig", // "parameterOrder": [ - // "parent" + // "connector" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `type` * `category` * `subCategory` Examples: * \"category = application AND type = count\" * \"category = application AND subCategory = iap\" * \"type = status\" Allowed values: * type: [count, latency, status, list] * category: [application, device, request, security] * subCategory: [iap, webprotect] NOTE: Only equality based comparison is allowed. Only `AND` conjunction is allowed. NOTE: The 'AND' in the filter field needs to be in capital letters only. NOTE: Just filtering on `subCategory` is not allowed. It should be passed in with the parent `category` too. (These expressions are based on the filter language described at https://google.aip.dev/160).", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "Optional. Hint for how to order the results. This is currently ignored.", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. NOTE: Default page size is 50.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A token identifying a page of results the server should return.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource name of InsightMetadata using the form: `organizations/{organization_id}/locations/{location}` `projects/{project_id}/locations/{location_id}`", + // "connector": { + // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/connectors/{connector}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", // "required": true, // "type": "string" - // }, - // "view": { - // "description": "Required. List only metadata or full data.", - // "enum": [ - // "INSIGHT_VIEW_UNSPECIFIED", - // "BASIC", - // "FULL" - // ], - // "enumDescriptions": [ - // "The default / unset value. The API will default to the BASIC view.", - // "Include basic metadata about the insight, but not the insight data. This is the default value (for both ListInsights and GetInsight).", - // "Include everything." - // ], - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/insights", + // "path": "v1alpha/{+connector}:resolveInstanceConfig", // "response": { - // "$ref": "GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse" + // "$ref": "ResolveInstanceConfigResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17526,88 +16851,36 @@ func (c *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*G } -// 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 *ProjectsLocationsInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse) 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 "beyondcorp.projects.locations.netConnections.create": +// method id "beyondcorp.projects.locations.connectors.setIamPolicy": -type ProjectsLocationsNetConnectionsCreateCall struct { - s *Service - parent string - googlecloudbeyondcorpnetconnectionsv1alphanetconnection *GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectorsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new NetConnection in a given project and location. +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. // -// - parent: The resource project name of the NetConnection location -// using the form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsNetConnectionsService) Create(parent string, googlecloudbeyondcorpnetconnectionsv1alphanetconnection *GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection) *ProjectsLocationsNetConnectionsCreateCall { - c := &ProjectsLocationsNetConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudbeyondcorpnetconnectionsv1alphanetconnection = googlecloudbeyondcorpnetconnectionsv1alphanetconnection - return c -} - -// NetConnectionId sets the optional parameter "netConnectionId": -// User-settable NetConnection resource ID. * Must start with a letter. -// * Must contain between 4-63 characters from `/a-z-/`. * Must end with -// a number or a letter. -func (c *ProjectsLocationsNetConnectionsCreateCall) NetConnectionId(netConnectionId string) *ProjectsLocationsNetConnectionsCreateCall { - c.urlParams_.Set("netConnectionId", netConnectionId) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsNetConnectionsCreateCall) RequestId(requestId string) *ProjectsLocationsNetConnectionsCreateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsNetConnectionsCreateCall) ValidateOnly(validateOnly bool) *ProjectsLocationsNetConnectionsCreateCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectorsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsConnectorsSetIamPolicyCall { + c := &ProjectsLocationsConnectorsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNetConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsCreateCall { +func (c *ProjectsLocationsConnectorsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17615,21 +16888,21 @@ func (c *ProjectsLocationsNetConnectionsCreateCall) Fields(s ...googleapi.Field) // 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 *ProjectsLocationsNetConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsCreateCall { +func (c *ProjectsLocationsConnectorsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectorsSetIamPolicyCall { 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 *ProjectsLocationsNetConnectionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsConnectorsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectorsSetIamPolicyCall) 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_ { @@ -17637,14 +16910,14 @@ func (c *ProjectsLocationsNetConnectionsCreateCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudbeyondcorpnetconnectionsv1alphanetconnection) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) 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, "v1alpha/{+parent}/netConnections") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17652,19 +16925,19 @@ func (c *ProjectsLocationsNetConnectionsCreateCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.connectors.setIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsNetConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsConnectorsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17683,7 +16956,7 @@ func (c *ProjectsLocationsNetConnectionsCreateCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17695,43 +16968,28 @@ func (c *ProjectsLocationsNetConnectionsCreateCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Creates a new NetConnection in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections", + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:setIamPolicy", // "httpMethod": "POST", - // "id": "beyondcorp.projects.locations.netConnections.create", + // "id": "beyondcorp.projects.locations.connectors.setIamPolicy", // "parameterOrder": [ - // "parent" + // "resource" // ], // "parameters": { - // "netConnectionId": { - // "description": "Optional. User-settable NetConnection resource ID. * Must start with a letter. * Must contain between 4-63 characters from `/a-z-/`. * Must end with a number or a letter.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The resource project name of the NetConnection location using the form: `projects/{project_id}/locations/{location_id}`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+parent}/netConnections", + // "path": "v1alpha/{+resource}:setIamPolicy", // "request": { - // "$ref": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection" + // "$ref": "GoogleIamV1SetIamPolicyRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17740,57 +16998,39 @@ func (c *ProjectsLocationsNetConnectionsCreateCall) Do(opts ...googleapi.CallOpt } -// method id "beyondcorp.projects.locations.netConnections.delete": +// method id "beyondcorp.projects.locations.connectors.testIamPermissions": -type ProjectsLocationsNetConnectionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsConnectorsTestIamPermissionsCall struct { + s *Service + resource string + googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single NetConnection. +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. // -// - name: BeyondCorp Connector name using the form: -// `projects/{project_id}/locations/{location_id}/netConnections/{net_c -// onnection_id}`. -func (r *ProjectsLocationsNetConnectionsService) Delete(name string) *ProjectsLocationsNetConnectionsDeleteCall { - c := &ProjectsLocationsNetConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes after the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsNetConnectionsDeleteCall) RequestId(requestId string) *ProjectsLocationsNetConnectionsDeleteCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsNetConnectionsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsNetConnectionsDeleteCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsConnectorsService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ProjectsLocationsConnectorsTestIamPermissionsCall { + c := &ProjectsLocationsConnectorsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNetConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsDeleteCall { +func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectorsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17798,21 +17038,21 @@ func (c *ProjectsLocationsNetConnectionsDeleteCall) Fields(s ...googleapi.Field) // 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 *ProjectsLocationsNetConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsDeleteCall { +func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectorsTestIamPermissionsCall { 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 *ProjectsLocationsNetConnectionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) 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_ { @@ -17820,29 +17060,35 @@ func (c *ProjectsLocationsNetConnectionsDeleteCall) doRequest(alt string) (*http } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1testiampermissionsrequest) + 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, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.connectors.testIamPermissions" call. +// Exactly one of *GoogleIamV1TestIamPermissionsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsNetConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsConnectorsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17861,7 +17107,7 @@ func (c *ProjectsLocationsNetConnectionsDeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17873,35 +17119,28 @@ func (c *ProjectsLocationsNetConnectionsDeleteCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Deletes a single NetConnection.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}", - // "httpMethod": "DELETE", - // "id": "beyondcorp.projects.locations.netConnections.delete", + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "beyondcorp.projects.locations.connectors.testIamPermissions", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "name": { - // "description": "Required. BeyondCorp Connector name using the form: `projects/{project_id}/locations/{location_id}/netConnections/{net_connection_id}`", + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/netConnections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+resource}:testIamPermissions", + // "request": { + // "$ref": "GoogleIamV1TestIamPermissionsRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1TestIamPermissionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17910,32 +17149,133 @@ func (c *ProjectsLocationsNetConnectionsDeleteCall) Do(opts ...googleapi.CallOpt } -// method id "beyondcorp.projects.locations.netConnections.get": +// method id "beyondcorp.projects.locations.insights.configuredInsight": -type ProjectsLocationsNetConnectionsGetCall struct { +type ProjectsLocationsInsightsConfiguredInsightCall struct { s *Service - name string + insight string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets details of a single NetConnection. +// ConfiguredInsight: Gets the value for a selected particular insight +// based on the provided filters. Use the organization level path for +// fetching at org level and project level path for fetching the insight +// value specific to a particular project. // -// - name: BeyondCorp NetConnection name using the form: -// `projects/{project_id}/locations/{location_id}/netConnections/{net_c -// onnection_id}`. -func (r *ProjectsLocationsNetConnectionsService) Get(name string) *ProjectsLocationsNetConnectionsGetCall { - c := &ProjectsLocationsNetConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - insight: The resource name of the insight using the form: +// `organizations/{organization_id}/locations/{location_id}/insights/{i +// nsight_id}` +// `projects/{project_id}/locations/{location_id}/insights/{insight_id} +// `. +func (r *ProjectsLocationsInsightsService) ConfiguredInsight(insight string) *ProjectsLocationsInsightsConfiguredInsightCall { + c := &ProjectsLocationsInsightsConfiguredInsightCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.insight = insight + return c +} + +// Aggregation sets the optional parameter "aggregation": Required. +// Aggregation type. Available aggregation could be fetched by calling +// insight list and get APIs in `BASIC` view. +// +// Possible values: +// +// "AGGREGATION_UNSPECIFIED" - Unspecified. +// "HOURLY" - Insight should be aggregated at hourly level. +// "DAILY" - Insight should be aggregated at daily level. +// "WEEKLY" - Insight should be aggregated at weekly level. +// "MONTHLY" - Insight should be aggregated at monthly level. +// "CUSTOM_DATE_RANGE" - Insight should be aggregated at the custom +// +// date range passed in as the start and end time in the request. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Aggregation(aggregation string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("aggregation", aggregation) + return c +} + +// CustomGroupingFieldFilter sets the optional parameter +// "customGrouping.fieldFilter": Filterable parameters to be added to +// the grouping clause. Available fields could be fetched by calling +// insight list and get APIs in `BASIC` view. `=` is the only comparison +// operator supported. `AND` is the only logical operator supported. +// Usage: field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". +// NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` +// from `Insight.Metadata.Field` message for the filtering the +// corresponding fields in this filter field. (These expressions are +// based on the filter language described at +// https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingFieldFilter(customGroupingFieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("customGrouping.fieldFilter", customGroupingFieldFilter) + return c +} + +// CustomGroupingGroupFields sets the optional parameter +// "customGrouping.groupFields": Required. Fields to be used for +// grouping. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` +// message for declaring the fields to be grouped-by here. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) CustomGroupingGroupFields(customGroupingGroupFields ...string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.SetMulti("customGrouping.groupFields", append([]string{}, customGroupingGroupFields...)) + return c +} + +// EndTime sets the optional parameter "endTime": Required. Ending time +// for the duration for which insight is to be pulled. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) EndTime(endTime string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("endTime", endTime) + return c +} + +// FieldFilter sets the optional parameter "fieldFilter": Other +// filterable/configurable parameters as applicable to the selected +// insight. Available fields could be fetched by calling insight list +// and get APIs in `BASIC` view. `=` is the only comparison operator +// supported. `AND` is the only logical operator supported. Usage: +// field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: +// Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from +// `Insight.Metadata.Field` message for the filtering the corresponding +// fields in this filter field. (These expressions are based on the +// filter language described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsConfiguredInsightCall) FieldFilter(fieldFilter string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("fieldFilter", fieldFilter) + return c +} + +// Group sets the optional parameter "group": Group id of the available +// groupings for the insight. Available groupings could be fetched by +// calling insight list and get APIs in `BASIC` view. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Group(group string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("group", group) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageSize(pageSize int64) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Used to fetch the +// page represented by the token. Fetches the first page when not set. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) PageToken(pageToken string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// StartTime sets the optional parameter "startTime": Required. Starting +// time for the duration for which insight is to be pulled. +func (c *ProjectsLocationsInsightsConfiguredInsightCall) StartTime(startTime string) *ProjectsLocationsInsightsConfiguredInsightCall { + c.urlParams_.Set("startTime", startTime) 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 *ProjectsLocationsNetConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsGetCall { +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsConfiguredInsightCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17945,7 +17285,7 @@ func (c *ProjectsLocationsNetConnectionsGetCall) Fields(s ...googleapi.Field) *P // 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 *ProjectsLocationsNetConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetConnectionsGetCall { +func (c *ProjectsLocationsInsightsConfiguredInsightCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsConfiguredInsightCall { c.ifNoneMatch_ = entityTag return c } @@ -17953,21 +17293,21 @@ func (c *ProjectsLocationsNetConnectionsGetCall) IfNoneMatch(entityTag string) * // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNetConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsGetCall { +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Context(ctx context.Context) *ProjectsLocationsInsightsConfiguredInsightCall { 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 *ProjectsLocationsNetConnectionsGetCall) Header() http.Header { +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInsightsConfiguredInsightCall) 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_ { @@ -17980,7 +17320,7 @@ func (c *ProjectsLocationsNetConnectionsGetCall) doRequest(alt string) (*http.Re var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+insight}:configuredInsight") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17988,22 +17328,22 @@ func (c *ProjectsLocationsNetConnectionsGetCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "insight": c.insight, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.get" call. +// Do executes the "beyondcorp.projects.locations.insights.configuredInsight" call. // Exactly one of -// *GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection.ServerRespons -// e.Header or (if a response was returned at all) in +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResp +// onse or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResp +// onse.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsNetConnectionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection, error) { +func (c *ProjectsLocationsInsightsConfiguredInsightCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18022,7 +17362,7 @@ func (c *ProjectsLocationsNetConnectionsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection{ + ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18034,25 +17374,90 @@ func (c *ProjectsLocationsNetConnectionsGetCall) Do(opts ...googleapi.CallOption } return ret, nil // { - // "description": "Gets details of a single NetConnection.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}", + // "description": "Gets the value for a selected particular insight based on the provided filters. Use the organization level path for fetching at org level and project level path for fetching the insight value specific to a particular project.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/insights/{insightsId}:configuredInsight", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.netConnections.get", + // "id": "beyondcorp.projects.locations.insights.configuredInsight", // "parameterOrder": [ - // "name" + // "insight" // ], // "parameters": { - // "name": { - // "description": "Required. BeyondCorp NetConnection name using the form: `projects/{project_id}/locations/{location_id}/netConnections/{net_connection_id}`", + // "aggregation": { + // "description": "Required. Aggregation type. Available aggregation could be fetched by calling insight list and get APIs in `BASIC` view.", + // "enum": [ + // "AGGREGATION_UNSPECIFIED", + // "HOURLY", + // "DAILY", + // "WEEKLY", + // "MONTHLY", + // "CUSTOM_DATE_RANGE" + // ], + // "enumDescriptions": [ + // "Unspecified.", + // "Insight should be aggregated at hourly level.", + // "Insight should be aggregated at daily level.", + // "Insight should be aggregated at weekly level.", + // "Insight should be aggregated at monthly level.", + // "Insight should be aggregated at the custom date range passed in as the start and end time in the request." + // ], + // "location": "query", + // "type": "string" + // }, + // "customGrouping.fieldFilter": { + // "description": "Optional. Filterable parameters to be added to the grouping clause. Available fields could be fetched by calling insight list and get APIs in `BASIC` view. `=` is the only comparison operator supported. `AND` is the only logical operator supported. Usage: field_filter=\"fieldName1=fieldVal1 AND fieldName2=fieldVal2\". NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for the filtering the corresponding fields in this filter field. (These expressions are based on the filter language described at https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "customGrouping.groupFields": { + // "description": "Required. Fields to be used for grouping. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for declaring the fields to be grouped-by here.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "endTime": { + // "description": "Required. Ending time for the duration for which insight is to be pulled.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" + // }, + // "fieldFilter": { + // "description": "Optional. Other filterable/configurable parameters as applicable to the selected insight. Available fields could be fetched by calling insight list and get APIs in `BASIC` view. `=` is the only comparison operator supported. `AND` is the only logical operator supported. Usage: field_filter=\"fieldName1=fieldVal1 AND fieldName2=fieldVal2\". NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for the filtering the corresponding fields in this filter field. (These expressions are based on the filter language described at https://google.aip.dev/160).", + // "location": "query", + // "type": "string" + // }, + // "group": { + // "description": "Optional. Group id of the available groupings for the insight. Available groupings could be fetched by calling insight list and get APIs in `BASIC` view.", + // "location": "query", + // "type": "string" + // }, + // "insight": { + // "description": "Required. The resource name of the insight using the form: `organizations/{organization_id}/locations/{location_id}/insights/{insight_id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/netConnections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/insights/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Used to fetch the page represented by the token. Fetches the first page when not set.", + // "location": "query", + // "type": "string" + // }, + // "startTime": { + // "description": "Required. Starting time for the duration for which insight is to be pulled.", + // "format": "google-datetime", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+insight}:configuredInsight", // "response": { - // "$ref": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection" + // "$ref": "GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18061,53 +17466,82 @@ func (c *ProjectsLocationsNetConnectionsGetCall) Do(opts ...googleapi.CallOption } -// method id "beyondcorp.projects.locations.netConnections.getIamPolicy": +// 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 *ProjectsLocationsInsightsConfiguredInsightCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaConfiguredInsightResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsNetConnectionsGetIamPolicyCall struct { +// method id "beyondcorp.projects.locations.insights.get": + +type ProjectsLocationsInsightsGetCall struct { s *Service - resource string + name 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. +// Get: Gets the value for a selected particular insight with default +// configuration. The default aggregation level is 'DAILY' and no +// grouping will be applied or default grouping if applicable. The data +// will be returned for recent 7 days starting the day before. The +// insight data size will be limited to 50 rows. Use the organization +// level path for fetching at org level and project level path for +// fetching the insight value specific to a particular project. Setting +// the `view` to `BASIC` will only return the metadata for the insight. // -// - 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 *ProjectsLocationsNetConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { - c := &ProjectsLocationsNetConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The resource name of the insight using the form: +// `organizations/{organization_id}/locations/{location_id}/insights/{i +// nsight_id}` +// `projects/{project_id}/locations/{location_id}/insights/{insight_id} +// `. +func (r *ProjectsLocationsInsightsService) Get(name string) *ProjectsLocationsInsightsGetCall { + c := &ProjectsLocationsInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNetConnectionsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// View sets the optional parameter "view": Required. Metadata only or +// full data view. +// +// Possible values: +// +// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API +// +// will default to the BASIC view. +// +// "BASIC" - Include basic metadata about the insight, but not the +// +// insight data. This is the default value (for both ListInsights and +// GetInsight). +// +// "FULL" - Include everything. +func (c *ProjectsLocationsInsightsGetCall) View(view string) *ProjectsLocationsInsightsGetCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsInsightsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18117,7 +17551,7 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Fields(s ...googleapi. // 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsInsightsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -18125,21 +17559,21 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsGetIamPolicyCall { +func (c *ProjectsLocationsInsightsGetCall) Context(ctx context.Context) *ProjectsLocationsInsightsGetCall { 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsInsightsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInsightsGetCall) 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_ { @@ -18152,7 +17586,7 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18160,19 +17594,22 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) doRequest(alt string) } 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 "beyondcorp.projects.locations.netConnections.getIamPolicy" call. -// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// Do executes the "beyondcorp.projects.locations.insights.get" call. +// Exactly one of +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18191,7 +17628,7 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18203,31 +17640,40 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.C } 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": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}:getIamPolicy", + // "description": "Gets the value for a selected particular insight with default configuration. The default aggregation level is 'DAILY' and no grouping will be applied or default grouping if applicable. The data will be returned for recent 7 days starting the day before. The insight data size will be limited to 50 rows. Use the organization level path for fetching at org level and project level path for fetching the insight value specific to a particular project. Setting the `view` to `BASIC` will only return the metadata for the insight.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/insights/{insightsId}", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.netConnections.getIamPolicy", + // "id": "beyondcorp.projects.locations.insights.get", // "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": "Required. The resource name of the insight using the form: `organizations/{organization_id}/locations/{location_id}/insights/{insight_id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/netConnections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/insights/[^/]+$", // "required": true, // "type": "string" + // }, + // "view": { + // "description": "Required. Metadata only or full data view.", + // "enum": [ + // "INSIGHT_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "The default / unset value. The API will default to the BASIC view.", + // "Include basic metadata about the insight, but not the insight data. This is the default value (for both ListInsights and GetInsight).", + // "Include everything." + // ], + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+resource}:getIamPolicy", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleIamV1Policy" + // "$ref": "GoogleCloudBeyondcorpSaasplatformInsightsV1alphaInsight" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18236,9 +17682,9 @@ func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.C } -// method id "beyondcorp.projects.locations.netConnections.list": +// method id "beyondcorp.projects.locations.insights.list": -type ProjectsLocationsNetConnectionsListCall struct { +type ProjectsLocationsInsightsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -18247,55 +17693,82 @@ type ProjectsLocationsNetConnectionsListCall struct { header_ http.Header } -// List: Lists NetConnections in a given project and location. +// List: Lists for all the available insights that could be fetched from +// the system. Allows to filter using category. Setting the `view` to +// `BASIC` will let you iterate over the list of insight metadatas. // -// - parent: The resource name of the NetConnection location using the -// form: `projects/{project_id}/locations/{location_id}`. -func (r *ProjectsLocationsNetConnectionsService) List(parent string) *ProjectsLocationsNetConnectionsListCall { - c := &ProjectsLocationsNetConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of InsightMetadata using the form: +// `organizations/{organization_id}/locations/{location}` +// `projects/{project_id}/locations/{location_id}`. +func (r *ProjectsLocationsInsightsService) List(parent string) *ProjectsLocationsInsightsListCall { + c := &ProjectsLocationsInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter specifying -// constraints of a list operation. -func (c *ProjectsLocationsNetConnectionsListCall) Filter(filter string) *ProjectsLocationsNetConnectionsListCall { +// Filter sets the optional parameter "filter": Filter expression to +// restrict the insights returned. Supported filter fields: * `type` * +// `category` * `subCategory` Examples: * "category = application AND +// type = count" * "category = application AND subCategory = iap" * +// "type = status" Allowed values: * type: [count, latency, status, +// list] * category: [application, device, request, security] * +// subCategory: [iap, webprotect] NOTE: Only equality based comparison +// is allowed. Only `AND` conjunction is allowed. NOTE: The 'AND' in the +// filter field needs to be in capital letters only. NOTE: Just +// filtering on `subCategory` is not allowed. It should be passed in +// with the parent `category` too. (These expressions are based on the +// filter language described at https://google.aip.dev/160). +func (c *ProjectsLocationsInsightsListCall) Filter(filter string) *ProjectsLocationsInsightsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": Specifies the ordering -// of results. See Sorting order -// (https://cloud.google.com/apis/design/design_patterns#sorting_order) -// for more information. -func (c *ProjectsLocationsNetConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsNetConnectionsListCall { +// OrderBy sets the optional parameter "orderBy": Hint for how to order +// the results. This is currently ignored. +func (c *ProjectsLocationsInsightsListCall) OrderBy(orderBy string) *ProjectsLocationsInsightsListCall { c.urlParams_.Set("orderBy", orderBy) return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of items to return. If not specified, a default value of 50 will be -// used by the service. Regardless of the page_size value, the response -// may include a partial list and a caller should only rely on -// response's next_page_token to determine if there are more instances -// left to be queried. -func (c *ProjectsLocationsNetConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsNetConnectionsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. NOTE: Default page size is 50. +func (c *ProjectsLocationsInsightsListCall) PageSize(pageSize int64) *ProjectsLocationsInsightsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The -// next_page_token value returned from a previous -// ListNetConnectionsRequest, if any. -func (c *ProjectsLocationsNetConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsNetConnectionsListCall { +// PageToken sets the optional parameter "pageToken": A token +// identifying a page of results the server should return. +func (c *ProjectsLocationsInsightsListCall) PageToken(pageToken string) *ProjectsLocationsInsightsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// View sets the optional parameter "view": Required. List only metadata +// or full data. +// +// Possible values: +// +// "INSIGHT_VIEW_UNSPECIFIED" - The default / unset value. The API +// +// will default to the BASIC view. +// +// "BASIC" - Include basic metadata about the insight, but not the +// +// insight data. This is the default value (for both ListInsights and +// GetInsight). +// +// "FULL" - Include everything. +func (c *ProjectsLocationsInsightsListCall) View(view string) *ProjectsLocationsInsightsListCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsNetConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsListCall { +func (c *ProjectsLocationsInsightsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18305,7 +17778,7 @@ func (c *ProjectsLocationsNetConnectionsListCall) Fields(s ...googleapi.Field) * // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsNetConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetConnectionsListCall { +func (c *ProjectsLocationsInsightsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightsListCall { c.ifNoneMatch_ = entityTag return c } @@ -18313,21 +17786,21 @@ func (c *ProjectsLocationsNetConnectionsListCall) IfNoneMatch(entityTag string) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsNetConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsListCall { +func (c *ProjectsLocationsInsightsListCall) Context(ctx context.Context) *ProjectsLocationsInsightsListCall { 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 *ProjectsLocationsNetConnectionsListCall) Header() http.Header { +func (c *ProjectsLocationsInsightsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInsightsListCall) 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_ { @@ -18340,7 +17813,7 @@ func (c *ProjectsLocationsNetConnectionsListCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/netConnections") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/insights") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18353,17 +17826,17 @@ func (c *ProjectsLocationsNetConnectionsListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.list" call. +// Do executes the "beyondcorp.projects.locations.insights.list" call. // Exactly one of -// *GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse // or error will be non-nil. Any non-2xx status code is an error. // Response headers are in either -// *GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse. +// *GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse. // ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsNetConnectionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse, error) { +func (c *ProjectsLocationsInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18382,7 +17855,7 @@ func (c *ProjectsLocationsNetConnectionsListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse{ + ret := &GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18394,46 +17867,61 @@ func (c *ProjectsLocationsNetConnectionsListCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Lists NetConnections in a given project and location.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections", + // "description": "Lists for all the available insights that could be fetched from the system. Allows to filter using category. Setting the `view` to `BASIC` will let you iterate over the list of insight metadatas.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/insights", // "httpMethod": "GET", - // "id": "beyondcorp.projects.locations.netConnections.list", + // "id": "beyondcorp.projects.locations.insights.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "filter": { - // "description": "Optional. A filter specifying constraints of a list operation.", + // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `type` * `category` * `subCategory` Examples: * \"category = application AND type = count\" * \"category = application AND subCategory = iap\" * \"type = status\" Allowed values: * type: [count, latency, status, list] * category: [application, device, request, security] * subCategory: [iap, webprotect] NOTE: Only equality based comparison is allowed. Only `AND` conjunction is allowed. NOTE: The 'AND' in the filter field needs to be in capital letters only. NOTE: Just filtering on `subCategory` is not allowed. It should be passed in with the parent `category` too. (These expressions are based on the filter language described at https://google.aip.dev/160).", // "location": "query", // "type": "string" // }, // "orderBy": { - // "description": "Optional. Specifies the ordering of results. See [Sorting order](https://cloud.google.com/apis/design/design_patterns#sorting_order) for more information.", + // "description": "Optional. Hint for how to order the results. This is currently ignored.", // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "Optional. The maximum number of items to return. If not specified, a default value of 50 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's next_page_token to determine if there are more instances left to be queried.", + // "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. NOTE: Default page size is 50.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. The next_page_token value returned from a previous ListNetConnectionsRequest, if any.", + // "description": "Optional. A token identifying a page of results the server should return.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the NetConnection location using the form: `projects/{project_id}/locations/{location_id}`", + // "description": "Required. The resource name of InsightMetadata using the form: `organizations/{organization_id}/locations/{location}` `projects/{project_id}/locations/{location_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "view": { + // "description": "Required. List only metadata or full data.", + // "enum": [ + // "INSIGHT_VIEW_UNSPECIFIED", + // "BASIC", + // "FULL" + // ], + // "enumDescriptions": [ + // "The default / unset value. The API will default to the BASIC view.", + // "Include basic metadata about the insight, but not the insight data. This is the default value (for both ListInsights and GetInsight).", + // "Include everything." + // ], + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/netConnections", + // "path": "v1alpha/{+parent}/insights", // "response": { - // "$ref": "GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse" + // "$ref": "GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18445,7 +17933,7 @@ func (c *ProjectsLocationsNetConnectionsListCall) Do(opts ...googleapi.CallOptio // 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 *ProjectsLocationsNetConnectionsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpNetconnectionsV1alphaListNetConnectionsResponse) error) error { +func (c *ProjectsLocationsInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudBeyondcorpSaasplatformInsightsV1alphaListInsightsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -18463,132 +17951,118 @@ func (c *ProjectsLocationsNetConnectionsListCall) Pages(ctx context.Context, f f } } -// method id "beyondcorp.projects.locations.netConnections.patch": +// method id "beyondcorp.projects.locations.netConnections.getIamPolicy": -type ProjectsLocationsNetConnectionsPatchCall struct { - s *Service - name string - googlecloudbeyondcorpnetconnectionsv1alphanetconnection *GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNetConnectionsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single NetConnection. +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. // -// - name: Unique resource name of the NetConnection. The name is -// ignored when creating a NetConnection. -func (r *ProjectsLocationsNetConnectionsService) Patch(name string, googlecloudbeyondcorpnetconnectionsv1alphanetconnection *GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection) *ProjectsLocationsNetConnectionsPatchCall { - c := &ProjectsLocationsNetConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudbeyondcorpnetconnectionsv1alphanetconnection = googlecloudbeyondcorpnetconnectionsv1alphanetconnection - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set as -// true, will create the resource if it is not found. -func (c *ProjectsLocationsNetConnectionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsNetConnectionsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional -// request ID to identify requests. Specify a unique request ID so that -// if you must retry your request, the server will know to ignore the -// request if it has already been completed. The server will guarantee -// that for at least 60 minutes since the first request. For example, -// consider a situation where you make an initial request and t he -// 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 *ProjectsLocationsNetConnectionsPatchCall) RequestId(requestId string) *ProjectsLocationsNetConnectionsPatchCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Mask -// of fields to update. At least one path must be supplied in this -// field. The elements of the repeated paths field may only include -// these fields from [BeyondCorp.NetConnection]: * `labels` * -// `display_name` -func (c *ProjectsLocationsNetConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNetConnectionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsNetConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + c := &ProjectsLocationsNetConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// ValidateOnly sets the optional parameter "validateOnly": If set, -// validates request by executing a dry-run which would not alter the -// resource in any way. -func (c *ProjectsLocationsNetConnectionsPatchCall) ValidateOnly(validateOnly bool) *ProjectsLocationsNetConnectionsPatchCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) +// 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + 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 *ProjectsLocationsNetConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsPatchCall { +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNetConnectionsGetIamPolicyCall { 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 *ProjectsLocationsNetConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsNetConnectionsGetIamPolicyCall { + 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 *ProjectsLocationsNetConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsPatchCall { +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNetConnectionsGetIamPolicyCall { 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 *ProjectsLocationsNetConnectionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNetConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) 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.googlecloudbeyondcorpnetconnectionsv1alphanetconnection) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "beyondcorp.projects.locations.netConnections.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "beyondcorp.projects.locations.netConnections.getIamPolicy" call. +// Exactly one of *GoogleIamV1Policy or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsNetConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNetConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18607,7 +18081,7 @@ func (c *ProjectsLocationsNetConnectionsPatchCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18619,49 +18093,31 @@ func (c *ProjectsLocationsNetConnectionsPatchCall) Do(opts ...googleapi.CallOpti } return ret, nil // { - // "description": "Updates the parameters of a single NetConnection.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}", - // "httpMethod": "PATCH", - // "id": "beyondcorp.projects.locations.netConnections.patch", + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/netConnections/{netConnectionsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "beyondcorp.projects.locations.netConnections.getIamPolicy", // "parameterOrder": [ - // "name" + // "resource" // ], // "parameters": { - // "allowMissing": { - // "description": "Optional. If set as true, will create the resource if it is not found.", + // "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": "boolean" + // "type": "integer" // }, - // "name": { - // "description": "Required. Unique resource name of the NetConnection. The name is ignored when creating a NetConnection.", + // "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/[^/]+/netConnections/[^/]+$", // "required": true, // "type": "string" - // }, - // "requestId": { - // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", - // "location": "query", - // "type": "string" - // }, - // "updateMask": { - // "description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from [BeyondCorp.NetConnection]: * `labels` * `display_name`", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // }, - // "validateOnly": { - // "description": "Optional. If set, validates request by executing a dry-run which would not alter the resource in any way.", - // "location": "query", - // "type": "boolean" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudBeyondcorpNetconnectionsV1alphaNetConnection" - // }, + // "path": "v1alpha/{+resource}:getIamPolicy", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleIamV1Policy" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json index d02e2fb6114..4de13b294f4 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-api.json +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-api.json @@ -1340,7 +1340,7 @@ } } }, - "revision": "20221001", + "revision": "20221014", "rootUrl": "https://bigquerydatatransfer.googleapis.com/", "schemas": { "CheckValidCredsRequest": { @@ -1516,7 +1516,7 @@ "type": "boolean" }, "maxValue": { - "description": "For integer and double values specifies maxminum allowed value.", + "description": "For integer and double values specifies maximum allowed value.", "format": "double", "type": "number" }, diff --git a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go index c1484b49042..e2a55fa8f37 100644 --- a/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go +++ b/bigquerydatatransfer/v1/bigquerydatatransfer-gen.go @@ -458,7 +458,7 @@ type DataSourceParameter struct { // Immutable: Cannot be changed after initial creation. Immutable bool `json:"immutable,omitempty"` - // MaxValue: For integer and double values specifies maxminum allowed + // MaxValue: For integer and double values specifies maximum allowed // value. MaxValue float64 `json:"maxValue,omitempty"` diff --git a/bigtableadmin/v2/bigtableadmin-api.json b/bigtableadmin/v2/bigtableadmin-api.json index c4cd73fb7ad..abe5200dda8 100644 --- a/bigtableadmin/v2/bigtableadmin-api.json +++ b/bigtableadmin/v2/bigtableadmin-api.json @@ -999,6 +999,38 @@ "resources": { "backups": { "methods": { + "copy": { + "description": "Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.", + "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters/{clustersId}/backups:copy", + "httpMethod": "POST", + "id": "bigtableadmin.projects.instances.clusters.backups.copy", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the destination cluster that will contain the backup copy. The cluster must already exists. Values are of the form: `projects/{project}/instances/{instance}/clusters/{cluster}`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/backups:copy", + "request": { + "$ref": "CopyBackupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigtable.admin", + "https://www.googleapis.com/auth/bigtable.admin.table", + "https://www.googleapis.com/auth/cloud-bigtable.admin", + "https://www.googleapis.com/auth/cloud-bigtable.admin.table", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Starts creating a new Cloud Bigtable Backup. The returned backup long-running operation can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup.", "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters/{clustersId}/backups", @@ -1892,7 +1924,7 @@ } } }, - "revision": "20220914", + "revision": "20221009", "rootUrl": "https://bigtableadmin.googleapis.com/", "schemas": { "AppProfile": { @@ -2034,6 +2066,11 @@ "readOnly": true, "type": "string" }, + "sourceBackup": { + "description": "Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/.", + "readOnly": true, + "type": "string" + }, "sourceTable": { "description": "Required. Immutable. Name of the table from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects/{project}/instances/{instance}/tables/{source_table}`.", "type": "string" @@ -2077,6 +2114,11 @@ "readOnly": true, "type": "string" }, + "sourceBackup": { + "description": "Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects//instances//backups/.", + "readOnly": true, + "type": "string" + }, "sourceTable": { "description": "Output only. Name of the table the backup was created from.", "readOnly": true, @@ -2269,6 +2311,45 @@ }, "type": "object" }, + "CopyBackupMetadata": { + "description": "Metadata type for the google.longrunning.Operation returned by CopyBackup.", + "id": "CopyBackupMetadata", + "properties": { + "name": { + "description": "The name of the backup being created through the copy operation. Values are of the form `projects//instances//clusters//backups/`.", + "type": "string" + }, + "progress": { + "$ref": "OperationProgress", + "description": "The progress of the CopyBackup operation." + }, + "sourceBackupInfo": { + "$ref": "BackupInfo", + "description": "Information about the source backup that is being copied from." + } + }, + "type": "object" + }, + "CopyBackupRequest": { + "description": "The request for CopyBackup.", + "id": "CopyBackupRequest", + "properties": { + "backupId": { + "description": "Required. The id of the new backup. The `backup_id` along with `parent` are combined as {parent}/backups/{backup_id} to create the full backup name, of the form: `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. This string must be between 1 and 50 characters in length and match the regex _a-zA-Z0-9*.", + "type": "string" + }, + "expireTime": { + "description": "Required. Required. The expiration time of the copied backup with microsecond granularity that must be at least 6 hours and at most 30 days from the time the request is received. Once the `expire_time` has passed, Cloud Bigtable will delete the backup and free the resources used by the backup.", + "format": "google-datetime", + "type": "string" + }, + "sourceBackup": { + "description": "Required. The source backup to be copied from. The source backup needs to be in READY state for it to be copied. Copying a copied backup is not allowed. Once CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the form: `projects//instances//clusters//backups/`.", + "type": "string" + } + }, + "type": "object" + }, "CreateBackupMetadata": { "description": "Metadata type for the operation returned by CreateBackup.", "id": "CreateBackupMetadata", diff --git a/bigtableadmin/v2/bigtableadmin-gen.go b/bigtableadmin/v2/bigtableadmin-gen.go index bad2caaec16..d98046660fc 100644 --- a/bigtableadmin/v2/bigtableadmin-gen.go +++ b/bigtableadmin/v2/bigtableadmin-gen.go @@ -558,6 +558,12 @@ type Backup struct { // SizeBytes: Output only. Size of the backup in bytes. SizeBytes int64 `json:"sizeBytes,omitempty,string"` + // SourceBackup: Output only. Name of the backup from which this backup + // was copied. If a backup is not created by copying a backup, this + // field will be empty. Values are of the form: + // projects//instances//backups/. + SourceBackup string `json:"sourceBackup,omitempty"` + // SourceTable: Required. Immutable. Name of the table from which this // backup was created. This needs to be in the same instance as the // backup. Values are of the form @@ -616,6 +622,12 @@ type BackupInfo struct { // data in the backup will be no newer than this timestamp. EndTime string `json:"endTime,omitempty"` + // SourceBackup: Output only. Name of the backup from which this backup + // was copied. If a backup is not created by copying a backup, this + // field will be empty. Values are of the form: + // projects//instances//backups/. + SourceBackup string `json:"sourceBackup,omitempty"` + // SourceTable: Output only. Name of the table the backup was created // from. SourceTable string `json:"sourceTable,omitempty"` @@ -1027,6 +1039,92 @@ func (s *ColumnFamily) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CopyBackupMetadata: Metadata type for the +// google.longrunning.Operation returned by CopyBackup. +type CopyBackupMetadata struct { + // Name: The name of the backup being created through the copy + // operation. Values are of the form + // `projects//instances//clusters//backups/`. + Name string `json:"name,omitempty"` + + // Progress: The progress of the CopyBackup operation. + Progress *OperationProgress `json:"progress,omitempty"` + + // SourceBackupInfo: Information about the source backup that is being + // copied from. + SourceBackupInfo *BackupInfo `json:"sourceBackupInfo,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 *CopyBackupMetadata) MarshalJSON() ([]byte, error) { + type NoMethod CopyBackupMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CopyBackupRequest: The request for CopyBackup. +type CopyBackupRequest struct { + // BackupId: Required. The id of the new backup. The `backup_id` along + // with `parent` are combined as {parent}/backups/{backup_id} to create + // the full backup name, of the form: + // `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{b + // ackup_id}`. This string must be between 1 and 50 characters in length + // and match the regex _a-zA-Z0-9*. + BackupId string `json:"backupId,omitempty"` + + // ExpireTime: Required. Required. The expiration time of the copied + // backup with microsecond granularity that must be at least 6 hours and + // at most 30 days from the time the request is received. Once the + // `expire_time` has passed, Cloud Bigtable will delete the backup and + // free the resources used by the backup. + ExpireTime string `json:"expireTime,omitempty"` + + // SourceBackup: Required. The source backup to be copied from. The + // source backup needs to be in READY state for it to be copied. Copying + // a copied backup is not allowed. Once CopyBackup is in progress, the + // source backup cannot be deleted or cleaned up on expiration until + // CopyBackup is finished. Values are of the form: + // `projects//instances//clusters//backups/`. + SourceBackup string `json:"sourceBackup,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BackupId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CopyBackupRequest) MarshalJSON() ([]byte, error) { + type NoMethod CopyBackupRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CreateBackupMetadata: Metadata type for the operation returned by // CreateBackup. type CreateBackupMetadata struct { @@ -7129,6 +7227,155 @@ func (c *ProjectsInstancesClustersUpdateCall) Do(opts ...googleapi.CallOption) ( } +// method id "bigtableadmin.projects.instances.clusters.backups.copy": + +type ProjectsInstancesClustersBackupsCopyCall struct { + s *Service + parent string + copybackuprequest *CopyBackupRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Copy: Copy a Cloud Bigtable backup to a new backup in the destination +// cluster located in the destination instance and project. +// +// - parent: The name of the destination cluster that will contain the +// backup copy. The cluster must already exists. Values are of the +// form: `projects/{project}/instances/{instance}/clusters/{cluster}`. +func (r *ProjectsInstancesClustersBackupsService) Copy(parent string, copybackuprequest *CopyBackupRequest) *ProjectsInstancesClustersBackupsCopyCall { + c := &ProjectsInstancesClustersBackupsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.copybackuprequest = copybackuprequest + 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 *ProjectsInstancesClustersBackupsCopyCall) Fields(s ...googleapi.Field) *ProjectsInstancesClustersBackupsCopyCall { + 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 *ProjectsInstancesClustersBackupsCopyCall) Context(ctx context.Context) *ProjectsInstancesClustersBackupsCopyCall { + 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 *ProjectsInstancesClustersBackupsCopyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesClustersBackupsCopyCall) 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.copybackuprequest) + 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}/backups:copy") + 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 "bigtableadmin.projects.instances.clusters.backups.copy" 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 *ProjectsInstancesClustersBackupsCopyCall) 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": "Copy a Cloud Bigtable backup to a new backup in the destination cluster located in the destination instance and project.", + // "flatPath": "v2/projects/{projectsId}/instances/{instancesId}/clusters/{clustersId}/backups:copy", + // "httpMethod": "POST", + // "id": "bigtableadmin.projects.instances.clusters.backups.copy", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The name of the destination cluster that will contain the backup copy. The cluster must already exists. Values are of the form: `projects/{project}/instances/{instance}/clusters/{cluster}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/instances/[^/]+/clusters/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+parent}/backups:copy", + // "request": { + // "$ref": "CopyBackupRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigtable.admin", + // "https://www.googleapis.com/auth/bigtable.admin.table", + // "https://www.googleapis.com/auth/cloud-bigtable.admin", + // "https://www.googleapis.com/auth/cloud-bigtable.admin.table", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "bigtableadmin.projects.instances.clusters.backups.create": type ProjectsInstancesClustersBackupsCreateCall struct { diff --git a/billingbudgets/v1/billingbudgets-api.json b/billingbudgets/v1/billingbudgets-api.json index 56b4db19f08..a508528bbe4 100644 --- a/billingbudgets/v1/billingbudgets-api.json +++ b/billingbudgets/v1/billingbudgets-api.json @@ -270,7 +270,7 @@ } } }, - "revision": "20220319", + "revision": "20221019", "rootUrl": "https://billingbudgets.googleapis.com/", "schemas": { "GoogleCloudBillingBudgetsV1Budget": { @@ -400,7 +400,7 @@ "type": "object" }, "projects": { - "description": "Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report includes all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently.", + "description": "Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report includes all usage for the billing account, regardless of which project the usage occurred on.", "items": { "type": "string" }, diff --git a/billingbudgets/v1/billingbudgets-gen.go b/billingbudgets/v1/billingbudgets-gen.go index 6f5f7dbda0d..28ad6b81b4e 100644 --- a/billingbudgets/v1/billingbudgets-gen.go +++ b/billingbudgets/v1/billingbudgets-gen.go @@ -369,8 +369,7 @@ type GoogleCloudBillingBudgetsV1Filter struct { // `projects/{project}`, specifying that usage from only this set of // projects should be included in the budget. If omitted, the report // includes all usage for the billing account, regardless of which - // project the usage occurred on. Only zero or one project can be - // specified currently. + // project the usage occurred on. Projects []string `json:"projects,omitempty"` // Services: Optional. A set of services of the form diff --git a/billingbudgets/v1beta1/billingbudgets-api.json b/billingbudgets/v1beta1/billingbudgets-api.json index 26600401902..bad8e7274e8 100644 --- a/billingbudgets/v1beta1/billingbudgets-api.json +++ b/billingbudgets/v1beta1/billingbudgets-api.json @@ -264,7 +264,7 @@ } } }, - "revision": "20220319", + "revision": "20221019", "rootUrl": "https://billingbudgets.googleapis.com/", "schemas": { "GoogleCloudBillingBudgetsV1beta1AllUpdatesRule": { @@ -431,7 +431,7 @@ "type": "object" }, "projects": { - "description": "Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently.", + "description": "Optional. A set of projects of the form `projects/{project}`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on.", "items": { "type": "string" }, diff --git a/billingbudgets/v1beta1/billingbudgets-gen.go b/billingbudgets/v1beta1/billingbudgets-gen.go index a3a9b16b0ff..697b8155f56 100644 --- a/billingbudgets/v1beta1/billingbudgets-gen.go +++ b/billingbudgets/v1beta1/billingbudgets-gen.go @@ -465,8 +465,7 @@ type GoogleCloudBillingBudgetsV1beta1Filter struct { // `projects/{project}`, specifying that usage from only this set of // projects should be included in the budget. If omitted, the report // will include all usage for the billing account, regardless of which - // project the usage occurred on. Only zero or one project can be - // specified currently. + // project the usage occurred on. Projects []string `json:"projects,omitempty"` // Services: Optional. A set of services of the form diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 282d8fc7d2e..16f84fe9cb6 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -121,6 +121,21 @@ "location": "query", "type": "string" }, + "messageReplyOption": { + "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + "enum": [ + "MESSAGE_REPLY_OPTION_UNSPECIFIED", + "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + "REPLY_MESSAGE_OR_FAIL" + ], + "enumDescriptions": [ + "Default. Starts a thread.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + ], + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", "location": "path", @@ -134,7 +149,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", "location": "query", "type": "string" } @@ -161,6 +176,21 @@ "location": "query", "type": "string" }, + "messageReplyOption": { + "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + "enum": [ + "MESSAGE_REPLY_OPTION_UNSPECIFIED", + "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + "REPLY_MESSAGE_OR_FAIL" + ], + "enumDescriptions": [ + "Default. Starts a thread.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + ], + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", "location": "path", @@ -174,7 +204,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", "location": "query", "type": "string" } @@ -205,6 +235,21 @@ "location": "query", "type": "string" }, + "messageReplyOption": { + "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + "enum": [ + "MESSAGE_REPLY_OPTION_UNSPECIFIED", + "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + "REPLY_MESSAGE_OR_FAIL" + ], + "enumDescriptions": [ + "Default. Starts a thread.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + ], + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", "location": "path", @@ -218,7 +263,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", "location": "query", "type": "string" } @@ -278,6 +323,21 @@ "location": "query", "type": "string" }, + "messageReplyOption": { + "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + "enum": [ + "MESSAGE_REPLY_OPTION_UNSPECIFIED", + "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + "REPLY_MESSAGE_OR_FAIL" + ], + "enumDescriptions": [ + "Default. Starts a thread.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + ], + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", "location": "path", @@ -291,7 +351,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", "location": "query", "type": "string" } @@ -318,6 +378,21 @@ "location": "query", "type": "string" }, + "messageReplyOption": { + "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + "enum": [ + "MESSAGE_REPLY_OPTION_UNSPECIFIED", + "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + "REPLY_MESSAGE_OR_FAIL" + ], + "enumDescriptions": [ + "Default. Starts a thread.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + ], + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", "location": "path", @@ -331,7 +406,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", "location": "query", "type": "string" } @@ -362,6 +437,21 @@ "location": "query", "type": "string" }, + "messageReplyOption": { + "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + "enum": [ + "MESSAGE_REPLY_OPTION_UNSPECIFIED", + "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + "REPLY_MESSAGE_OR_FAIL" + ], + "enumDescriptions": [ + "Default. Starts a thread.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + ], + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", "location": "path", @@ -375,7 +465,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", "location": "query", "type": "string" } @@ -454,6 +544,21 @@ "location": "query", "type": "string" }, + "messageReplyOption": { + "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + "enum": [ + "MESSAGE_REPLY_OPTION_UNSPECIFIED", + "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + "REPLY_MESSAGE_OR_FAIL" + ], + "enumDescriptions": [ + "Default. Starts a thread.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + ], + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", "location": "path", @@ -467,7 +572,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", "location": "query", "type": "string" } @@ -550,7 +655,7 @@ "messages": { "methods": { "create": { - "description": "Creates a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", + "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a message. Requires [authentication](https://developers.google.com/chat/api/guides/auth).", "flatPath": "v1/spaces/{spacesId}/messages", "httpMethod": "POST", "id": "chat.spaces.messages.create", @@ -563,6 +668,21 @@ "location": "query", "type": "string" }, + "messageReplyOption": { + "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + "enum": [ + "MESSAGE_REPLY_OPTION_UNSPECIFIED", + "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + "REPLY_MESSAGE_OR_FAIL" + ], + "enumDescriptions": [ + "Default. Starts a thread.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + ], + "location": "query", + "type": "string" + }, "parent": { "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", "location": "path", @@ -576,7 +696,7 @@ "type": "string" }, "threadKey": { - "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", "location": "query", "type": "string" } @@ -612,7 +732,7 @@ } }, "get": { - "description": "Returns a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). [Developer Preview](https://developers.google.com/workspace/preview): Returns a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.readonly` authorization scope.", + "description": "Returns a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). [Developer Preview](https://developers.google.com/workspace/preview): Returns a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.readonly` authorization scope. Messages from a blocked member or messages from a blocked space can also be fetched.", "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", "httpMethod": "GET", "id": "chat.spaces.messages.get", @@ -702,7 +822,7 @@ } } }, - "revision": "20221019", + "revision": "20221020", "rootUrl": "https://chat.googleapis.com/", "schemas": { "ActionParameter": { @@ -2599,7 +2719,12 @@ }, "thread": { "$ref": "Thread", - "description": "The thread the message belongs to." + "description": "The thread the message belongs to. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread)." + }, + "threadReply": { + "description": "Output only. When `true`, the message is a response in a reply thread. When `false`, the message is visible in the space's top-level conversation as either the first message of a thread or a message with no threaded replies. If the space doesn't support reply in threads, this field is always `false`.", + "readOnly": true, + "type": "boolean" } }, "type": "object" @@ -2718,8 +2843,25 @@ "$ref": "SpaceDetails", "description": "Details about the space including description and rules." }, + "spaceThreadingState": { + "description": "Output only. The threading state in the Chat space.", + "enum": [ + "SPACE_THREADING_STATE_UNSPECIFIED", + "THREADED_MESSAGES", + "GROUPED_MESSAGES", + "UNTHREADED_MESSAGES" + ], + "enumDescriptions": [ + "Reserved.", + "Named spaces that support message threads. When users respond to a message, they can reply in-thread, which keeps their response in the context of the original message.", + "Named spaces where the conversation is organized by topic. Topics and their replies are grouped together.", + "Direct messages (DMs) between two people and group conversations between 3 or more people." + ], + "readOnly": true, + "type": "string" + }, "threaded": { - "description": "Output only. Whether messages are threaded in this space.", + "description": "Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space.", "readOnly": true, "type": "boolean" }, @@ -2827,7 +2969,11 @@ "id": "Thread", "properties": { "name": { - "description": "Resource name, in the form \"spaces/*/threads/*\". Example: spaces/AAAAAAAAAAA/threads/TTTTTTTTTTT", + "description": "Resource name of the thread. Example: spaces/{space}/threads/{thread}", + "type": "string" + }, + "threadKey": { + "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). For other requests, this is an output only field.", "type": "string" } }, diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index c625943646f..d52cc7fce28 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -3224,9 +3224,18 @@ type Message struct { // video, web page, or other preview-able item generates a preview chip. Text string `json:"text,omitempty"` - // Thread: The thread the message belongs to. + // Thread: The thread the message belongs to. For example usage, see + // Start or reply to a message thread + // (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). Thread *Thread `json:"thread,omitempty"` + // ThreadReply: Output only. When `true`, the message is a response in a + // reply thread. When `false`, the message is visible in the space's + // top-level conversation as either the first message of a thread or a + // message with no threaded replies. If the space doesn't support reply + // in threads, this field is always `false`. + ThreadReply bool `json:"threadReply,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -3441,7 +3450,22 @@ type Space struct { // rules. SpaceDetails *SpaceDetails `json:"spaceDetails,omitempty"` - // Threaded: Output only. Whether messages are threaded in this space. + // SpaceThreadingState: Output only. The threading state in the Chat + // space. + // + // Possible values: + // "SPACE_THREADING_STATE_UNSPECIFIED" - Reserved. + // "THREADED_MESSAGES" - Named spaces that support message threads. + // When users respond to a message, they can reply in-thread, which + // keeps their response in the context of the original message. + // "GROUPED_MESSAGES" - Named spaces where the conversation is + // organized by topic. Topics and their replies are grouped together. + // "UNTHREADED_MESSAGES" - Direct messages (DMs) between two people + // and group conversations between 3 or more people. + SpaceThreadingState string `json:"spaceThreadingState,omitempty"` + + // Threaded: Output only. Deprecated: Use `spaceThreadingState` instead. + // Whether messages are threaded in this space. Threaded bool `json:"threaded,omitempty"` // Type: Output only. Deprecated: Use `singleUserBotDm` or `spaceType` @@ -3649,10 +3673,18 @@ func (s *TextParagraph) MarshalJSON() ([]byte, error) { // Thread: A thread in Google Chat. type Thread struct { - // Name: Resource name, in the form "spaces/*/threads/*". Example: - // spaces/AAAAAAAAAAA/threads/TTTTTTTTTTT + // Name: Resource name of the thread. Example: + // spaces/{space}/threads/{thread} Name string `json:"name,omitempty"` + // ThreadKey: Optional. Opaque thread identifier. To start or add to a + // thread, create a message and specify a `threadKey` or the + // thread.name. For example usage, see Start or reply to a message + // thread + // (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). + // For other requests, this is an output only field. + ThreadKey string `json:"threadKey,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 @@ -3900,6 +3932,27 @@ func (c *DmsMessagesCall) MessageId(messageId string) *DmsMessagesCall { return c } +// MessageReplyOption sets the optional parameter "messageReplyOption": +// Specifies whether a message starts a thread or replies to one. Only +// supported in named spaces. +// +// Possible values: +// +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a +// +// reply to the thread specified by thread ID or thread_key. If it +// fails, the message starts a new thread instead. +// +// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the +// +// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND +// error is returned instead. +func (c *DmsMessagesCall) MessageReplyOption(messageReplyOption string) *DmsMessagesCall { + c.urlParams_.Set("messageReplyOption", messageReplyOption) + return c +} + // RequestId sets the optional parameter "requestId": A unique request // ID for this message. Specifying an existing request ID returns the // message created with that ID instead of creating a new message. @@ -3908,12 +3961,12 @@ func (c *DmsMessagesCall) RequestId(requestId string) *DmsMessagesCall { return c } -// ThreadKey sets the optional parameter "threadKey": Opaque thread -// identifier. To start or add to a thread, create a message and specify -// a `threadKey` instead of thread.name. (Setting thread.name has no -// effect.) The first message with a given `threadKey` starts a new -// thread. Subsequent messages with the same `threadKey` post into the -// same thread. +// ThreadKey sets the optional parameter "threadKey": Deprecated: Use +// thread_key instead. Opaque thread identifier. To start or add to a +// thread, create a message and specify a `threadKey` or the +// thread.name. For example usage, see Start or reply to a message +// thread +// (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). func (c *DmsMessagesCall) ThreadKey(threadKey string) *DmsMessagesCall { c.urlParams_.Set("threadKey", threadKey) return c @@ -4023,6 +4076,21 @@ func (c *DmsMessagesCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "location": "query", // "type": "string" // }, + // "messageReplyOption": { + // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + // "enum": [ + // "MESSAGE_REPLY_OPTION_UNSPECIFIED", + // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + // "REPLY_MESSAGE_OR_FAIL" + // ], + // "enumDescriptions": [ + // "Default. Starts a thread.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + // ], + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", // "location": "path", @@ -4036,7 +4104,7 @@ func (c *DmsMessagesCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + // "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", // "location": "query", // "type": "string" // } @@ -4087,6 +4155,27 @@ func (c *DmsWebhooksCall) MessageId(messageId string) *DmsWebhooksCall { return c } +// MessageReplyOption sets the optional parameter "messageReplyOption": +// Specifies whether a message starts a thread or replies to one. Only +// supported in named spaces. +// +// Possible values: +// +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a +// +// reply to the thread specified by thread ID or thread_key. If it +// fails, the message starts a new thread instead. +// +// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the +// +// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND +// error is returned instead. +func (c *DmsWebhooksCall) MessageReplyOption(messageReplyOption string) *DmsWebhooksCall { + c.urlParams_.Set("messageReplyOption", messageReplyOption) + return c +} + // RequestId sets the optional parameter "requestId": A unique request // ID for this message. Specifying an existing request ID returns the // message created with that ID instead of creating a new message. @@ -4095,12 +4184,12 @@ func (c *DmsWebhooksCall) RequestId(requestId string) *DmsWebhooksCall { return c } -// ThreadKey sets the optional parameter "threadKey": Opaque thread -// identifier. To start or add to a thread, create a message and specify -// a `threadKey` instead of thread.name. (Setting thread.name has no -// effect.) The first message with a given `threadKey` starts a new -// thread. Subsequent messages with the same `threadKey` post into the -// same thread. +// ThreadKey sets the optional parameter "threadKey": Deprecated: Use +// thread_key instead. Opaque thread identifier. To start or add to a +// thread, create a message and specify a `threadKey` or the +// thread.name. For example usage, see Start or reply to a message +// thread +// (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). func (c *DmsWebhooksCall) ThreadKey(threadKey string) *DmsWebhooksCall { c.urlParams_.Set("threadKey", threadKey) return c @@ -4210,6 +4299,21 @@ func (c *DmsWebhooksCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "location": "query", // "type": "string" // }, + // "messageReplyOption": { + // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + // "enum": [ + // "MESSAGE_REPLY_OPTION_UNSPECIFIED", + // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + // "REPLY_MESSAGE_OR_FAIL" + // ], + // "enumDescriptions": [ + // "Default. Starts a thread.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + // ], + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", // "location": "path", @@ -4223,7 +4327,7 @@ func (c *DmsWebhooksCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + // "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", // "location": "query", // "type": "string" // } @@ -4274,6 +4378,27 @@ func (c *DmsConversationsMessagesCall) MessageId(messageId string) *DmsConversat return c } +// MessageReplyOption sets the optional parameter "messageReplyOption": +// Specifies whether a message starts a thread or replies to one. Only +// supported in named spaces. +// +// Possible values: +// +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a +// +// reply to the thread specified by thread ID or thread_key. If it +// fails, the message starts a new thread instead. +// +// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the +// +// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND +// error is returned instead. +func (c *DmsConversationsMessagesCall) MessageReplyOption(messageReplyOption string) *DmsConversationsMessagesCall { + c.urlParams_.Set("messageReplyOption", messageReplyOption) + return c +} + // RequestId sets the optional parameter "requestId": A unique request // ID for this message. Specifying an existing request ID returns the // message created with that ID instead of creating a new message. @@ -4282,12 +4407,12 @@ func (c *DmsConversationsMessagesCall) RequestId(requestId string) *DmsConversat return c } -// ThreadKey sets the optional parameter "threadKey": Opaque thread -// identifier. To start or add to a thread, create a message and specify -// a `threadKey` instead of thread.name. (Setting thread.name has no -// effect.) The first message with a given `threadKey` starts a new -// thread. Subsequent messages with the same `threadKey` post into the -// same thread. +// ThreadKey sets the optional parameter "threadKey": Deprecated: Use +// thread_key instead. Opaque thread identifier. To start or add to a +// thread, create a message and specify a `threadKey` or the +// thread.name. For example usage, see Start or reply to a message +// thread +// (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). func (c *DmsConversationsMessagesCall) ThreadKey(threadKey string) *DmsConversationsMessagesCall { c.urlParams_.Set("threadKey", threadKey) return c @@ -4397,6 +4522,21 @@ func (c *DmsConversationsMessagesCall) Do(opts ...googleapi.CallOption) (*Messag // "location": "query", // "type": "string" // }, + // "messageReplyOption": { + // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + // "enum": [ + // "MESSAGE_REPLY_OPTION_UNSPECIFIED", + // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + // "REPLY_MESSAGE_OR_FAIL" + // ], + // "enumDescriptions": [ + // "Default. Starts a thread.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + // ], + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", // "location": "path", @@ -4410,7 +4550,7 @@ func (c *DmsConversationsMessagesCall) Do(opts ...googleapi.CallOption) (*Messag // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + // "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", // "location": "query", // "type": "string" // } @@ -4623,6 +4763,27 @@ func (c *RoomsMessagesCall) MessageId(messageId string) *RoomsMessagesCall { return c } +// MessageReplyOption sets the optional parameter "messageReplyOption": +// Specifies whether a message starts a thread or replies to one. Only +// supported in named spaces. +// +// Possible values: +// +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a +// +// reply to the thread specified by thread ID or thread_key. If it +// fails, the message starts a new thread instead. +// +// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the +// +// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND +// error is returned instead. +func (c *RoomsMessagesCall) MessageReplyOption(messageReplyOption string) *RoomsMessagesCall { + c.urlParams_.Set("messageReplyOption", messageReplyOption) + return c +} + // RequestId sets the optional parameter "requestId": A unique request // ID for this message. Specifying an existing request ID returns the // message created with that ID instead of creating a new message. @@ -4631,12 +4792,12 @@ func (c *RoomsMessagesCall) RequestId(requestId string) *RoomsMessagesCall { return c } -// ThreadKey sets the optional parameter "threadKey": Opaque thread -// identifier. To start or add to a thread, create a message and specify -// a `threadKey` instead of thread.name. (Setting thread.name has no -// effect.) The first message with a given `threadKey` starts a new -// thread. Subsequent messages with the same `threadKey` post into the -// same thread. +// ThreadKey sets the optional parameter "threadKey": Deprecated: Use +// thread_key instead. Opaque thread identifier. To start or add to a +// thread, create a message and specify a `threadKey` or the +// thread.name. For example usage, see Start or reply to a message +// thread +// (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). func (c *RoomsMessagesCall) ThreadKey(threadKey string) *RoomsMessagesCall { c.urlParams_.Set("threadKey", threadKey) return c @@ -4746,6 +4907,21 @@ func (c *RoomsMessagesCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "location": "query", // "type": "string" // }, + // "messageReplyOption": { + // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + // "enum": [ + // "MESSAGE_REPLY_OPTION_UNSPECIFIED", + // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + // "REPLY_MESSAGE_OR_FAIL" + // ], + // "enumDescriptions": [ + // "Default. Starts a thread.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + // ], + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", // "location": "path", @@ -4759,7 +4935,7 @@ func (c *RoomsMessagesCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + // "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", // "location": "query", // "type": "string" // } @@ -4810,6 +4986,27 @@ func (c *RoomsWebhooksCall) MessageId(messageId string) *RoomsWebhooksCall { return c } +// MessageReplyOption sets the optional parameter "messageReplyOption": +// Specifies whether a message starts a thread or replies to one. Only +// supported in named spaces. +// +// Possible values: +// +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a +// +// reply to the thread specified by thread ID or thread_key. If it +// fails, the message starts a new thread instead. +// +// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the +// +// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND +// error is returned instead. +func (c *RoomsWebhooksCall) MessageReplyOption(messageReplyOption string) *RoomsWebhooksCall { + c.urlParams_.Set("messageReplyOption", messageReplyOption) + return c +} + // RequestId sets the optional parameter "requestId": A unique request // ID for this message. Specifying an existing request ID returns the // message created with that ID instead of creating a new message. @@ -4818,12 +5015,12 @@ func (c *RoomsWebhooksCall) RequestId(requestId string) *RoomsWebhooksCall { return c } -// ThreadKey sets the optional parameter "threadKey": Opaque thread -// identifier. To start or add to a thread, create a message and specify -// a `threadKey` instead of thread.name. (Setting thread.name has no -// effect.) The first message with a given `threadKey` starts a new -// thread. Subsequent messages with the same `threadKey` post into the -// same thread. +// ThreadKey sets the optional parameter "threadKey": Deprecated: Use +// thread_key instead. Opaque thread identifier. To start or add to a +// thread, create a message and specify a `threadKey` or the +// thread.name. For example usage, see Start or reply to a message +// thread +// (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). func (c *RoomsWebhooksCall) ThreadKey(threadKey string) *RoomsWebhooksCall { c.urlParams_.Set("threadKey", threadKey) return c @@ -4933,6 +5130,21 @@ func (c *RoomsWebhooksCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "location": "query", // "type": "string" // }, + // "messageReplyOption": { + // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + // "enum": [ + // "MESSAGE_REPLY_OPTION_UNSPECIFIED", + // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + // "REPLY_MESSAGE_OR_FAIL" + // ], + // "enumDescriptions": [ + // "Default. Starts a thread.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + // ], + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", // "location": "path", @@ -4946,7 +5158,7 @@ func (c *RoomsWebhooksCall) Do(opts ...googleapi.CallOption) (*Message, error) { // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + // "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", // "location": "query", // "type": "string" // } @@ -4997,6 +5209,27 @@ func (c *RoomsConversationsMessagesCall) MessageId(messageId string) *RoomsConve return c } +// MessageReplyOption sets the optional parameter "messageReplyOption": +// Specifies whether a message starts a thread or replies to one. Only +// supported in named spaces. +// +// Possible values: +// +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a +// +// reply to the thread specified by thread ID or thread_key. If it +// fails, the message starts a new thread instead. +// +// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the +// +// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND +// error is returned instead. +func (c *RoomsConversationsMessagesCall) MessageReplyOption(messageReplyOption string) *RoomsConversationsMessagesCall { + c.urlParams_.Set("messageReplyOption", messageReplyOption) + return c +} + // RequestId sets the optional parameter "requestId": A unique request // ID for this message. Specifying an existing request ID returns the // message created with that ID instead of creating a new message. @@ -5005,12 +5238,12 @@ func (c *RoomsConversationsMessagesCall) RequestId(requestId string) *RoomsConve return c } -// ThreadKey sets the optional parameter "threadKey": Opaque thread -// identifier. To start or add to a thread, create a message and specify -// a `threadKey` instead of thread.name. (Setting thread.name has no -// effect.) The first message with a given `threadKey` starts a new -// thread. Subsequent messages with the same `threadKey` post into the -// same thread. +// ThreadKey sets the optional parameter "threadKey": Deprecated: Use +// thread_key instead. Opaque thread identifier. To start or add to a +// thread, create a message and specify a `threadKey` or the +// thread.name. For example usage, see Start or reply to a message +// thread +// (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). func (c *RoomsConversationsMessagesCall) ThreadKey(threadKey string) *RoomsConversationsMessagesCall { c.urlParams_.Set("threadKey", threadKey) return c @@ -5120,6 +5353,21 @@ func (c *RoomsConversationsMessagesCall) Do(opts ...googleapi.CallOption) (*Mess // "location": "query", // "type": "string" // }, + // "messageReplyOption": { + // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + // "enum": [ + // "MESSAGE_REPLY_OPTION_UNSPECIFIED", + // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + // "REPLY_MESSAGE_OR_FAIL" + // ], + // "enumDescriptions": [ + // "Default. Starts a thread.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + // ], + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", // "location": "path", @@ -5133,7 +5381,7 @@ func (c *RoomsConversationsMessagesCall) Do(opts ...googleapi.CallOption) (*Mess // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + // "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", // "location": "query", // "type": "string" // } @@ -5509,6 +5757,27 @@ func (c *SpacesWebhooksCall) MessageId(messageId string) *SpacesWebhooksCall { return c } +// MessageReplyOption sets the optional parameter "messageReplyOption": +// Specifies whether a message starts a thread or replies to one. Only +// supported in named spaces. +// +// Possible values: +// +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a +// +// reply to the thread specified by thread ID or thread_key. If it +// fails, the message starts a new thread instead. +// +// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the +// +// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND +// error is returned instead. +func (c *SpacesWebhooksCall) MessageReplyOption(messageReplyOption string) *SpacesWebhooksCall { + c.urlParams_.Set("messageReplyOption", messageReplyOption) + return c +} + // RequestId sets the optional parameter "requestId": A unique request // ID for this message. Specifying an existing request ID returns the // message created with that ID instead of creating a new message. @@ -5517,12 +5786,12 @@ func (c *SpacesWebhooksCall) RequestId(requestId string) *SpacesWebhooksCall { return c } -// ThreadKey sets the optional parameter "threadKey": Opaque thread -// identifier. To start or add to a thread, create a message and specify -// a `threadKey` instead of thread.name. (Setting thread.name has no -// effect.) The first message with a given `threadKey` starts a new -// thread. Subsequent messages with the same `threadKey` post into the -// same thread. +// ThreadKey sets the optional parameter "threadKey": Deprecated: Use +// thread_key instead. Opaque thread identifier. To start or add to a +// thread, create a message and specify a `threadKey` or the +// thread.name. For example usage, see Start or reply to a message +// thread +// (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). func (c *SpacesWebhooksCall) ThreadKey(threadKey string) *SpacesWebhooksCall { c.urlParams_.Set("threadKey", threadKey) return c @@ -5632,6 +5901,21 @@ func (c *SpacesWebhooksCall) Do(opts ...googleapi.CallOption) (*Message, error) // "location": "query", // "type": "string" // }, + // "messageReplyOption": { + // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + // "enum": [ + // "MESSAGE_REPLY_OPTION_UNSPECIFIED", + // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + // "REPLY_MESSAGE_OR_FAIL" + // ], + // "enumDescriptions": [ + // "Default. Starts a thread.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + // ], + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", // "location": "path", @@ -5645,7 +5929,7 @@ func (c *SpacesWebhooksCall) Do(opts ...googleapi.CallOption) (*Message, error) // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + // "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", // "location": "query", // "type": "string" // } @@ -6020,8 +6304,10 @@ type SpacesMessagesCreateCall struct { header_ http.Header } -// Create: Creates a message. Requires service account authentication -// (https://developers.google.com/chat/api/guides/auth/service-accounts). +// Create: Developer Preview +// (https://developers.google.com/workspace/preview): Creates a message. +// Requires authentication +// (https://developers.google.com/chat/api/guides/auth). // // - parent: Space resource name, in the form "spaces/*". Example: // spaces/AAAAAAAAAAA. @@ -6044,6 +6330,27 @@ func (c *SpacesMessagesCreateCall) MessageId(messageId string) *SpacesMessagesCr return c } +// MessageReplyOption sets the optional parameter "messageReplyOption": +// Specifies whether a message starts a thread or replies to one. Only +// supported in named spaces. +// +// Possible values: +// +// "MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a thread. +// "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a +// +// reply to the thread specified by thread ID or thread_key. If it +// fails, the message starts a new thread instead. +// +// "REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the +// +// thread specified by thread ID or thread_key. If it fails, a NOT_FOUND +// error is returned instead. +func (c *SpacesMessagesCreateCall) MessageReplyOption(messageReplyOption string) *SpacesMessagesCreateCall { + c.urlParams_.Set("messageReplyOption", messageReplyOption) + return c +} + // RequestId sets the optional parameter "requestId": A unique request // ID for this message. Specifying an existing request ID returns the // message created with that ID instead of creating a new message. @@ -6052,12 +6359,12 @@ func (c *SpacesMessagesCreateCall) RequestId(requestId string) *SpacesMessagesCr return c } -// ThreadKey sets the optional parameter "threadKey": Opaque thread -// identifier. To start or add to a thread, create a message and specify -// a `threadKey` instead of thread.name. (Setting thread.name has no -// effect.) The first message with a given `threadKey` starts a new -// thread. Subsequent messages with the same `threadKey` post into the -// same thread. +// ThreadKey sets the optional parameter "threadKey": Deprecated: Use +// thread_key instead. Opaque thread identifier. To start or add to a +// thread, create a message and specify a `threadKey` or the +// thread.name. For example usage, see Start or reply to a message +// thread +// (/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). func (c *SpacesMessagesCreateCall) ThreadKey(threadKey string) *SpacesMessagesCreateCall { c.urlParams_.Set("threadKey", threadKey) return c @@ -6154,7 +6461,7 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e } return ret, nil // { - // "description": "Creates a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).", + // "description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a message. Requires [authentication](https://developers.google.com/chat/api/guides/auth).", // "flatPath": "v1/spaces/{spacesId}/messages", // "httpMethod": "POST", // "id": "chat.spaces.messages.create", @@ -6167,6 +6474,21 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e // "location": "query", // "type": "string" // }, + // "messageReplyOption": { + // "description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.", + // "enum": [ + // "MESSAGE_REPLY_OPTION_UNSPECIFIED", + // "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD", + // "REPLY_MESSAGE_OR_FAIL" + // ], + // "enumDescriptions": [ + // "Default. Starts a thread.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, the message starts a new thread instead.", + // "Creates the message as a reply to the thread specified by thread ID or thread_key. If it fails, a NOT_FOUND error is returned instead." + // ], + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. Space resource name, in the form \"spaces/*\". Example: spaces/AAAAAAAAAAA", // "location": "path", @@ -6180,7 +6502,7 @@ func (c *SpacesMessagesCreateCall) Do(opts ...googleapi.CallOption) (*Message, e // "type": "string" // }, // "threadKey": { - // "description": "Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` instead of thread.name. (Setting thread.name has no effect.) The first message with a given `threadKey` starts a new thread. Subsequent messages with the same `threadKey` post into the same thread.", + // "description": "Optional. Deprecated: Use thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).", // "location": "query", // "type": "string" // } @@ -6349,6 +6671,8 @@ type SpacesMessagesGetCall struct { // Returns a message. Requires user authentication // (https://developers.google.com/chat/api/guides/auth/users) and the // `chat.messages` or `chat.messages.readonly` authorization scope. +// Messages from a blocked member or messages from a blocked space can +// also be fetched. // // - name: Resource name of the message to retrieve. Format: // spaces/{space}/messages/{message} If the message begins with @@ -6462,7 +6786,7 @@ func (c *SpacesMessagesGetCall) Do(opts ...googleapi.CallOption) (*Message, erro } return ret, nil // { - // "description": "Returns a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). [Developer Preview](https://developers.google.com/workspace/preview): Returns a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.readonly` authorization scope.", + // "description": "Returns a message. Requires [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts). [Developer Preview](https://developers.google.com/workspace/preview): Returns a message. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.messages` or `chat.messages.readonly` authorization scope. Messages from a blocked member or messages from a blocked space can also be fetched.", // "flatPath": "v1/spaces/{spacesId}/messages/{messagesId}", // "httpMethod": "GET", // "id": "chat.spaces.messages.get", diff --git a/chromepolicy/v1/chromepolicy-api.json b/chromepolicy/v1/chromepolicy-api.json index 6b13d609446..cae5e3de366 100644 --- a/chromepolicy/v1/chromepolicy-api.json +++ b/chromepolicy/v1/chromepolicy-api.json @@ -557,7 +557,7 @@ } } }, - "revision": "20221014", + "revision": "20221021", "rootUrl": "https://chromepolicy.googleapis.com/", "schemas": { "ChromeCrosDpanelAutosettingsProtoPolicyApiLifecycle": { @@ -663,6 +663,23 @@ }, "type": "object" }, + "GoogleChromePolicyVersionsV1CertificateReference": { + "description": "Error information for removing of a specific certificate on a specific target. A reference to a certificate.", + "id": "GoogleChromePolicyVersionsV1CertificateReference", + "properties": { + "network": { + "description": "Output only. The name of the referencing network.", + "readOnly": true, + "type": "string" + }, + "orgUnitId": { + "description": "Output only. The obfuscated id of the org unit the referencing network is in.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "GoogleChromePolicyVersionsV1DefineCertificateRequest": { "description": "Request object for creating a certificate.", "id": "GoogleChromePolicyVersionsV1DefineCertificateRequest", @@ -1197,6 +1214,21 @@ }, "type": "object" }, + "GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails": { + "description": "Details of the errors encountered during a remove certificate request. This message will be returned as part of the details of a google.rpc.Status returned to the user when there is an error in their request.", + "id": "GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails", + "properties": { + "certificateReferences": { + "description": "Output only. If the certificate was not removed, a list of references to the certificate that prevented it from being removed. Only unreferenced certificates can be removed.", + "items": { + "$ref": "GoogleChromePolicyVersionsV1CertificateReference" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "GoogleChromePolicyVersionsV1RemoveCertificateRequest": { "description": "Request object for removing a certificate.", "id": "GoogleChromePolicyVersionsV1RemoveCertificateRequest", diff --git a/chromepolicy/v1/chromepolicy-gen.go b/chromepolicy/v1/chromepolicy-gen.go index 3856830703e..dc85eca3636 100644 --- a/chromepolicy/v1/chromepolicy-gen.go +++ b/chromepolicy/v1/chromepolicy-gen.go @@ -463,6 +463,40 @@ func (s *GoogleChromePolicyVersionsV1BatchModifyOrgUnitPoliciesRequest) MarshalJ return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromePolicyVersionsV1CertificateReference: Error information +// for removing of a specific certificate on a specific target. A +// reference to a certificate. +type GoogleChromePolicyVersionsV1CertificateReference struct { + // Network: Output only. The name of the referencing network. + Network string `json:"network,omitempty"` + + // OrgUnitId: Output only. The obfuscated id of the org unit the + // referencing network is in. + OrgUnitId string `json:"orgUnitId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Network") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Network") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromePolicyVersionsV1CertificateReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromePolicyVersionsV1CertificateReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromePolicyVersionsV1DefineCertificateRequest: Request object // for creating a certificate. type GoogleChromePolicyVersionsV1DefineCertificateRequest struct { @@ -1328,6 +1362,42 @@ func (s *GoogleChromePolicyVersionsV1PolicyValue) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails: Details of +// the errors encountered during a remove certificate request. This +// message will be returned as part of the details of a +// google.rpc.Status returned to the user when there is an error in +// their request. +type GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails struct { + // CertificateReferences: Output only. If the certificate was not + // removed, a list of references to the certificate that prevented it + // from being removed. Only unreferenced certificates can be removed. + CertificateReferences []*GoogleChromePolicyVersionsV1CertificateReference `json:"certificateReferences,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CertificateReferences") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CertificateReferences") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleChromePolicyVersionsV1RemoveCertificateErrorDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleChromePolicyVersionsV1RemoveCertificateRequest: Request object // for removing a certificate. type GoogleChromePolicyVersionsV1RemoveCertificateRequest struct { diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 674eee0118e..0a40b2b97a9 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -1901,7 +1901,7 @@ } } }, - "revision": "20220910", + "revision": "20221023", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -4476,7 +4476,7 @@ "id": "GoogleTypeDecimal", "properties": { "value": { - "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -\u003e `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", + "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -\u003e `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", "type": "string" } }, diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index 099edd3ac05..c4a933cd64b 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -4617,27 +4617,28 @@ type GoogleTypeDecimal struct { // consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), // followed by a sequence of zero or more decimal digits ("the // integer"), optionally followed by a fraction, optionally followed by - // an exponent. The fraction consists of a decimal point followed by - // zero or more decimal digits. The string must contain at least one - // digit in either the integer or the fraction. The number formed by the - // sign, the integer and the fraction is referred to as the significand. - // The exponent consists of the character `e` (`U+0065`) or `E` - // (`U+0045`) followed by one or more decimal digits. Services - // **should** normalize decimal values before storing them by: - - // Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - - // Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - - // Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - - // Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). - // Services **may** perform additional normalization based on its own - // needs and the internal decimal implementation selected, such as - // shifting the decimal point and exponent value together (example: - // `2.5e-1` <-> `0.25`). Additionally, services **may** preserve - // trailing zeroes in the fraction to indicate increased precision, but - // are not required to do so. Note that only the `.` character is - // supported to divide the integer and the fraction; `,` **should not** - // be supported regardless of locale. Additionally, thousand separators - // **should not** be supported. If a service does support them, values - // **must** be normalized. The ENBF grammar is: DecimalString = [Sign] + // an exponent. An empty string **should** be interpreted as `0`. The + // fraction consists of a decimal point followed by zero or more decimal + // digits. The string must contain at least one digit in either the + // integer or the fraction. The number formed by the sign, the integer + // and the fraction is referred to as the significand. The exponent + // consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed + // by one or more decimal digits. Services **should** normalize decimal + // values before storing them by: - Removing an explicitly-provided `+` + // sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with + // `0` (`.5` -> `0.5`). - Coercing the exponent character to upper-case, + // with explicit sign (`2.5e8` -> `2.5E+8`). - Removing an + // explicitly-provided zero exponent (`2.5E0` -> `2.5`). Services + // **may** perform additional normalization based on its own needs and + // the internal decimal implementation selected, such as shifting the + // decimal point and exponent value together (example: `2.5E-1` <-> + // `0.25`). Additionally, services **may** preserve trailing zeroes in + // the fraction to indicate increased precision, but are not required to + // do so. Note that only the `.` character is supported to divide the + // integer and the fraction; `,` **should not** be supported regardless + // of locale. Additionally, thousand separators **should not** be + // supported. If a service does support them, values **must** be + // normalized. The ENBF grammar is: DecimalString = '' | [Sign] // Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | // [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { // '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services diff --git a/cloudtasks/v2beta2/cloudtasks-api.json b/cloudtasks/v2beta2/cloudtasks-api.json index 8a3a60257f9..b14eda3cc37 100644 --- a/cloudtasks/v2beta2/cloudtasks-api.json +++ b/cloudtasks/v2beta2/cloudtasks-api.json @@ -876,7 +876,7 @@ } } }, - "revision": "20220923", + "revision": "20221014", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AcknowledgeTaskRequest": { @@ -1302,7 +1302,7 @@ }, "uriOverride": { "$ref": "UriOverride", - "description": "Uri override. When specified modifies the execution Uri for all the tasks in the queue." + "description": "Uri override. When specified, modifies the execution Uri for all the tasks in the queue." } }, "type": "object" @@ -1928,6 +1928,20 @@ "Convert the scheme to HTTPS, e.g., http://www.google.ca will change to https://www.google.ca." ], "type": "string" + }, + "uriOverrideEnforceMode": { + "description": "Uri Override Enforce Mode Determines the Target UriOverride mode.", + "enum": [ + "URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED", + "IF_NOT_EXISTS", + "ALWAYS" + ], + "enumDescriptions": [ + "OverrideMode Unspecified. Defaults to ALWAYS.", + "In the IF_NOT_EXISTS mode, queue-level configuration is only applied where task-level configuration does not exist.", + "In the ALWAYS mode, queue-level configuration overrides all task-level configuration" + ], + "type": "string" } }, "type": "object" diff --git a/cloudtasks/v2beta2/cloudtasks-gen.go b/cloudtasks/v2beta2/cloudtasks-gen.go index 5f0f15923f3..276168f3d1c 100644 --- a/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/cloudtasks/v2beta2/cloudtasks-gen.go @@ -1216,7 +1216,7 @@ type HttpTarget struct { // to validate the token yourself. OidcToken *OidcToken `json:"oidcToken,omitempty"` - // UriOverride: Uri override. When specified modifies the execution Uri + // UriOverride: Uri override. When specified, modifies the execution Uri // for all the tasks in the queue. UriOverride *UriOverride `json:"uriOverride,omitempty"` @@ -2576,6 +2576,19 @@ type UriOverride struct { // will change to https://www.google.ca. Scheme string `json:"scheme,omitempty"` + // UriOverrideEnforceMode: Uri Override Enforce Mode Determines the + // Target UriOverride mode. + // + // Possible values: + // "URI_OVERRIDE_ENFORCE_MODE_UNSPECIFIED" - OverrideMode Unspecified. + // Defaults to ALWAYS. + // "IF_NOT_EXISTS" - In the IF_NOT_EXISTS mode, queue-level + // configuration is only applied where task-level configuration does not + // exist. + // "ALWAYS" - In the ALWAYS mode, queue-level configuration overrides + // all task-level configuration + UriOverrideEnforceMode string `json:"uriOverrideEnforceMode,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 diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index e4af81021c4..713ebfbe4b0 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -2507,6 +2507,48 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "bulkInsert": { + "description": "Bulk create a set of disks.", + "flatPath": "projects/{project}/zones/{zone}/disks/bulkInsert", + "httpMethod": "POST", + "id": "compute.disks.bulkInsert", + "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": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/disks/bulkInsert", + "request": { + "$ref": "BulkInsertDiskResource" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "createSnapshot": { "description": "Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.", "flatPath": "projects/{project}/zones/{zone}/disks/{disk}/createSnapshot", @@ -23023,6 +23065,48 @@ "https://www.googleapis.com/auth/compute" ] }, + "bulkInsert": { + "description": "Bulk create a set of disks.", + "flatPath": "projects/{project}/regions/{region}/disks/bulkInsert", + "httpMethod": "POST", + "id": "compute.regionDisks.bulkInsert", + "parameterOrder": [ + "project", + "region" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "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" + } + }, + "path": "projects/{project}/regions/{region}/disks/bulkInsert", + "request": { + "$ref": "BulkInsertDiskResource" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "createSnapshot": { "description": "Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.", "flatPath": "projects/{project}/regions/{region}/disks/{disk}/createSnapshot", @@ -28630,7 +28714,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request.", + "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "httpMethod": "PATCH", "id": "compute.regionSecurityPolicies.patch", @@ -28691,7 +28775,7 @@ ] }, "patchRule": { - "description": "Patches a rule at the specified priority.", + "description": "Patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and specify them in the updateMask.", "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/patchRule", "httpMethod": "POST", "id": "compute.regionSecurityPolicies.patchRule", @@ -28728,6 +28812,12 @@ "required": true, "type": "string" }, + "updateMask": { + "description": "Indicates fields to be cleared as part of this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, "validateOnly": { "description": "If true, the request will not be committed.", "location": "query", @@ -32918,7 +33008,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", + "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", "httpMethod": "PATCH", "id": "compute.securityPolicies.patch", @@ -39992,7 +40082,7 @@ } } }, - "revision": "20220918", + "revision": "20221011", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -41145,7 +41235,7 @@ "type": "integer" }, "maintenanceInterval": { - "description": "For more information about maintenance intervals, see Setting maintenance intervals.", + "description": "Specifies the frequency of planned maintenance events. The accepted values are: `PERIODIC`.", "enum": [ "PERIODIC" ], @@ -42904,7 +42994,7 @@ }, "outlierDetection": { "$ref": "OutlierDetection", - "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2, or GRPC, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. " }, "port": { "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.", @@ -44008,6 +44098,17 @@ }, "type": "object" }, + "BulkInsertDiskResource": { + "description": "A transient resource used in compute.disks.bulkInsert and compute.regionDisks.bulkInsert. It is only used to process requests and is not persisted.", + "id": "BulkInsertDiskResource", + "properties": { + "sourceConsistencyGroupPolicy": { + "description": "The URL of the DiskConsistencyGroupPolicy for the group of disks to clone. This may be a full or partial URL, such as: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy ", + "type": "string" + } + }, + "type": "object" + }, "BulkInsertInstanceResource": { "description": "A transient resource used in compute.instances.bulkInsert and compute.regionInstances.bulkInsert . This resource is not persisted anywhere, it is used only for processing the requests.", "id": "BulkInsertInstanceResource", @@ -50947,6 +51048,10 @@ }, "type": "array" }, + "pathTemplateMatch": { + "description": "If specified, the route is a pattern match expression that must match the :path header once the query string is removed. A pattern match allows you to match - The value must be between 1 and 1024 characters - The pattern must start with a leading slash (\"/\") - There may be no more than 5 operators in pattern Precisely one of prefix_match, full_path_match, regex_match or path_template_match must be set.", + "type": "string" + }, "prefixMatch": { "description": "For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be from 1 to 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified.", "type": "string" @@ -64678,22 +64783,22 @@ "description": "The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s." }, "consecutiveErrors": { - "description": "Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.", + "description": "Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, "consecutiveGatewayFailure": { - "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.", + "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, "enforcingConsecutiveErrors": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, "enforcingConsecutiveGatewayFailure": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, @@ -65861,6 +65966,22 @@ "$ref": "UsageExportLocation", "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." }, + "vmDnsSetting": { + "description": "[Output Only] Default internal DNS setting used by VMs running in this project.", + "enum": [ + "GLOBAL_DEFAULT", + "UNSPECIFIED_VM_DNS_SETTING", + "ZONAL_DEFAULT", + "ZONAL_ONLY" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ], + "type": "string" + }, "xpnProjectStatus": { "description": "[Output Only] The role this project has in a shared VPC configuration. Currently, only projects with the host role, which is specified by the value HOST, are differentiated.", "enum": [ @@ -66786,9 +66907,6 @@ "QueuedResourceList": { "id": "QueuedResourceList", "properties": { - "etag": { - "type": "string" - }, "id": { "description": "Unique identifier for the resource; defined by the server.", "type": "string" @@ -67120,6 +67238,7 @@ "PSC_INTERNAL_LB_FORWARDING_RULES", "PUBLIC_ADVERTISED_PREFIXES", "PUBLIC_DELEGATED_PREFIXES", + "QUEUED_RESOURCES", "REGIONAL_AUTOSCALERS", "REGIONAL_INSTANCE_GROUP_MANAGERS", "RESERVATIONS", @@ -67137,6 +67256,7 @@ "SSL_CERTIFICATES", "STATIC_ADDRESSES", "STATIC_BYOIP_ADDRESSES", + "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES", "SUBNETWORKS", "T2A_CPUS", "T2D_CPUS", @@ -67269,6 +67389,7 @@ "", "", "", + "", "The total number of snapshots allowed for a single project.", "", "", @@ -67287,6 +67408,7 @@ "", "", "", + "", "" ], "type": "string" @@ -71395,10 +71517,12 @@ "description": "List of NAT-ted endpoint types supported by the Nat Gateway. If the list is empty, then it will be equivalent to include ENDPOINT_TYPE_VM", "items": { "enum": [ + "ENDPOINT_TYPE_MANAGED_PROXY_LB", "ENDPOINT_TYPE_SWG", "ENDPOINT_TYPE_VM" ], "enumDescriptions": [ + "This is used for Regional Internal/External HTTP(S) and TCP Proxy load balancer endpoints.", "This is used for Secure Web Gateway endpoints.", "This is the default." ], @@ -71741,12 +71865,10 @@ "description": "Indicates why particular status was returned.", "enum": [ "MD5_AUTH_INTERNAL_PROBLEM", - "MISSING_NETWORK_CONNECTIVITY_CENTER_SPOKE", "STATUS_REASON_UNSPECIFIED" ], "enumDescriptions": [ "Indicates internal problems with configuration of MD5 authentication. This particular reason can only be returned when md5AuthEnabled is true and status is DOWN.", - "BGP peer disabled because it is not labeled as an NCC spoke. Currently, BGP peers using SD-WAN connectivity or CCI(Cross Cloud Interconnect) attachment will be disabled for this reason.", "" ], "type": "string" @@ -72317,9 +72439,6 @@ "format": "int64", "type": "string" }, - "dynamicResizeProperties": { - "$ref": "SchedulingDynamicResizeProperties" - }, "hostErrorTimeoutSeconds": { "description": "Specify the time in seconds for host error detection, the value must be within the range of [90, 330] with the increment of 30, if unset, the default behavior of host error recovery will be used.", "format": "int32", @@ -72353,7 +72472,7 @@ "type": "integer" }, "maintenanceInterval": { - "description": "For more information about maintenance intervals, see Setting maintenance intervals.", + "description": "Specifies the frequency of planned maintenance events. The accepted values are: `PERIODIC`.", "enum": [ "PERIODIC" ], @@ -72413,31 +72532,6 @@ }, "type": "object" }, - "SchedulingDynamicResizeProperties": { - "description": "Configuration for properties related to dynamic assignment of computing resources to VM (CPU and RAM).", - "id": "SchedulingDynamicResizeProperties", - "properties": { - "enableHotStandby": { - "description": "Set to true if this VM is supporting HotStandby modes (b/235044648).", - "type": "boolean" - }, - "hotStandbyState": { - "description": "Current Hot Standby state of VM.", - "enum": [ - "ACTIVE", - "HOTSTANDBY_STATE_UNSPECIFIED", - "STANDBY" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, "SchedulingNodeAffinity": { "description": "Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.", "id": "SchedulingNodeAffinity", @@ -72832,7 +72926,7 @@ "type": "integer" }, "rules": { - "description": "A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match \"*\"). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", + "description": "A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match \"*\" for srcIpRanges and for the networkMatch condition every field must be either match \"*\" or not set). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", "items": { "$ref": "SecurityPolicyRule" }, @@ -73216,7 +73310,7 @@ }, "networkMatch": { "$ref": "SecurityPolicyRuleNetworkMatcher", - "description": "A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - \"192.0.2.0/24\" - \"198.51.100.0/24\" userDefinedFields: - name: \"ipv4_fragment_offset\" values: - \"1-0x1fff\" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named \"ipv4_fragment_offset\" with a value between 1 and 0x1fff inclusive." + "description": "A match condition that incoming packets are evaluated against for CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding 'action' is enforced. The match criteria for a rule consists of built-in match fields (like 'srcIpRanges') and potentially multiple user-defined match fields ('userDefinedFields'). Field values may be extracted directly from the packet or derived from it (e.g. 'srcRegionCodes'). Some fields may not be present in every packet (e.g. 'srcPorts'). A user-defined field is only present if the base header is found in the packet and the entire field is in bounds. Each match field may specify which values can match it, listing one or more ranges, prefixes, or exact values that are considered a match for the field. A field value must be present in order to match a specified match field. If no match values are specified for a match field, then any field value is considered to match it, and it's not required to be present. For strings specifying '*' is also equivalent to match all. For a packet to match a rule, all specified match fields must match the corresponding field values derived from the packet. Example: networkMatch: srcIpRanges: - \"192.0.2.0/24\" - \"198.51.100.0/24\" userDefinedFields: - name: \"ipv4_fragment_offset\" values: - \"1-0x1fff\" The above match condition matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named \"ipv4_fragment_offset\" with a value between 1 and 0x1fff inclusive." }, "preconfiguredWafConfig": { "$ref": "SecurityPolicyRulePreconfiguredWafConfig", @@ -73407,6 +73501,7 @@ "type": "object" }, "SecurityPolicyRuleNetworkMatcher": { + "description": "Represents a match condition that incoming network traffic is evaluated against.", "id": "SecurityPolicyRuleNetworkMatcher", "properties": { "destIpRanges": { @@ -73589,13 +73684,16 @@ "type": "string" }, "enforceOnKey": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field 'enforce_on_key' is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. ", + "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field 'enforce_on_key' is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. ", "enum": [ "ALL", "ALL_IPS", "HTTP_COOKIE", "HTTP_HEADER", + "HTTP_PATH", "IP", + "REGION_CODE", + "SNI", "XFF_IP" ], "enumDescriptions": [ @@ -73604,6 +73702,9 @@ "", "", "", + "", + "", + "", "" ], "type": "string" @@ -80944,6 +81045,10 @@ "pathPrefixRewrite": { "description": "Before forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be from 1 to 1024 characters.", "type": "string" + }, + "pathTemplateRewrite": { + "description": " If specified, the pattern rewrites the URL path (based on the :path header) using the HTTP template syntax. A corresponding path_template_match must be specified. Any template variables must exist in the path_template_match field. - -At least one variable must be specified in the path_template_match field - You can omit variables from the rewritten URL - The * and ** operators cannot be matched unless they have a corresponding variable name - e.g. {format=*} or {var=**}. For example, a path_template_match of /static/{format=**} could be rewritten as /static/content/{format} to prefix /content to the URL. Variables can also be re-ordered in a rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as /content/{format}/{country}/{suffix}. At least one non-empty routeRules[].matchRules[].path_template_match is required. Only one of path_prefix_rewrite or path_template_rewrite may be specified.", + "type": "string" } }, "type": "object" diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index c4e1f3d08f5..1d979a81a0f 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -3092,8 +3092,8 @@ type AllocationSpecificSKUAllocationReservedInstanceProperties struct { // scheduled for maintenance. MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` - // MaintenanceInterval: For more information about maintenance - // intervals, see Setting maintenance intervals. + // MaintenanceInterval: Specifies the frequency of planned maintenance + // events. The accepted values are: `PERIODIC`. // // Possible values: // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a @@ -5960,11 +5960,9 @@ type BackendService struct { // hosts from the load balancing pool for the backend service. If not // set, this feature is considered disabled. This field is applicable to // either: - A regional backend service with the service_protocol set to - // HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to + // HTTP, HTTPS, HTTP2, or GRPC, and load_balancing_scheme set to // INTERNAL_MANAGED. - A global backend service with the - // load_balancing_scheme set to INTERNAL_SELF_MANAGED. Not supported - // when the backend service is referenced by a URL map that is bound to - // target gRPC proxy that has validateForProxyless field set to true. + // load_balancing_scheme set to INTERNAL_SELF_MANAGED. OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"` // Port: Deprecated in favor of portName. The TCP port to connect on the @@ -7777,6 +7775,44 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BulkInsertDiskResource: A transient resource used in +// compute.disks.bulkInsert and compute.regionDisks.bulkInsert. It is +// only used to process requests and is not persisted. +type BulkInsertDiskResource struct { + // SourceConsistencyGroupPolicy: The URL of the + // DiskConsistencyGroupPolicy for the group of disks to clone. This may + // be a full or partial URL, such as: - + // https://www.googleapis.com/compute/v1/projects/project/regions/region + // /resourcePolicies/resourcePolicy - + // projects/project/regions/region/resourcePolicies/resourcePolicy - + // regions/region/resourcePolicies/resourcePolicy + SourceConsistencyGroupPolicy string `json:"sourceConsistencyGroupPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SourceConsistencyGroupPolicy") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "SourceConsistencyGroupPolicy") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BulkInsertDiskResource) MarshalJSON() ([]byte, error) { + type NoMethod BulkInsertDiskResource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BulkInsertInstanceResource: A transient resource used in // compute.instances.bulkInsert and compute.regionInstances.bulkInsert . // This resource is not persisted anywhere, it is used only for @@ -19065,6 +19101,15 @@ type HttpRouteRuleMatch struct { // validateForProxyless field set to true. MetadataFilters []*MetadataFilter `json:"metadataFilters,omitempty"` + // PathTemplateMatch: If specified, the route is a pattern match + // expression that must match the :path header once the query string is + // removed. A pattern match allows you to match - The value must be + // between 1 and 1024 characters - The pattern must start with a leading + // slash ("/") - There may be no more than 5 operators in pattern + // Precisely one of prefix_match, full_path_match, regex_match or + // path_template_match must be set. + PathTemplateMatch string `json:"pathTemplateMatch,omitempty"` + // PrefixMatch: For satisfying the matchRule condition, the request's // path must begin with the specified prefixMatch. prefixMatch must // begin with a /. The value must be from 1 to 1024 characters. Only one @@ -40539,25 +40584,33 @@ type OutlierDetection struct { // ConsecutiveErrors: Number of errors before a host is ejected from the // connection pool. When the backend host is accessed over HTTP, a 5xx - // return code qualifies as an error. Defaults to 5. + // return code qualifies as an error. Defaults to 5. Not supported when + // the backend service is referenced by a URL map that is bound to + // target gRPC proxy that has validateForProxyless field set to true. ConsecutiveErrors int64 `json:"consecutiveErrors,omitempty"` // ConsecutiveGatewayFailure: The number of consecutive gateway failures // (502, 503, 504 status or connection errors that are mapped to one of // those status codes) before a consecutive gateway failure ejection - // occurs. Defaults to 3. + // occurs. Defaults to 3. Not supported when the backend service is + // referenced by a URL map that is bound to target gRPC proxy that has + // validateForProxyless field set to true. ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"` // EnforcingConsecutiveErrors: The percentage chance that a host will be // actually ejected when an outlier status is detected through // consecutive 5xx. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 0. + // ramp it up slowly. Defaults to 0. Not supported when the backend + // service is referenced by a URL map that is bound to target gRPC proxy + // that has validateForProxyless field set to true. EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"` // EnforcingConsecutiveGatewayFailure: The percentage chance that a host // will be actually ejected when an outlier status is detected through // consecutive gateway failures. This setting can be used to disable - // ejection or to ramp it up slowly. Defaults to 100. + // ejection or to ramp it up slowly. Defaults to 100. Not supported when + // the backend service is referenced by a URL map that is bound to + // target gRPC proxy that has validateForProxyless field set to true. EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"` // EnforcingSuccessRate: The percentage chance that a host will be @@ -42382,6 +42435,16 @@ type Project struct { // the Google Cloud Storage bucket where they are stored. UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` + // VmDnsSetting: [Output Only] Default internal DNS setting used by VMs + // running in this project. + // + // Possible values: + // "GLOBAL_DEFAULT" + // "UNSPECIFIED_VM_DNS_SETTING" + // "ZONAL_DEFAULT" + // "ZONAL_ONLY" + VmDnsSetting string `json:"vmDnsSetting,omitempty"` + // XpnProjectStatus: [Output Only] The role this project has in a shared // VPC configuration. Currently, only projects with the host role, which // is specified by the value HOST, are differentiated. @@ -43818,8 +43881,6 @@ func (s *QueuedResource) MarshalJSON() ([]byte, error) { } type QueuedResourceList struct { - Etag string `json:"etag,omitempty"` - // Id: Unique identifier for the resource; defined by the server. Id string `json:"id,omitempty"` @@ -43849,7 +43910,7 @@ type QueuedResourceList struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Etag") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -43857,7 +43918,7 @@ type QueuedResourceList struct { // 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 + // NullFields is a list of field names (e.g. "Id") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -44325,6 +44386,7 @@ type Quota struct { // "PSC_INTERNAL_LB_FORWARDING_RULES" // "PUBLIC_ADVERTISED_PREFIXES" // "PUBLIC_DELEGATED_PREFIXES" + // "QUEUED_RESOURCES" // "REGIONAL_AUTOSCALERS" // "REGIONAL_INSTANCE_GROUP_MANAGERS" // "RESERVATIONS" @@ -44343,6 +44405,7 @@ type Quota struct { // "SSL_CERTIFICATES" // "STATIC_ADDRESSES" // "STATIC_BYOIP_ADDRESSES" + // "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES" // "SUBNETWORKS" // "T2A_CPUS" // "T2D_CPUS" @@ -50932,6 +50995,8 @@ type RouterNat struct { // ENDPOINT_TYPE_VM // // Possible values: + // "ENDPOINT_TYPE_MANAGED_PROXY_LB" - This is used for Regional + // Internal/External HTTP(S) and TCP Proxy load balancer endpoints. // "ENDPOINT_TYPE_SWG" - This is used for Secure Web Gateway // endpoints. // "ENDPOINT_TYPE_VM" - This is the default. @@ -51343,10 +51408,6 @@ type RouterStatusBgpPeerStatus struct { // "MD5_AUTH_INTERNAL_PROBLEM" - Indicates internal problems with // configuration of MD5 authentication. This particular reason can only // be returned when md5AuthEnabled is true and status is DOWN. - // "MISSING_NETWORK_CONNECTIVITY_CENTER_SPOKE" - BGP peer disabled - // because it is not labeled as an NCC spoke. Currently, BGP peers using - // SD-WAN connectivity or CCI(Cross Cloud Interconnect) attachment will - // be disabled for this reason. // "STATUS_REASON_UNSPECIFIED" StatusReason string `json:"statusReason,omitempty"` @@ -52103,8 +52164,6 @@ type Scheduling struct { // or unset means default amount of memory of the current machine type. CurrentMemoryMb int64 `json:"currentMemoryMb,omitempty,string"` - DynamicResizeProperties *SchedulingDynamicResizeProperties `json:"dynamicResizeProperties,omitempty"` - // HostErrorTimeoutSeconds: Specify the time in seconds for host error // detection, the value must be within the range of [90, 330] with the // increment of 30, if unset, the default behavior of host error @@ -52137,8 +52196,8 @@ type Scheduling struct { // VM instance creation where the VM won't be scheduled for maintenance. MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` - // MaintenanceInterval: For more information about maintenance - // intervals, see Setting maintenance intervals. + // MaintenanceInterval: Specifies the frequency of planned maintenance + // events. The accepted values are: `PERIODIC`. // // Possible values: // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a @@ -52221,46 +52280,6 @@ func (s *Scheduling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// SchedulingDynamicResizeProperties: Configuration for properties -// related to dynamic assignment of computing resources to VM (CPU and -// RAM). -type SchedulingDynamicResizeProperties struct { - // EnableHotStandby: Set to true if this VM is supporting HotStandby - // modes (b/235044648). - EnableHotStandby bool `json:"enableHotStandby,omitempty"` - - // HotStandbyState: Current Hot Standby state of VM. - // - // Possible values: - // "ACTIVE" - // "HOTSTANDBY_STATE_UNSPECIFIED" - // "STANDBY" - HotStandbyState string `json:"hotStandbyState,omitempty"` - - // ForceSendFields is a list of field names (e.g. "EnableHotStandby") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EnableHotStandby") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *SchedulingDynamicResizeProperties) MarshalJSON() ([]byte, error) { - type NoMethod SchedulingDynamicResizeProperties - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // SchedulingNodeAffinity: Node Affinity: the configuration of desired // nodes onto which this Instance could be scheduled. type SchedulingNodeAffinity struct { @@ -52881,9 +52900,11 @@ type SecurityPolicy struct { RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` // Rules: A list of rules that belong to this policy. There must always - // be a default rule (rule with priority 2147483647 and match "*"). If - // no rules are provided when creating a security policy, a default rule - // with action "allow" will be added. + // be a default rule which is a rule with priority 2147483647 and match + // all condition (for the match condition this means match "*" for + // srcIpRanges and for the networkMatch condition every field must be + // either match "*" or not set). If no rules are provided when creating + // a security policy, a default rule with action "allow" will be added. Rules []*SecurityPolicyRule `json:"rules,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -53564,9 +53585,10 @@ type SecurityPolicyRule struct { // considered a match for the field. A field value must be present in // order to match a specified match field. If no match values are // specified for a match field, then any field value is considered to - // match it, and it's not required to be present. For a packet to match - // a rule, all specified match fields must match the corresponding field - // values derived from the packet. Example: networkMatch: srcIpRanges: - + // match it, and it's not required to be present. For strings specifying + // '*' is also equivalent to match all. For a packet to match a rule, + // all specified match fields must match the corresponding field values + // derived from the packet. Example: networkMatch: srcIpRanges: - // "192.0.2.0/24" - "198.51.100.0/24" userDefinedFields: - name: // "ipv4_fragment_offset" values: - "1-0x1fff" The above match condition // matches packets with a source IP in 192.0.2.0/24 or 198.51.100.0/24 @@ -53882,6 +53904,8 @@ func (s *SecurityPolicyRuleMatcherConfigLayer4Config) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SecurityPolicyRuleNetworkMatcher: Represents a match condition that +// incoming network traffic is evaluated against. type SecurityPolicyRuleNetworkMatcher struct { // DestIpRanges: Destination IPv4/IPv6 addresses or CIDR prefixes, in // standard text format. @@ -54130,14 +54154,22 @@ type SecurityPolicyRuleRateLimitOptions struct { // HTTP_COOKIE: The value of the HTTP cookie whose name is configured // under "enforce_on_key_name". The key value is truncated to the first // 128 bytes of the cookie value. If no such cookie is present in the - // request, the key type defaults to ALL. + // request, the key type defaults to ALL. - HTTP_PATH: The URL path of + // the HTTP request. The key value is truncated to the first 128 bytes. + // - SNI: Server name indication in the TLS session of the HTTPS + // request. The key value is truncated to the first 128 bytes. The key + // type defaults to ALL on a HTTP session. - REGION_CODE: The + // country/region from which the request originates. // // Possible values: // "ALL" // "ALL_IPS" // "HTTP_COOKIE" // "HTTP_HEADER" + // "HTTP_PATH" // "IP" + // "REGION_CODE" + // "SNI" // "XFF_IP" EnforceOnKey string `json:"enforceOnKey,omitempty"` @@ -65887,6 +65919,22 @@ type UrlRewrite struct { // characters. PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"` + // PathTemplateRewrite: If specified, the pattern rewrites the URL path + // (based on the :path header) using the HTTP template syntax. A + // corresponding path_template_match must be specified. Any template + // variables must exist in the path_template_match field. - -At least + // one variable must be specified in the path_template_match field - You + // can omit variables from the rewritten URL - The * and ** operators + // cannot be matched unless they have a corresponding variable name - + // e.g. {format=*} or {var=**}. For example, a path_template_match of + // /static/{format=**} could be rewritten as /static/content/{format} to + // prefix /content to the URL. Variables can also be re-ordered in a + // rewrite, so that /{country}/{format}/{suffix=**} can be rewritten as + // /content/{format}/{country}/{suffix}. At least one non-empty + // routeRules[].matchRules[].path_template_match is required. Only one + // of path_prefix_rewrite or path_template_rewrite may be specified. + PathTemplateRewrite string `json:"pathTemplateRewrite,omitempty"` + // ForceSendFields is a list of field names (e.g. "HostRewrite") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -79216,6 +79264,182 @@ func (c *DisksAggregatedListCall) Pages(ctx context.Context, f func(*DiskAggrega } } +// method id "compute.disks.bulkInsert": + +type DisksBulkInsertCall struct { + s *Service + project string + zone string + bulkinsertdiskresource *BulkInsertDiskResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BulkInsert: Bulk create a set of disks. +// +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *DisksService) BulkInsert(project string, zone string, bulkinsertdiskresource *BulkInsertDiskResource) *DisksBulkInsertCall { + c := &DisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.bulkinsertdiskresource = bulkinsertdiskresource + 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 *DisksBulkInsertCall) RequestId(requestId string) *DisksBulkInsertCall { + 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 *DisksBulkInsertCall) Fields(s ...googleapi.Field) *DisksBulkInsertCall { + 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 *DisksBulkInsertCall) Context(ctx context.Context) *DisksBulkInsertCall { + 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 *DisksBulkInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DisksBulkInsertCall) 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.bulkinsertdiskresource) + 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}/disks/bulkInsert") + 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.disks.bulkInsert" 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 *DisksBulkInsertCall) 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": "Bulk create a set of disks.", + // "flatPath": "projects/{project}/zones/{zone}/disks/bulkInsert", + // "httpMethod": "POST", + // "id": "compute.disks.bulkInsert", + // "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": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "projects/{project}/zones/{zone}/disks/bulkInsert", + // "request": { + // "$ref": "BulkInsertDiskResource" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.disks.createSnapshot": type DisksCreateSnapshotCall struct { @@ -165995,6 +166219,182 @@ func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (* } +// method id "compute.regionDisks.bulkInsert": + +type RegionDisksBulkInsertCall struct { + s *Service + project string + region string + bulkinsertdiskresource *BulkInsertDiskResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BulkInsert: Bulk create a set of disks. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionDisksService) BulkInsert(project string, region string, bulkinsertdiskresource *BulkInsertDiskResource) *RegionDisksBulkInsertCall { + c := &RegionDisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.bulkinsertdiskresource = bulkinsertdiskresource + 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 *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulkInsertCall { + 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 *RegionDisksBulkInsertCall) Fields(s ...googleapi.Field) *RegionDisksBulkInsertCall { + 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 *RegionDisksBulkInsertCall) Context(ctx context.Context) *RegionDisksBulkInsertCall { + 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 *RegionDisksBulkInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDisksBulkInsertCall) 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.bulkinsertdiskresource) + 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}/regions/{region}/disks/bulkInsert") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionDisks.bulkInsert" 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 *RegionDisksBulkInsertCall) 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": "Bulk create a set of disks.", + // "flatPath": "projects/{project}/regions/{region}/disks/bulkInsert", + // "httpMethod": "POST", + // "id": "compute.regionDisks.bulkInsert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "The name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "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" + // } + // }, + // "path": "projects/{project}/regions/{region}/disks/bulkInsert", + // "request": { + // "$ref": "BulkInsertDiskResource" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.regionDisks.createSnapshot": type RegionDisksCreateSnapshotCall struct { @@ -188486,7 +188886,10 @@ type RegionSecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. +// request. To clear fields in the rule, leave the fields empty and +// specify them in the updateMask. This cannot be used to be update the +// rules in the policy. Please use the per rule methods like addRule, +// patchRule, and removeRule instead. // // - project: Project ID for this request. // - region: Name of the region scoping this request. @@ -188622,7 +189025,7 @@ func (c *RegionSecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request.", + // "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", // "httpMethod": "PATCH", // "id": "compute.regionSecurityPolicies.patch", @@ -188698,7 +189101,9 @@ type RegionSecurityPoliciesPatchRuleCall struct { header_ http.Header } -// PatchRule: Patches a rule at the specified priority. +// PatchRule: Patches a rule at the specified priority. To clear fields +// in the rule, leave the fields empty and specify them in the +// updateMask. // // - project: Project ID for this request. // - region: Name of the region scoping this request. @@ -188719,6 +189124,13 @@ func (c *RegionSecurityPoliciesPatchRuleCall) Priority(priority int64) *RegionSe return c } +// UpdateMask sets the optional parameter "updateMask": Indicates fields +// to be cleared as part of this request. +func (c *RegionSecurityPoliciesPatchRuleCall) UpdateMask(updateMask string) *RegionSecurityPoliciesPatchRuleCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // ValidateOnly sets the optional parameter "validateOnly": If true, the // request will not be committed. func (c *RegionSecurityPoliciesPatchRuleCall) ValidateOnly(validateOnly bool) *RegionSecurityPoliciesPatchRuleCall { @@ -188819,7 +189231,7 @@ func (c *RegionSecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Patches a rule at the specified priority.", + // "description": "Patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and specify them in the updateMask.", // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}/patchRule", // "httpMethod": "POST", // "id": "compute.regionSecurityPolicies.patchRule", @@ -188856,6 +189268,12 @@ func (c *RegionSecurityPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) ( // "required": true, // "type": "string" // }, + // "updateMask": { + // "description": "Indicates fields to be cleared as part of this request.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, // "validateOnly": { // "description": "If true, the request will not be committed.", // "location": "query", @@ -205988,9 +206406,10 @@ type SecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. This cannot be used to be update the rules in the policy. -// Please use the per rule methods like addRule, patchRule, and -// removeRule instead. +// request. To clear fields in the rule, leave the fields empty and +// specify them in the updateMask. This cannot be used to be update the +// rules in the policy. Please use the per rule methods like addRule, +// patchRule, and removeRule instead. // // - project: Project ID for this request. // - securityPolicy: Name of the security policy to update. @@ -206123,7 +206542,7 @@ func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", + // "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", // "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", // "httpMethod": "PATCH", // "id": "compute.securityPolicies.patch", diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index b92c8d43e5e..831357c48c8 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -24520,7 +24520,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request.", + "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "httpMethod": "PATCH", "id": "compute.regionSecurityPolicies.patch", @@ -28693,7 +28693,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", + "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", "httpMethod": "PATCH", "id": "compute.securityPolicies.patch", @@ -35512,7 +35512,7 @@ } } }, - "revision": "20220918", + "revision": "20221011", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -36610,7 +36610,7 @@ "type": "integer" }, "maintenanceInterval": { - "description": "For more information about maintenance intervals, see Setting maintenance intervals.", + "description": "Specifies the frequency of planned maintenance events. The accepted values are: `PERIODIC`.", "enum": [ "PERIODIC" ], @@ -38250,7 +38250,7 @@ }, "outlierDetection": { "$ref": "OutlierDetection", - "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2, or GRPC, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. " }, "port": { "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.", @@ -41356,11 +41356,13 @@ "description": "The distribution shape to which the group converges either proactively or on resize events (depending on the value set in updatePolicy.instanceRedistributionType).", "enum": [ "ANY", + "ANY_SINGLE_ZONE", "BALANCED", "EVEN" ], "enumDescriptions": [ "The group picks zones for creating VM instances to fulfill the requested number of VMs within present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads that do not require high availability.", + "The group creates all VM instances within a single zone. The zone is selected based on the present resource constraints and to maximize utilization of unused zonal reservations. Recommended for batch workloads with heavy interprocess communication.", "The group prioritizes acquisition of resources, scheduling VMs in zones where resources are available while distributing VMs as evenly as possible across selected zones to minimize the impact of zonal failure. Recommended for highly available serving workloads.", "The group schedules VM instance creation and deletion to achieve and maintain an even number of managed instances across the selected zones. The distribution is even when the number of managed instances does not differ by more than 1 between any two zones. Recommended for highly available serving workloads." ], @@ -46423,6 +46425,10 @@ "description": "[Output Only] The URL of the Instance Group resource.", "type": "string" }, + "instanceLifecyclePolicy": { + "$ref": "InstanceGroupManagerInstanceLifecyclePolicy", + "description": "The repair policy for this managed instance group." + }, "instanceTemplate": { "description": "The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.", "type": "string" @@ -46741,6 +46747,24 @@ }, "type": "object" }, + "InstanceGroupManagerInstanceLifecyclePolicy": { + "id": "InstanceGroupManagerInstanceLifecyclePolicy", + "properties": { + "forceUpdateOnRepair": { + "description": "A bit indicating whether to forcefully apply the group's latest configuration when repairing a VM. Valid options are: - NO (default): If configuration updates are available, they are not forcefully applied during repair. Instead, configuration updates are applied according to the group's update policy. - YES: If configuration updates are available, they are applied during repair. ", + "enum": [ + "NO", + "YES" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "InstanceGroupManagerList": { "description": "[Output Only] A list of managed instance groups.", "id": "InstanceGroupManagerList", @@ -51611,6 +51635,9 @@ }, "localizedMessage": { "$ref": "LocalizedMessage" + }, + "quotaInfo": { + "$ref": "QuotaExceededInfo" } }, "type": "object" @@ -55277,6 +55304,9 @@ }, "localizedMessage": { "$ref": "LocalizedMessage" + }, + "quotaInfo": { + "$ref": "QuotaExceededInfo" } }, "type": "object" @@ -55857,22 +55887,22 @@ "description": "The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s." }, "consecutiveErrors": { - "description": "Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.", + "description": "Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, "consecutiveGatewayFailure": { - "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.", + "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, "enforcingConsecutiveErrors": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, "enforcingConsecutiveGatewayFailure": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, @@ -57778,6 +57808,7 @@ "SSL_CERTIFICATES", "STATIC_ADDRESSES", "STATIC_BYOIP_ADDRESSES", + "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES", "SUBNETWORKS", "T2A_CPUS", "T2D_CPUS", @@ -57926,6 +57957,7 @@ "", "", "", + "", "" ], "type": "string" @@ -57942,6 +57974,33 @@ }, "type": "object" }, + "QuotaExceededInfo": { + "description": "Additional details for quota exceeded error for resource quota.", + "id": "QuotaExceededInfo", + "properties": { + "dimensions": { + "additionalProperties": { + "type": "string" + }, + "description": "The map holding related quota dimensions.", + "type": "object" + }, + "limit": { + "description": "Current effective quota limit. The limit's unit depends on the quota type or metric.", + "format": "double", + "type": "number" + }, + "limitName": { + "description": "The name of the quota limit.", + "type": "string" + }, + "metricName": { + "description": "The Compute Engine quota metric name.", + "type": "string" + } + }, + "type": "object" + }, "Reference": { "description": "Represents a reference to a resource.", "id": "Reference", @@ -62534,7 +62593,7 @@ "type": "integer" }, "maintenanceInterval": { - "description": "For more information about maintenance intervals, see Setting maintenance intervals.", + "description": "Specifies the frequency of planned maintenance events. The accepted values are: `PERIODIC`.", "enum": [ "PERIODIC" ], @@ -62543,6 +62602,10 @@ ], "type": "string" }, + "maxRunDuration": { + "$ref": "Duration", + "description": "Specifies the max run duration for the given instance. If specified, the instance termination action will be performed at the end of the run duration." + }, "minNodeCpus": { "description": "The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node.", "format": "int32", @@ -62582,6 +62645,10 @@ "Standard provisioning with user controlled runtime, no discounts." ], "type": "string" + }, + "terminationTime": { + "description": "Specifies the timestamp, when the instance will be terminated, in RFC3339 text format. If specified, the instance termination action will be performed at the termination time.", + "type": "string" } }, "type": "object" @@ -62966,7 +63033,7 @@ "type": "integer" }, "rules": { - "description": "A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match \"*\"). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", + "description": "A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match \"*\" for srcIpRanges and for the networkMatch condition every field must be either match \"*\" or not set). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", "items": { "$ref": "SecurityPolicyRule" }, @@ -63567,13 +63634,16 @@ "type": "string" }, "enforceOnKey": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field 'enforce_on_key' is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. ", + "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field 'enforce_on_key' is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. ", "enum": [ "ALL", "ALL_IPS", "HTTP_COOKIE", "HTTP_HEADER", + "HTTP_PATH", "IP", + "REGION_CODE", + "SNI", "XFF_IP" ], "enumDescriptions": [ @@ -63582,6 +63652,9 @@ "", "", "", + "", + "", + "", "" ], "type": "string" @@ -66136,6 +66209,10 @@ "description": "URL of the region where the Subnetwork resides. This field can be set only at resource creation time.", "type": "string" }, + "reservedInternalRange": { + "description": "The URL of the reserved internal range.", + "type": "string" + }, "role": { "description": "The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request.", "enum": [ @@ -66505,6 +66582,10 @@ "rangeName": { "description": "The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork.", "type": "string" + }, + "reservedInternalRange": { + "description": "The URL of the reserved internal range.", + "type": "string" } }, "type": "object" diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index d683fb892f3..9f640d9280f 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -2905,8 +2905,8 @@ type AllocationSpecificSKUAllocationReservedInstanceProperties struct { // scheduled for maintenance. MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` - // MaintenanceInterval: For more information about maintenance - // intervals, see Setting maintenance intervals. + // MaintenanceInterval: Specifies the frequency of planned maintenance + // events. The accepted values are: `PERIODIC`. // // Possible values: // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a @@ -5618,11 +5618,9 @@ type BackendService struct { // hosts from the load balancing pool for the backend service. If not // set, this feature is considered disabled. This field is applicable to // either: - A regional backend service with the service_protocol set to - // HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to + // HTTP, HTTPS, HTTP2, or GRPC, and load_balancing_scheme set to // INTERNAL_MANAGED. - A global backend service with the - // load_balancing_scheme set to INTERNAL_SELF_MANAGED. Not supported - // when the backend service is referenced by a URL map that is bound to - // target gRPC proxy that has validateForProxyless field set to true. + // load_balancing_scheme set to INTERNAL_SELF_MANAGED. OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"` // Port: Deprecated in favor of portName. The TCP port to connect on the @@ -10573,6 +10571,11 @@ type DistributionPolicy struct { // the requested number of VMs within present resource constraints and // to maximize utilization of unused zonal reservations. Recommended for // batch workloads that do not require high availability. + // "ANY_SINGLE_ZONE" - The group creates all VM instances within a + // single zone. The zone is selected based on the present resource + // constraints and to maximize utilization of unused zonal reservations. + // Recommended for batch workloads with heavy interprocess + // communication. // "BALANCED" - The group prioritizes acquisition of resources, // scheduling VMs in zones where resources are available while // distributing VMs as evenly as possible across selected zones to @@ -18617,6 +18620,10 @@ type InstanceGroupManager struct { // InstanceGroup: [Output Only] The URL of the Instance Group resource. InstanceGroup string `json:"instanceGroup,omitempty"` + // InstanceLifecyclePolicy: The repair policy for this managed instance + // group. + InstanceLifecyclePolicy *InstanceGroupManagerInstanceLifecyclePolicy `json:"instanceLifecyclePolicy,omitempty"` + // InstanceTemplate: The URL of the instance template that is specified // for this managed instance group. The group uses this template to // create all new instances in the managed instance group. The templates @@ -19088,6 +19095,43 @@ func (s *InstanceGroupManagerAutoHealingPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstanceGroupManagerInstanceLifecyclePolicy struct { + // ForceUpdateOnRepair: A bit indicating whether to forcefully apply the + // group's latest configuration when repairing a VM. Valid options are: + // - NO (default): If configuration updates are available, they are not + // forcefully applied during repair. Instead, configuration updates are + // applied according to the group's update policy. - YES: If + // configuration updates are available, they are applied during repair. + // + // Possible values: + // "NO" + // "YES" + ForceUpdateOnRepair string `json:"forceUpdateOnRepair,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ForceUpdateOnRepair") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ForceUpdateOnRepair") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerInstanceLifecyclePolicy) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerInstanceLifecyclePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstanceGroupManagerList: [Output Only] A list of managed instance // groups. type InstanceGroupManagerList struct { @@ -27010,6 +27054,8 @@ type ManagedInstanceLastAttemptErrorsErrorsErrorDetails struct { 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 @@ -32902,6 +32948,8 @@ type OperationErrorErrorsErrorDetails struct { 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 @@ -33655,25 +33703,33 @@ type OutlierDetection struct { // ConsecutiveErrors: Number of errors before a host is ejected from the // connection pool. When the backend host is accessed over HTTP, a 5xx - // return code qualifies as an error. Defaults to 5. + // return code qualifies as an error. Defaults to 5. Not supported when + // the backend service is referenced by a URL map that is bound to + // target gRPC proxy that has validateForProxyless field set to true. ConsecutiveErrors int64 `json:"consecutiveErrors,omitempty"` // ConsecutiveGatewayFailure: The number of consecutive gateway failures // (502, 503, 504 status or connection errors that are mapped to one of // those status codes) before a consecutive gateway failure ejection - // occurs. Defaults to 3. + // occurs. Defaults to 3. Not supported when the backend service is + // referenced by a URL map that is bound to target gRPC proxy that has + // validateForProxyless field set to true. ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"` // EnforcingConsecutiveErrors: The percentage chance that a host will be // actually ejected when an outlier status is detected through // consecutive 5xx. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 0. + // ramp it up slowly. Defaults to 0. Not supported when the backend + // service is referenced by a URL map that is bound to target gRPC proxy + // that has validateForProxyless field set to true. EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"` // EnforcingConsecutiveGatewayFailure: The percentage chance that a host // will be actually ejected when an outlier status is detected through // consecutive gateway failures. This setting can be used to disable - // ejection or to ramp it up slowly. Defaults to 100. + // ejection or to ramp it up slowly. Defaults to 100. Not supported when + // the backend service is referenced by a URL map that is bound to + // target gRPC proxy that has validateForProxyless field set to true. EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"` // EnforcingSuccessRate: The percentage chance that a host will be @@ -36647,6 +36703,7 @@ type Quota struct { // "SSL_CERTIFICATES" // "STATIC_ADDRESSES" // "STATIC_BYOIP_ADDRESSES" + // "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES" // "SUBNETWORKS" // "T2A_CPUS" // "T2D_CPUS" @@ -36709,6 +36766,59 @@ func (s *Quota) UnmarshalJSON(data []byte) error { return nil } +// QuotaExceededInfo: Additional details for quota exceeded error for +// resource quota. +type QuotaExceededInfo struct { + // Dimensions: The map holding related quota dimensions. + Dimensions map[string]string `json:"dimensions,omitempty"` + + // Limit: Current effective quota limit. The limit's unit depends on the + // quota type or metric. + Limit float64 `json:"limit,omitempty"` + + // LimitName: The name of the quota limit. + LimitName string `json:"limitName,omitempty"` + + // MetricName: The Compute Engine quota metric name. + MetricName string `json:"metricName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QuotaExceededInfo) MarshalJSON() ([]byte, error) { + type NoMethod QuotaExceededInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *QuotaExceededInfo) UnmarshalJSON(data []byte) error { + type NoMethod QuotaExceededInfo + var s1 struct { + Limit gensupport.JSONFloat64 `json:"limit"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Limit = float64(s1.Limit) + return nil +} + // Reference: Represents a reference to a resource. type Reference struct { // Kind: [Output Only] Type of the resource. Always compute#reference @@ -43702,8 +43812,8 @@ type Scheduling struct { // VM instance creation where the VM won't be scheduled for maintenance. MaintenanceFreezeDurationHours int64 `json:"maintenanceFreezeDurationHours,omitempty"` - // MaintenanceInterval: For more information about maintenance - // intervals, see Setting maintenance intervals. + // MaintenanceInterval: Specifies the frequency of planned maintenance + // events. The accepted values are: `PERIODIC`. // // Possible values: // "PERIODIC" - VMs receive infrastructure and hypervisor updates on a @@ -43714,6 +43824,11 @@ type Scheduling struct { // available. MaintenanceInterval string `json:"maintenanceInterval,omitempty"` + // MaxRunDuration: Specifies the max run duration for the given + // instance. If specified, the instance termination action will be + // performed at the end of the run duration. + MaxRunDuration *Duration `json:"maxRunDuration,omitempty"` + // MinNodeCpus: The minimum number of virtual CPUs this instance will // consume when running on a sole-tenant node. MinNodeCpus int64 `json:"minNodeCpus,omitempty"` @@ -43752,6 +43867,11 @@ type Scheduling struct { // discounts. ProvisioningModel string `json:"provisioningModel,omitempty"` + // TerminationTime: Specifies the timestamp, when the instance will be + // terminated, in RFC3339 text format. If specified, the instance + // termination action will be performed at the termination time. + TerminationTime string `json:"terminationTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutomaticRestart") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -44363,9 +44483,11 @@ type SecurityPolicy struct { RuleTupleCount int64 `json:"ruleTupleCount,omitempty"` // Rules: A list of rules that belong to this policy. There must always - // be a default rule (rule with priority 2147483647 and match "*"). If - // no rules are provided when creating a security policy, a default rule - // with action "allow" will be added. + // be a default rule which is a rule with priority 2147483647 and match + // all condition (for the match condition this means match "*" for + // srcIpRanges and for the networkMatch condition every field must be + // either match "*" or not set). If no rules are provided when creating + // a security policy, a default rule with action "allow" will be added. Rules []*SecurityPolicyRule `json:"rules,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -45397,14 +45519,22 @@ type SecurityPolicyRuleRateLimitOptions struct { // HTTP_COOKIE: The value of the HTTP cookie whose name is configured // under "enforce_on_key_name". The key value is truncated to the first // 128 bytes of the cookie value. If no such cookie is present in the - // request, the key type defaults to ALL. + // request, the key type defaults to ALL. - HTTP_PATH: The URL path of + // the HTTP request. The key value is truncated to the first 128 bytes. + // - SNI: Server name indication in the TLS session of the HTTPS + // request. The key value is truncated to the first 128 bytes. The key + // type defaults to ALL on a HTTP session. - REGION_CODE: The + // country/region from which the request originates. // // Possible values: // "ALL" // "ALL_IPS" // "HTTP_COOKIE" // "HTTP_HEADER" + // "HTTP_PATH" // "IP" + // "REGION_CODE" + // "SNI" // "XFF_IP" EnforceOnKey string `json:"enforceOnKey,omitempty"` @@ -49332,6 +49462,9 @@ type Subnetwork struct { // can be set only at resource creation time. Region string `json:"region,omitempty"` + // ReservedInternalRange: The URL of the reserved internal range. + ReservedInternalRange string `json:"reservedInternalRange,omitempty"` + // Role: The role of subnetwork. Currently, this field is only used when // purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to // ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being @@ -49896,6 +50029,9 @@ type SubnetworkSecondaryRange struct { // unique within the subnetwork. RangeName string `json:"rangeName,omitempty"` + // ReservedInternalRange: The URL of the reserved internal range. + ReservedInternalRange string `json:"reservedInternalRange,omitempty"` + // ForceSendFields is a list of field names (e.g. "IpCidrRange") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -162161,7 +162297,10 @@ type RegionSecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. +// request. To clear fields in the rule, leave the fields empty and +// specify them in the updateMask. This cannot be used to be update the +// rules in the policy. Please use the per rule methods like addRule, +// patchRule, and removeRule instead. // // - project: Project ID for this request. // - region: Name of the region scoping this request. @@ -162284,7 +162423,7 @@ func (c *RegionSecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request.", + // "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", // "httpMethod": "PATCH", // "id": "compute.regionSecurityPolicies.patch", @@ -179277,9 +179416,10 @@ type SecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. This cannot be used to be update the rules in the policy. -// Please use the per rule methods like addRule, patchRule, and -// removeRule instead. +// request. To clear fields in the rule, leave the fields empty and +// specify them in the updateMask. This cannot be used to be update the +// rules in the policy. Please use the per rule methods like addRule, +// patchRule, and removeRule instead. // // - project: Project ID for this request. // - securityPolicy: Name of the security policy to update. @@ -179399,7 +179539,7 @@ func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", + // "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", // "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", // "httpMethod": "PATCH", // "id": "compute.securityPolicies.patch", diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index eb794323a49..2f7ef8575b0 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -22237,7 +22237,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request.", + "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", "httpMethod": "PATCH", "id": "compute.regionSecurityPolicies.patch", @@ -25995,7 +25995,7 @@ ] }, "patch": { - "description": "Patches the specified policy with the data included in the request. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", + "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", "httpMethod": "PATCH", "id": "compute.securityPolicies.patch", @@ -32223,7 +32223,7 @@ } } }, - "revision": "20220918", + "revision": "20221011", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -34889,7 +34889,7 @@ }, "outlierDetection": { "$ref": "OutlierDetection", - "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true." + "description": "Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled. This field is applicable to either: - A regional backend service with the service_protocol set to HTTP, HTTPS, HTTP2, or GRPC, and load_balancing_scheme set to INTERNAL_MANAGED. - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED. " }, "port": { "description": "Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80. For Internal TCP/UDP Load Balancing and Network Load Balancing, omit port.", @@ -42831,6 +42831,18 @@ "description": "[Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.", "type": "string" }, + "listManagedInstancesResults": { + "description": "Pagination behavior of the listManagedInstances API method for this managed instance group.", + "enum": [ + "PAGELESS", + "PAGINATED" + ], + "enumDescriptions": [ + "(Default) Pagination is disabled for the group's listManagedInstances API method. maxResults and pageToken query parameters are ignored and all instances are returned in a single response.", + "Pagination is enabled for the group's listManagedInstances API method. maxResults and pageToken query parameters are respected." + ], + "type": "string" + }, "name": { "annotations": { "required": [ @@ -47807,6 +47819,9 @@ }, "localizedMessage": { "$ref": "LocalizedMessage" + }, + "quotaInfo": { + "$ref": "QuotaExceededInfo" } }, "type": "object" @@ -51376,6 +51391,9 @@ }, "localizedMessage": { "$ref": "LocalizedMessage" + }, + "quotaInfo": { + "$ref": "QuotaExceededInfo" } }, "type": "object" @@ -51938,22 +51956,22 @@ "description": "The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s." }, "consecutiveErrors": { - "description": "Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.", + "description": "Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, "consecutiveGatewayFailure": { - "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.", + "description": "The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, "enforcingConsecutiveErrors": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, "enforcingConsecutiveGatewayFailure": { - "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.", + "description": "The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.", "format": "int32", "type": "integer" }, @@ -53808,6 +53826,7 @@ "SSL_CERTIFICATES", "STATIC_ADDRESSES", "STATIC_BYOIP_ADDRESSES", + "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES", "SUBNETWORKS", "T2A_CPUS", "T2D_CPUS", @@ -53955,6 +53974,7 @@ "", "", "", + "", "" ], "type": "string" @@ -53971,6 +53991,33 @@ }, "type": "object" }, + "QuotaExceededInfo": { + "description": "Additional details for quota exceeded error for resource quota.", + "id": "QuotaExceededInfo", + "properties": { + "dimensions": { + "additionalProperties": { + "type": "string" + }, + "description": "The map holding related quota dimensions.", + "type": "object" + }, + "limit": { + "description": "Current effective quota limit. The limit's unit depends on the quota type or metric.", + "format": "double", + "type": "number" + }, + "limitName": { + "description": "The name of the quota limit.", + "type": "string" + }, + "metricName": { + "description": "The Compute Engine quota metric name.", + "type": "string" + } + }, + "type": "object" + }, "Reference": { "description": "Represents a reference to a resource.", "id": "Reference", @@ -58871,7 +58918,7 @@ "type": "string" }, "rules": { - "description": "A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match \"*\"). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", + "description": "A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match \"*\" for srcIpRanges and for the networkMatch condition every field must be either match \"*\" or not set). If no rules are provided when creating a security policy, a default rule with action \"allow\" will be added.", "items": { "$ref": "SecurityPolicyRule" }, @@ -59255,15 +59302,21 @@ "type": "string" }, "enforceOnKey": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field 'enforce_on_key' is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. ", + "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if this field 'enforce_on_key' is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforce_on_key_name\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. ", "enum": [ "ALL", "HTTP_COOKIE", "HTTP_HEADER", + "HTTP_PATH", "IP", + "REGION_CODE", + "SNI", "XFF_IP" ], "enumDescriptions": [ + "", + "", + "", "", "", "", diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index b009e68051f..1d5ea449471 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -5493,11 +5493,9 @@ type BackendService struct { // hosts from the load balancing pool for the backend service. If not // set, this feature is considered disabled. This field is applicable to // either: - A regional backend service with the service_protocol set to - // HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to + // HTTP, HTTPS, HTTP2, or GRPC, and load_balancing_scheme set to // INTERNAL_MANAGED. - A global backend service with the - // load_balancing_scheme set to INTERNAL_SELF_MANAGED. Not supported - // when the backend service is referenced by a URL map that is bound to - // target gRPC proxy that has validateForProxyless field set to true. + // load_balancing_scheme set to INTERNAL_SELF_MANAGED. OutlierDetection *OutlierDetection `json:"outlierDetection,omitempty"` // Port: Deprecated in favor of portName. The TCP port to connect on the @@ -18197,6 +18195,19 @@ type InstanceGroupManager struct { // compute#instanceGroupManager for managed instance groups. Kind string `json:"kind,omitempty"` + // ListManagedInstancesResults: Pagination behavior of the + // listManagedInstances API method for this managed instance group. + // + // Possible values: + // "PAGELESS" - (Default) Pagination is disabled for the group's + // listManagedInstances API method. maxResults and pageToken query + // parameters are ignored and all instances are returned in a single + // response. + // "PAGINATED" - Pagination is enabled for the group's + // listManagedInstances API method. maxResults and pageToken query + // parameters are respected. + ListManagedInstancesResults string `json:"listManagedInstancesResults,omitempty"` + // Name: The name of the managed instance group. The name must be 1-63 // characters long, and comply with RFC1035. Name string `json:"name,omitempty"` @@ -26201,6 +26212,8 @@ type ManagedInstanceLastAttemptErrorsErrorsErrorDetails struct { 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 @@ -31913,6 +31926,8 @@ type OperationErrorErrorsErrorDetails struct { 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 @@ -32630,25 +32645,33 @@ type OutlierDetection struct { // ConsecutiveErrors: Number of errors before a host is ejected from the // connection pool. When the backend host is accessed over HTTP, a 5xx - // return code qualifies as an error. Defaults to 5. + // return code qualifies as an error. Defaults to 5. Not supported when + // the backend service is referenced by a URL map that is bound to + // target gRPC proxy that has validateForProxyless field set to true. ConsecutiveErrors int64 `json:"consecutiveErrors,omitempty"` // ConsecutiveGatewayFailure: The number of consecutive gateway failures // (502, 503, 504 status or connection errors that are mapped to one of // those status codes) before a consecutive gateway failure ejection - // occurs. Defaults to 3. + // occurs. Defaults to 3. Not supported when the backend service is + // referenced by a URL map that is bound to target gRPC proxy that has + // validateForProxyless field set to true. ConsecutiveGatewayFailure int64 `json:"consecutiveGatewayFailure,omitempty"` // EnforcingConsecutiveErrors: The percentage chance that a host will be // actually ejected when an outlier status is detected through // consecutive 5xx. This setting can be used to disable ejection or to - // ramp it up slowly. Defaults to 0. + // ramp it up slowly. Defaults to 0. Not supported when the backend + // service is referenced by a URL map that is bound to target gRPC proxy + // that has validateForProxyless field set to true. EnforcingConsecutiveErrors int64 `json:"enforcingConsecutiveErrors,omitempty"` // EnforcingConsecutiveGatewayFailure: The percentage chance that a host // will be actually ejected when an outlier status is detected through // consecutive gateway failures. This setting can be used to disable - // ejection or to ramp it up slowly. Defaults to 100. + // ejection or to ramp it up slowly. Defaults to 100. Not supported when + // the backend service is referenced by a URL map that is bound to + // target gRPC proxy that has validateForProxyless field set to true. EnforcingConsecutiveGatewayFailure int64 `json:"enforcingConsecutiveGatewayFailure,omitempty"` // EnforcingSuccessRate: The percentage chance that a host will be @@ -35544,6 +35567,7 @@ type Quota struct { // "SSL_CERTIFICATES" // "STATIC_ADDRESSES" // "STATIC_BYOIP_ADDRESSES" + // "STATIC_EXTERNAL_IPV6_ADDRESS_RANGES" // "SUBNETWORKS" // "T2A_CPUS" // "T2D_CPUS" @@ -35606,6 +35630,59 @@ func (s *Quota) UnmarshalJSON(data []byte) error { return nil } +// QuotaExceededInfo: Additional details for quota exceeded error for +// resource quota. +type QuotaExceededInfo struct { + // Dimensions: The map holding related quota dimensions. + Dimensions map[string]string `json:"dimensions,omitempty"` + + // Limit: Current effective quota limit. The limit's unit depends on the + // quota type or metric. + Limit float64 `json:"limit,omitempty"` + + // LimitName: The name of the quota limit. + LimitName string `json:"limitName,omitempty"` + + // MetricName: The Compute Engine quota metric name. + MetricName string `json:"metricName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Dimensions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Dimensions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *QuotaExceededInfo) MarshalJSON() ([]byte, error) { + type NoMethod QuotaExceededInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *QuotaExceededInfo) UnmarshalJSON(data []byte) error { + type NoMethod QuotaExceededInfo + var s1 struct { + Limit gensupport.JSONFloat64 `json:"limit"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Limit = float64(s1.Limit) + return nil +} + // Reference: Represents a reference to a resource. type Reference struct { // Kind: [Output Only] Type of the resource. Always compute#reference @@ -43045,9 +43122,11 @@ type SecurityPolicy struct { Region string `json:"region,omitempty"` // Rules: A list of rules that belong to this policy. There must always - // be a default rule (rule with priority 2147483647 and match "*"). If - // no rules are provided when creating a security policy, a default rule - // with action "allow" will be added. + // be a default rule which is a rule with priority 2147483647 and match + // all condition (for the match condition this means match "*" for + // srcIpRanges and for the networkMatch condition every field must be + // either match "*" or not set). If no rules are provided when creating + // a security policy, a default rule with action "allow" will be added. Rules []*SecurityPolicyRule `json:"rules,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -43764,13 +43843,21 @@ type SecurityPolicyRuleRateLimitOptions struct { // HTTP_COOKIE: The value of the HTTP cookie whose name is configured // under "enforce_on_key_name". The key value is truncated to the first // 128 bytes of the cookie value. If no such cookie is present in the - // request, the key type defaults to ALL. + // request, the key type defaults to ALL. - HTTP_PATH: The URL path of + // the HTTP request. The key value is truncated to the first 128 bytes. + // - SNI: Server name indication in the TLS session of the HTTPS + // request. The key value is truncated to the first 128 bytes. The key + // type defaults to ALL on a HTTP session. - REGION_CODE: The + // country/region from which the request originates. // // Possible values: // "ALL" // "HTTP_COOKIE" // "HTTP_HEADER" + // "HTTP_PATH" // "IP" + // "REGION_CODE" + // "SNI" // "XFF_IP" EnforceOnKey string `json:"enforceOnKey,omitempty"` @@ -150337,7 +150424,10 @@ type RegionSecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. +// request. To clear fields in the rule, leave the fields empty and +// specify them in the updateMask. This cannot be used to be update the +// rules in the policy. Please use the per rule methods like addRule, +// patchRule, and removeRule instead. // // - project: Project ID for this request. // - region: Name of the region scoping this request. @@ -150460,7 +150550,7 @@ func (c *RegionSecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Ope } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request.", + // "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", // "flatPath": "projects/{project}/regions/{region}/securityPolicies/{securityPolicy}", // "httpMethod": "PATCH", // "id": "compute.regionSecurityPolicies.patch", @@ -165917,9 +166007,10 @@ type SecurityPoliciesPatchCall struct { } // Patch: Patches the specified policy with the data included in the -// request. This cannot be used to be update the rules in the policy. -// Please use the per rule methods like addRule, patchRule, and -// removeRule instead. +// request. To clear fields in the rule, leave the fields empty and +// specify them in the updateMask. This cannot be used to be update the +// rules in the policy. Please use the per rule methods like addRule, +// patchRule, and removeRule instead. // // - project: Project ID for this request. // - securityPolicy: Name of the security policy to update. @@ -166039,7 +166130,7 @@ func (c *SecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Patches the specified policy with the data included in the request. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", + // "description": "Patches the specified policy with the data included in the request. To clear fields in the rule, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.", // "flatPath": "projects/{project}/global/securityPolicies/{securityPolicy}", // "httpMethod": "PATCH", // "id": "compute.securityPolicies.patch", diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index 361f80452d9..fe21af88187 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -436,7 +436,7 @@ "type": "string" }, "updateMask": { - "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.", + "description": "Required. You can modify only the fields listed below. To lock/unlock a connection: * `lock_config` To suspend/resume a connection: * `suspended` To update the connection details: * `description` * `labels` * `connector_version` * `config_variables` * `auth_config` * `destination_configs` * `node_config`", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1047,7 +1047,7 @@ } } }, - "revision": "20220912", + "revision": "20221018", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -1436,7 +1436,7 @@ "type": "object" }, "ConnectionSchemaMetadata": { - "description": "Metadata of connection schema.", + "description": "ConnectionSchemaMetadata is the singleton resource of each connection. It includes the entity and action names of runtime resources exposed by a connection backend.", "id": "ConnectionSchemaMetadata", "properties": { "actions": { @@ -1454,6 +1454,38 @@ }, "readOnly": true, "type": "array" + }, + "name": { + "description": "Output only. Resource name. Format: projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata", + "readOnly": true, + "type": "string" + }, + "refreshTime": { + "description": "Output only. Timestamp when the connection runtime schema refresh was triggered.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of runtime schema.", + "enum": [ + "STATE_UNSPECIFIED", + "REFRESHING", + "UPDATED" + ], + "enumDescriptions": [ + "Default state.", + "Schema refresh is in progress.", + "Schema has been updated." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp when the connection runtime schema was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -2878,10 +2910,6 @@ "description": "Format of SSH Client cert.", "type": "string" }, - "password": { - "$ref": "Secret", - "description": "This is an optional field used in case client has enabled multi-factor authentication" - }, "sshClientCert": { "$ref": "Secret", "description": "SSH Client Cert. It should contain both public and private key." diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 50832bb6058..711e742e7e9 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -777,7 +777,9 @@ func (s *Connection) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ConnectionSchemaMetadata: Metadata of connection schema. +// ConnectionSchemaMetadata: ConnectionSchemaMetadata is the singleton +// resource of each connection. It includes the entity and action names +// of runtime resources exposed by a connection backend. type ConnectionSchemaMetadata struct { // Actions: Output only. List of actions. Actions []string `json:"actions,omitempty"` @@ -785,6 +787,27 @@ type ConnectionSchemaMetadata struct { // Entities: Output only. List of entity names. Entities []string `json:"entities,omitempty"` + // Name: Output only. Resource name. Format: + // projects/{project}/locations/{location}/connections/{connection}/conne + // ctionSchemaMetadata + Name string `json:"name,omitempty"` + + // RefreshTime: Output only. Timestamp when the connection runtime + // schema refresh was triggered. + RefreshTime string `json:"refreshTime,omitempty"` + + // State: Output only. The current state of runtime schema. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default state. + // "REFRESHING" - Schema refresh is in progress. + // "UPDATED" - Schema has been updated. + State string `json:"state,omitempty"` + + // UpdateTime: Output only. Timestamp when the connection runtime schema + // was updated. + UpdateTime string `json:"updateTime,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -2732,10 +2755,6 @@ type SshPublicKey struct { // CertType: Format of SSH Client cert. CertType string `json:"certType,omitempty"` - // Password: This is an optional field used in case client has enabled - // multi-factor authentication - Password *Secret `json:"password,omitempty"` - // SshClientCert: SSH Client Cert. It should contain both public and // private key. SshClientCert *Secret `json:"sshClientCert,omitempty"` @@ -4509,12 +4528,12 @@ func (r *ProjectsLocationsConnectionsService) Patch(name string, connection *Con return c } -// 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. +// UpdateMask sets the optional parameter "updateMask": Required. You +// can modify only the fields listed below. To lock/unlock a connection: +// * `lock_config` To suspend/resume a connection: * `suspended` To +// update the connection details: * `description` * `labels` * +// `connector_version` * `config_variables` * `auth_config` * +// `destination_configs` * `node_config` func (c *ProjectsLocationsConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c @@ -4627,7 +4646,7 @@ func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) // "type": "string" // }, // "updateMask": { - // "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.", + // "description": "Required. You can modify only the fields listed below. To lock/unlock a connection: * `lock_config` To suspend/resume a connection: * `suspended` To update the connection details: * `description` * `labels` * `connector_version` * `config_variables` * `auth_config` * `destination_configs` * `node_config`", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index a85db7ab93d..e964ea9088f 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -1049,7 +1049,7 @@ } } }, - "revision": "20220901", + "revision": "20221018", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -1312,7 +1312,7 @@ "type": "object" }, "zone": { - "description": "The Google Cloud Platform zone where your Cloud SQL datdabse instance is located.", + "description": "The Google Cloud Platform zone where your Cloud SQL database instance is located.", "type": "string" } }, diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index cc04e5aec1a..c38ddb5ad0c 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -588,7 +588,7 @@ type CloudSqlSettings struct { // "name": "wrench", "mass": "18kg", "count": "3" }`. UserLabels map[string]string `json:"userLabels,omitempty"` - // Zone: The Google Cloud Platform zone where your Cloud SQL datdabse + // Zone: The Google Cloud Platform zone where your Cloud SQL database // instance is located. Zone string `json:"zone,omitempty"` diff --git a/datamigration/v1beta1/datamigration-api.json b/datamigration/v1beta1/datamigration-api.json index 41b2525f761..7cc6d448590 100644 --- a/datamigration/v1beta1/datamigration-api.json +++ b/datamigration/v1beta1/datamigration-api.json @@ -1049,7 +1049,7 @@ } } }, - "revision": "20220901", + "revision": "20221018", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AuditConfig": { @@ -1252,7 +1252,7 @@ "type": "object" }, "zone": { - "description": "The Google Cloud Platform zone where your Cloud SQL datdabse instance is located.", + "description": "The Google Cloud Platform zone where your Cloud SQL database instance is located.", "type": "string" } }, diff --git a/datamigration/v1beta1/datamigration-gen.go b/datamigration/v1beta1/datamigration-gen.go index 77a1380861f..95ab667e5d8 100644 --- a/datamigration/v1beta1/datamigration-gen.go +++ b/datamigration/v1beta1/datamigration-gen.go @@ -499,7 +499,7 @@ type CloudSqlSettings struct { // "name": "wrench", "mass": "18kg", "count": "3" }`. UserLabels map[string]string `json:"userLabels,omitempty"` - // Zone: The Google Cloud Platform zone where your Cloud SQL datdabse + // Zone: The Google Cloud Platform zone where your Cloud SQL database // instance is located. Zone string `json:"zone,omitempty"` diff --git a/dataplex/v1/dataplex-api.json b/dataplex/v1/dataplex-api.json index dd0478f6d56..ba4d9c48bc6 100644 --- a/dataplex/v1/dataplex-api.json +++ b/dataplex/v1/dataplex-api.json @@ -2764,7 +2764,7 @@ } } }, - "revision": "20220920", + "revision": "20221015", "rootUrl": "https://dataplex.googleapis.com/", "schemas": { "Empty": { @@ -4693,6 +4693,10 @@ "description": "The status of the event.", "type": "boolean" }, + "fastStartupEnabled": { + "description": "If the session is associated with an environment with fast startup enabled, and was created before being assigned to a user.", + "type": "boolean" + }, "message": { "description": "The log message.", "type": "string" @@ -4731,10 +4735,6 @@ "userId": { "description": "The information about the user that created the session. It will be the email address of the user.", "type": "string" - }, - "warmPoolEnabled": { - "description": "If the session is a warm pooled session.", - "type": "boolean" } }, "type": "object" @@ -5114,14 +5114,14 @@ "id": "GoogleCloudDataplexV1TaskNotebookTaskConfig", "properties": { "archiveUris": { - "description": "Optional. GCS URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", + "description": "Optional. Cloud Storage URIs of archives to be extracted into the working directory of each executor. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", "items": { "type": "string" }, "type": "array" }, "fileUris": { - "description": "Optional. GCS URIs of files to be placed in the working directory of each executor.", + "description": "Optional. Cloud Storage URIs of files to be placed in the working directory of each executor.", "items": { "type": "string" }, @@ -5132,7 +5132,7 @@ "description": "Optional. Infrastructure specification for the execution." }, "notebook": { - "description": "Required. Path to input notebook. This can be the GCS URI of the notebook file or the path to a Notebook Content. The execution args are accessible as environment variables (TASK_key=value).", + "description": "Required. Path to input notebook. This can be the Cloud Storage URI of the notebook file or the path to a Notebook Content. The execution args are accessible as environment variables (TASK_key=value).", "type": "string" } }, diff --git a/dataplex/v1/dataplex-gen.go b/dataplex/v1/dataplex-gen.go index 4d9f6a821bd..2dd6e36da92 100644 --- a/dataplex/v1/dataplex-gen.go +++ b/dataplex/v1/dataplex-gen.go @@ -3012,6 +3012,11 @@ type GoogleCloudDataplexV1SessionEvent struct { // EventSucceeded: The status of the event. EventSucceeded bool `json:"eventSucceeded,omitempty"` + // FastStartupEnabled: If the session is associated with an environment + // with fast startup enabled, and was created before being assigned to a + // user. + FastStartupEnabled bool `json:"fastStartupEnabled,omitempty"` + // Message: The log message. Message string `json:"message,omitempty"` @@ -3040,9 +3045,6 @@ type GoogleCloudDataplexV1SessionEvent struct { // will be the email address of the user. UserId string `json:"userId,omitempty"` - // WarmPoolEnabled: If the session is a warm pooled session. - WarmPoolEnabled bool `json:"warmPoolEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "EventSucceeded") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -3593,22 +3595,23 @@ func (s *GoogleCloudDataplexV1TaskInfrastructureSpecVpcNetwork) MarshalJSON() ([ // GoogleCloudDataplexV1TaskNotebookTaskConfig: Config for running // scheduled notebooks. type GoogleCloudDataplexV1TaskNotebookTaskConfig struct { - // ArchiveUris: Optional. GCS URIs of archives to be extracted into the - // working directory of each executor. Supported file types: .jar, .tar, - // .tar.gz, .tgz, and .zip. + // ArchiveUris: Optional. Cloud Storage URIs of archives to be extracted + // into the working directory of each executor. Supported file types: + // .jar, .tar, .tar.gz, .tgz, and .zip. ArchiveUris []string `json:"archiveUris,omitempty"` - // FileUris: Optional. GCS URIs of files to be placed in the working - // directory of each executor. + // FileUris: Optional. Cloud Storage URIs of files to be placed in the + // working directory of each executor. FileUris []string `json:"fileUris,omitempty"` // InfrastructureSpec: Optional. Infrastructure specification for the // execution. InfrastructureSpec *GoogleCloudDataplexV1TaskInfrastructureSpec `json:"infrastructureSpec,omitempty"` - // Notebook: Required. Path to input notebook. This can be the GCS URI - // of the notebook file or the path to a Notebook Content. The execution - // args are accessible as environment variables (TASK_key=value). + // Notebook: Required. Path to input notebook. This can be the Cloud + // Storage URI of the notebook file or the path to a Notebook Content. + // The execution args are accessible as environment variables + // (TASK_key=value). Notebook string `json:"notebook,omitempty"` // ForceSendFields is a list of field names (e.g. "ArchiveUris") to diff --git a/datastore/v1/datastore-api.json b/datastore/v1/datastore-api.json index 8604e15c630..758d7c1b1cb 100644 --- a/datastore/v1/datastore-api.json +++ b/datastore/v1/datastore-api.json @@ -333,6 +333,34 @@ "https://www.googleapis.com/auth/datastore" ] }, + "runAggregationQuery": { + "description": "Runs an aggregation query.", + "flatPath": "v1/projects/{projectId}:runAggregationQuery", + "httpMethod": "POST", + "id": "datastore.projects.runAggregationQuery", + "parameterOrder": [ + "projectId" + ], + "parameters": { + "projectId": { + "description": "Required. The ID of the project against which to make the request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{projectId}:runAggregationQuery", + "request": { + "$ref": "RunAggregationQueryRequest" + }, + "response": { + "$ref": "RunAggregationQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, "runQuery": { "description": "Queries for entities.", "flatPath": "v1/projects/{projectId}:runQuery", @@ -626,9 +654,93 @@ } } }, - "revision": "20220830", + "revision": "20221018", "rootUrl": "https://datastore.googleapis.com/", "schemas": { + "Aggregation": { + "description": "Defines a aggregation that produces a single result.", + "id": "Aggregation", + "properties": { + "alias": { + "description": "Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format `property_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS property_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to entity property name limitations.", + "type": "string" + }, + "count": { + "$ref": "Count", + "description": "Count aggregator." + } + }, + "type": "object" + }, + "AggregationQuery": { + "description": "Datastore query for running an aggregation over a Query.", + "id": "AggregationQuery", + "properties": { + "aggregations": { + "description": "Optional. Series of aggregations to apply over the results of the `nested_query`. Requires: * A minimum of one and maximum of five aggregations per query.", + "items": { + "$ref": "Aggregation" + }, + "type": "array" + }, + "nestedQuery": { + "$ref": "Query", + "description": "Nested query for aggregation" + } + }, + "type": "object" + }, + "AggregationResult": { + "description": "The result of a single bucket from a Datastore aggregation query. The keys of `aggregate_properties` are the same for all results in an aggregation query, unlike entity queries which can have different fields present for each result.", + "id": "AggregationResult", + "properties": { + "aggregateProperties": { + "additionalProperties": { + "$ref": "Value" + }, + "description": "The result of the aggregation functions, ex: `COUNT(*) AS total_entities`. The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.", + "type": "object" + } + }, + "type": "object" + }, + "AggregationResultBatch": { + "description": "A batch of aggregation results produced by an aggregation query.", + "id": "AggregationResultBatch", + "properties": { + "aggregationResults": { + "description": "The aggregation results for this batch.", + "items": { + "$ref": "AggregationResult" + }, + "type": "array" + }, + "moreResults": { + "description": "The state of the query after the current batch. Only COUNT(*) aggregations are supported in the initial launch. Therefore, expected result type is limited to `NO_MORE_RESULTS`.", + "enum": [ + "MORE_RESULTS_TYPE_UNSPECIFIED", + "NOT_FINISHED", + "MORE_RESULTS_AFTER_LIMIT", + "MORE_RESULTS_AFTER_CURSOR", + "NO_MORE_RESULTS" + ], + "enumDescriptions": [ + "Unspecified. This value is never used.", + "There may be additional batches to fetch from this query.", + "The query is finished, but there may be more results after the limit.", + "The query is finished, but there may be more results after the end cursor.", + "The query is finished, and there are no more results." + ], + "type": "string" + }, + "readTime": { + "description": "Read timestamp this batch was returned from. In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "AllocateIdsRequest": { "description": "The request for Datastore.AllocateIds.", "id": "AllocateIdsRequest", @@ -789,6 +901,18 @@ }, "type": "object" }, + "Count": { + "description": "Count of entities that match the query. The `COUNT(*)` aggregation function operates on the entire entity so it does not require a field reference.", + "id": "Count", + "properties": { + "upTo": { + "description": "Optional. Optional constraint on the maximum number of entities to count. This provides a way to set an upper bound on the number of entities to scan, limiting latency and cost. Unspecified is interpreted as no bound. If a zero value is provided, a count result of zero should always be expected. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be non-negative when present.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -2129,6 +2253,48 @@ "properties": {}, "type": "object" }, + "RunAggregationQueryRequest": { + "description": "The request for Datastore.RunAggregationQuery.", + "id": "RunAggregationQueryRequest", + "properties": { + "aggregationQuery": { + "$ref": "AggregationQuery", + "description": "The query to run." + }, + "databaseId": { + "description": "The ID of the database against which to make the request. '(default)' is not allowed; please use empty string '' to refer the default database.", + "type": "string" + }, + "gqlQuery": { + "$ref": "GqlQuery", + "description": "The GQL query to run. This query must be an aggregation query." + }, + "partitionId": { + "$ref": "PartitionId", + "description": "Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID." + }, + "readOptions": { + "$ref": "ReadOptions", + "description": "The options for this query." + } + }, + "type": "object" + }, + "RunAggregationQueryResponse": { + "description": "The response for Datastore.RunAggregationQuery.", + "id": "RunAggregationQueryResponse", + "properties": { + "batch": { + "$ref": "AggregationResultBatch", + "description": "A batch of aggregation results. Always present." + }, + "query": { + "$ref": "AggregationQuery", + "description": "The parsed form of the `GqlQuery` from the request, if it was set." + } + }, + "type": "object" + }, "RunQueryRequest": { "description": "The request for Datastore.RunQuery.", "id": "RunQueryRequest", diff --git a/datastore/v1/datastore-gen.go b/datastore/v1/datastore-gen.go index 873a716fc0d..802d65b5018 100644 --- a/datastore/v1/datastore-gen.go +++ b/datastore/v1/datastore-gen.go @@ -180,6 +180,167 @@ type ProjectsOperationsService struct { s *Service } +// Aggregation: Defines a aggregation that produces a single result. +type Aggregation struct { + // Alias: Optional. Optional name of the property to store the result of + // the aggregation. If not provided, Datastore will pick a default name + // following the format `property_`. For example: ``` AGGREGATE + // COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS + // count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); ``` becomes: ``` + // AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS + // property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS + // property_2 OVER ( ... ); ``` Requires: * Must be unique across all + // aggregation aliases. * Conform to entity property name limitations. + Alias string `json:"alias,omitempty"` + + // Count: Count aggregator. + Count *Count `json:"count,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alias") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alias") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Aggregation) MarshalJSON() ([]byte, error) { + type NoMethod Aggregation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationQuery: Datastore query for running an aggregation over a +// Query. +type AggregationQuery struct { + // Aggregations: Optional. Series of aggregations to apply over the + // results of the `nested_query`. Requires: * A minimum of one and + // maximum of five aggregations per query. + Aggregations []*Aggregation `json:"aggregations,omitempty"` + + // NestedQuery: Nested query for aggregation + NestedQuery *Query `json:"nestedQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Aggregations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Aggregations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AggregationQuery) MarshalJSON() ([]byte, error) { + type NoMethod AggregationQuery + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResult: The result of a single bucket from a Datastore +// aggregation query. The keys of `aggregate_properties` are the same +// for all results in an aggregation query, unlike entity queries which +// can have different fields present for each result. +type AggregationResult struct { + // AggregateProperties: The result of the aggregation functions, ex: + // `COUNT(*) AS total_entities`. The key is the alias assigned to the + // aggregation function on input and the size of this map equals the + // number of aggregation functions in the query. + AggregateProperties map[string]Value `json:"aggregateProperties,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregateProperties") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregateProperties") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AggregationResult) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResultBatch: A batch of aggregation results produced by an +// aggregation query. +type AggregationResultBatch struct { + // AggregationResults: The aggregation results for this batch. + AggregationResults []*AggregationResult `json:"aggregationResults,omitempty"` + + // MoreResults: The state of the query after the current batch. Only + // COUNT(*) aggregations are supported in the initial launch. Therefore, + // expected result type is limited to `NO_MORE_RESULTS`. + // + // Possible values: + // "MORE_RESULTS_TYPE_UNSPECIFIED" - Unspecified. This value is never + // used. + // "NOT_FINISHED" - There may be additional batches to fetch from this + // query. + // "MORE_RESULTS_AFTER_LIMIT" - The query is finished, but there may + // be more results after the limit. + // "MORE_RESULTS_AFTER_CURSOR" - The query is finished, but there may + // be more results after the end cursor. + // "NO_MORE_RESULTS" - The query is finished, and there are no more + // results. + MoreResults string `json:"moreResults,omitempty"` + + // ReadTime: Read timestamp this batch was returned from. In a single + // transaction, subsequent query result batches for the same query can + // have a greater timestamp. Each batch's read timestamp is valid for + // all preceding batches. + ReadTime string `json:"readTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationResults") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationResults") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AggregationResultBatch) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResultBatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AllocateIdsRequest: The request for Datastore.AllocateIds. type AllocateIdsRequest struct { // DatabaseId: The ID of the database against which to make the request. @@ -477,6 +638,42 @@ func (s *CompositeFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Count: Count of entities that match the query. The `COUNT(*)` +// aggregation function operates on the entire entity so it does not +// require a field reference. +type Count struct { + // UpTo: Optional. Optional constraint on the maximum number of entities + // to count. This provides a way to set an upper bound on the number of + // entities to scan, limiting latency and cost. Unspecified is + // interpreted as no bound. If a zero value is provided, a count result + // of zero should always be expected. High-Level Example: ``` AGGREGATE + // COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be + // non-negative when present. + UpTo int64 `json:"upTo,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "UpTo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UpTo") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Count) MarshalJSON() ([]byte, error) { + type NoMethod Count + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use // it as the request or the response type of an API method. For @@ -2723,6 +2920,91 @@ type RollbackResponse struct { googleapi.ServerResponse `json:"-"` } +// RunAggregationQueryRequest: The request for +// Datastore.RunAggregationQuery. +type RunAggregationQueryRequest struct { + // AggregationQuery: The query to run. + AggregationQuery *AggregationQuery `json:"aggregationQuery,omitempty"` + + // DatabaseId: The ID of the database against which to make the request. + // '(default)' is not allowed; please use empty string '' to refer the + // default database. + DatabaseId string `json:"databaseId,omitempty"` + + // GqlQuery: The GQL query to run. This query must be an aggregation + // query. + GqlQuery *GqlQuery `json:"gqlQuery,omitempty"` + + // PartitionId: Entities are partitioned into subsets, identified by a + // partition ID. Queries are scoped to a single partition. This + // partition ID is normalized with the standard default context + // partition ID. + PartitionId *PartitionId `json:"partitionId,omitempty"` + + // ReadOptions: The options for this query. + ReadOptions *ReadOptions `json:"readOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationQuery") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationQuery") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RunAggregationQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod RunAggregationQueryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunAggregationQueryResponse: The response for +// Datastore.RunAggregationQuery. +type RunAggregationQueryResponse struct { + // Batch: A batch of aggregation results. Always present. + Batch *AggregationResultBatch `json:"batch,omitempty"` + + // Query: The parsed form of the `GqlQuery` from the request, if it was + // set. + Query *AggregationQuery `json:"query,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Batch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Batch") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod RunAggregationQueryResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RunQueryRequest: The request for Datastore.RunQuery. type RunQueryRequest struct { // DatabaseId: The ID of the database against which to make the request. @@ -4128,6 +4410,148 @@ func (c *ProjectsRollbackCall) Do(opts ...googleapi.CallOption) (*RollbackRespon } +// method id "datastore.projects.runAggregationQuery": + +type ProjectsRunAggregationQueryCall struct { + s *Service + projectId string + runaggregationqueryrequest *RunAggregationQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RunAggregationQuery: Runs an aggregation query. +// +// - projectId: The ID of the project against which to make the request. +func (r *ProjectsService) RunAggregationQuery(projectId string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsRunAggregationQueryCall { + c := &ProjectsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.runaggregationqueryrequest = runaggregationqueryrequest + 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 *ProjectsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsRunAggregationQueryCall { + 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 *ProjectsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsRunAggregationQueryCall { + 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 *ProjectsRunAggregationQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsRunAggregationQueryCall) 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.runaggregationqueryrequest) + 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/projects/{projectId}:runAggregationQuery") + 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{ + "projectId": c.projectId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datastore.projects.runAggregationQuery" call. +// Exactly one of *RunAggregationQueryResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *RunAggregationQueryResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, 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 := &RunAggregationQueryResponse{ + 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": "Runs an aggregation query.", + // "flatPath": "v1/projects/{projectId}:runAggregationQuery", + // "httpMethod": "POST", + // "id": "datastore.projects.runAggregationQuery", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "Required. The ID of the project against which to make the request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/projects/{projectId}:runAggregationQuery", + // "request": { + // "$ref": "RunAggregationQueryRequest" + // }, + // "response": { + // "$ref": "RunAggregationQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + // method id "datastore.projects.runQuery": type ProjectsRunQueryCall struct { diff --git a/datastore/v1beta3/datastore-api.json b/datastore/v1beta3/datastore-api.json index f570ac91f65..04a954a41b2 100644 --- a/datastore/v1beta3/datastore-api.json +++ b/datastore/v1beta3/datastore-api.json @@ -277,6 +277,34 @@ "https://www.googleapis.com/auth/datastore" ] }, + "runAggregationQuery": { + "description": "Runs an aggregation query.", + "flatPath": "v1beta3/projects/{projectId}:runAggregationQuery", + "httpMethod": "POST", + "id": "datastore.projects.runAggregationQuery", + "parameterOrder": [ + "projectId" + ], + "parameters": { + "projectId": { + "description": "Required. The ID of the project against which to make the request.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1beta3/projects/{projectId}:runAggregationQuery", + "request": { + "$ref": "RunAggregationQueryRequest" + }, + "response": { + "$ref": "RunAggregationQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + }, "runQuery": { "description": "Queries for entities.", "flatPath": "v1beta3/projects/{projectId}:runQuery", @@ -308,9 +336,93 @@ } } }, - "revision": "20220730", + "revision": "20221018", "rootUrl": "https://datastore.googleapis.com/", "schemas": { + "Aggregation": { + "description": "Defines a aggregation that produces a single result.", + "id": "Aggregation", + "properties": { + "alias": { + "description": "Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format `property_`. For example: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); ``` becomes: ``` AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS property_2 OVER ( ... ); ``` Requires: * Must be unique across all aggregation aliases. * Conform to entity property name limitations.", + "type": "string" + }, + "count": { + "$ref": "Count", + "description": "Count aggregator." + } + }, + "type": "object" + }, + "AggregationQuery": { + "description": "Datastore query for running an aggregation over a Query.", + "id": "AggregationQuery", + "properties": { + "aggregations": { + "description": "Optional. Series of aggregations to apply over the results of the `nested_query`. Requires: * A minimum of one and maximum of five aggregations per query.", + "items": { + "$ref": "Aggregation" + }, + "type": "array" + }, + "nestedQuery": { + "$ref": "Query", + "description": "Nested query for aggregation" + } + }, + "type": "object" + }, + "AggregationResult": { + "description": "The result of a single bucket from a Datastore aggregation query. The keys of `aggregate_properties` are the same for all results in an aggregation query, unlike entity queries which can have different fields present for each result.", + "id": "AggregationResult", + "properties": { + "aggregateProperties": { + "additionalProperties": { + "$ref": "Value" + }, + "description": "The result of the aggregation functions, ex: `COUNT(*) AS total_entities`. The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.", + "type": "object" + } + }, + "type": "object" + }, + "AggregationResultBatch": { + "description": "A batch of aggregation results produced by an aggregation query.", + "id": "AggregationResultBatch", + "properties": { + "aggregationResults": { + "description": "The aggregation results for this batch.", + "items": { + "$ref": "AggregationResult" + }, + "type": "array" + }, + "moreResults": { + "description": "The state of the query after the current batch. Only COUNT(*) aggregations are supported in the initial launch. Therefore, expected result type is limited to `NO_MORE_RESULTS`.", + "enum": [ + "MORE_RESULTS_TYPE_UNSPECIFIED", + "NOT_FINISHED", + "MORE_RESULTS_AFTER_LIMIT", + "MORE_RESULTS_AFTER_CURSOR", + "NO_MORE_RESULTS" + ], + "enumDescriptions": [ + "Unspecified. This value is never used.", + "There may be additional batches to fetch from this query.", + "The query is finished, but there may be more results after the limit.", + "The query is finished, but there may be more results after the end cursor.", + "The query is finished, and there are no more results." + ], + "type": "string" + }, + "readTime": { + "description": "Read timestamp this batch was returned from. In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "AllocateIdsRequest": { "description": "The request for Datastore.AllocateIds.", "id": "AllocateIdsRequest", @@ -459,6 +571,18 @@ }, "type": "object" }, + "Count": { + "description": "Count of entities that match the query. The `COUNT(*)` aggregation function operates on the entire entity so it does not require a field reference.", + "id": "Count", + "properties": { + "upTo": { + "description": "Optional. Optional constraint on the maximum number of entities to count. This provides a way to set an upper bound on the number of entities to scan, limiting latency and cost. Unspecified is interpreted as no bound. If a zero value is provided, a count result of zero should always be expected. High-Level Example: ``` AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be non-negative when present.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "Entity": { "description": "A Datastore data object. An entity is limited to 1 megabyte when stored. That _roughly_ corresponds to a limit of 1 megabyte for the serialized form of this message.", "id": "Entity", @@ -1580,6 +1704,44 @@ "properties": {}, "type": "object" }, + "RunAggregationQueryRequest": { + "description": "The request for Datastore.RunAggregationQuery.", + "id": "RunAggregationQueryRequest", + "properties": { + "aggregationQuery": { + "$ref": "AggregationQuery", + "description": "The query to run." + }, + "gqlQuery": { + "$ref": "GqlQuery", + "description": "The GQL query to run. This query must be an aggregation query." + }, + "partitionId": { + "$ref": "PartitionId", + "description": "Entities are partitioned into subsets, identified by a partition ID. Queries are scoped to a single partition. This partition ID is normalized with the standard default context partition ID." + }, + "readOptions": { + "$ref": "ReadOptions", + "description": "The options for this query." + } + }, + "type": "object" + }, + "RunAggregationQueryResponse": { + "description": "The response for Datastore.RunAggregationQuery.", + "id": "RunAggregationQueryResponse", + "properties": { + "batch": { + "$ref": "AggregationResultBatch", + "description": "A batch of aggregation results. Always present." + }, + "query": { + "$ref": "AggregationQuery", + "description": "The parsed form of the `GqlQuery` from the request, if it was set." + } + }, + "type": "object" + }, "RunQueryRequest": { "description": "The request for Datastore.RunQuery.", "id": "RunQueryRequest", diff --git a/datastore/v1beta3/datastore-gen.go b/datastore/v1beta3/datastore-gen.go index 471ba874a63..d814474ce0c 100644 --- a/datastore/v1beta3/datastore-gen.go +++ b/datastore/v1beta3/datastore-gen.go @@ -156,6 +156,167 @@ type ProjectsService struct { s *Service } +// Aggregation: Defines a aggregation that produces a single result. +type Aggregation struct { + // Alias: Optional. Optional name of the property to store the result of + // the aggregation. If not provided, Datastore will pick a default name + // following the format `property_`. For example: ``` AGGREGATE + // COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS + // count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); ``` becomes: ``` + // AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS + // property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS + // property_2 OVER ( ... ); ``` Requires: * Must be unique across all + // aggregation aliases. * Conform to entity property name limitations. + Alias string `json:"alias,omitempty"` + + // Count: Count aggregator. + Count *Count `json:"count,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alias") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alias") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Aggregation) MarshalJSON() ([]byte, error) { + type NoMethod Aggregation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationQuery: Datastore query for running an aggregation over a +// Query. +type AggregationQuery struct { + // Aggregations: Optional. Series of aggregations to apply over the + // results of the `nested_query`. Requires: * A minimum of one and + // maximum of five aggregations per query. + Aggregations []*Aggregation `json:"aggregations,omitempty"` + + // NestedQuery: Nested query for aggregation + NestedQuery *Query `json:"nestedQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Aggregations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Aggregations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AggregationQuery) MarshalJSON() ([]byte, error) { + type NoMethod AggregationQuery + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResult: The result of a single bucket from a Datastore +// aggregation query. The keys of `aggregate_properties` are the same +// for all results in an aggregation query, unlike entity queries which +// can have different fields present for each result. +type AggregationResult struct { + // AggregateProperties: The result of the aggregation functions, ex: + // `COUNT(*) AS total_entities`. The key is the alias assigned to the + // aggregation function on input and the size of this map equals the + // number of aggregation functions in the query. + AggregateProperties map[string]Value `json:"aggregateProperties,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregateProperties") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregateProperties") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AggregationResult) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AggregationResultBatch: A batch of aggregation results produced by an +// aggregation query. +type AggregationResultBatch struct { + // AggregationResults: The aggregation results for this batch. + AggregationResults []*AggregationResult `json:"aggregationResults,omitempty"` + + // MoreResults: The state of the query after the current batch. Only + // COUNT(*) aggregations are supported in the initial launch. Therefore, + // expected result type is limited to `NO_MORE_RESULTS`. + // + // Possible values: + // "MORE_RESULTS_TYPE_UNSPECIFIED" - Unspecified. This value is never + // used. + // "NOT_FINISHED" - There may be additional batches to fetch from this + // query. + // "MORE_RESULTS_AFTER_LIMIT" - The query is finished, but there may + // be more results after the limit. + // "MORE_RESULTS_AFTER_CURSOR" - The query is finished, but there may + // be more results after the end cursor. + // "NO_MORE_RESULTS" - The query is finished, and there are no more + // results. + MoreResults string `json:"moreResults,omitempty"` + + // ReadTime: Read timestamp this batch was returned from. In a single + // transaction, subsequent query result batches for the same query can + // have a greater timestamp. Each batch's read timestamp is valid for + // all preceding batches. + ReadTime string `json:"readTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationResults") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationResults") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AggregationResultBatch) MarshalJSON() ([]byte, error) { + type NoMethod AggregationResultBatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AllocateIdsRequest: The request for Datastore.AllocateIds. type AllocateIdsRequest struct { // Keys: Required. A list of keys with incomplete key paths for which to @@ -439,6 +600,42 @@ func (s *CompositeFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Count: Count of entities that match the query. The `COUNT(*)` +// aggregation function operates on the entire entity so it does not +// require a field reference. +type Count struct { + // UpTo: Optional. Optional constraint on the maximum number of entities + // to count. This provides a way to set an upper bound on the number of + // entities to scan, limiting latency and cost. Unspecified is + // interpreted as no bound. If a zero value is provided, a count result + // of zero should always be expected. High-Level Example: ``` AGGREGATE + // COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); ``` Requires: * Must be + // non-negative when present. + UpTo int64 `json:"upTo,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "UpTo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UpTo") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Count) MarshalJSON() ([]byte, error) { + type NoMethod Count + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Entity: A Datastore data object. An entity is limited to 1 megabyte // when stored. That _roughly_ corresponds to a limit of 1 megabyte for // the serialized form of this message. @@ -2312,6 +2509,86 @@ type RollbackResponse struct { googleapi.ServerResponse `json:"-"` } +// RunAggregationQueryRequest: The request for +// Datastore.RunAggregationQuery. +type RunAggregationQueryRequest struct { + // AggregationQuery: The query to run. + AggregationQuery *AggregationQuery `json:"aggregationQuery,omitempty"` + + // GqlQuery: The GQL query to run. This query must be an aggregation + // query. + GqlQuery *GqlQuery `json:"gqlQuery,omitempty"` + + // PartitionId: Entities are partitioned into subsets, identified by a + // partition ID. Queries are scoped to a single partition. This + // partition ID is normalized with the standard default context + // partition ID. + PartitionId *PartitionId `json:"partitionId,omitempty"` + + // ReadOptions: The options for this query. + ReadOptions *ReadOptions `json:"readOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AggregationQuery") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AggregationQuery") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RunAggregationQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod RunAggregationQueryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RunAggregationQueryResponse: The response for +// Datastore.RunAggregationQuery. +type RunAggregationQueryResponse struct { + // Batch: A batch of aggregation results. Always present. + Batch *AggregationResultBatch `json:"batch,omitempty"` + + // Query: The parsed form of the `GqlQuery` from the request, if it was + // set. + Query *AggregationQuery `json:"query,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Batch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Batch") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *RunAggregationQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod RunAggregationQueryResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RunQueryRequest: The request for Datastore.RunQuery. type RunQueryRequest struct { // GqlQuery: The GQL query to run. This query must be a non-aggregation @@ -3374,6 +3651,148 @@ func (c *ProjectsRollbackCall) Do(opts ...googleapi.CallOption) (*RollbackRespon } +// method id "datastore.projects.runAggregationQuery": + +type ProjectsRunAggregationQueryCall struct { + s *Service + projectId string + runaggregationqueryrequest *RunAggregationQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RunAggregationQuery: Runs an aggregation query. +// +// - projectId: The ID of the project against which to make the request. +func (r *ProjectsService) RunAggregationQuery(projectId string, runaggregationqueryrequest *RunAggregationQueryRequest) *ProjectsRunAggregationQueryCall { + c := &ProjectsRunAggregationQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectId = projectId + c.runaggregationqueryrequest = runaggregationqueryrequest + 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 *ProjectsRunAggregationQueryCall) Fields(s ...googleapi.Field) *ProjectsRunAggregationQueryCall { + 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 *ProjectsRunAggregationQueryCall) Context(ctx context.Context) *ProjectsRunAggregationQueryCall { + 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 *ProjectsRunAggregationQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsRunAggregationQueryCall) 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.runaggregationqueryrequest) + 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, "v1beta3/projects/{projectId}:runAggregationQuery") + 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{ + "projectId": c.projectId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datastore.projects.runAggregationQuery" call. +// Exactly one of *RunAggregationQueryResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *RunAggregationQueryResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsRunAggregationQueryCall) Do(opts ...googleapi.CallOption) (*RunAggregationQueryResponse, 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 := &RunAggregationQueryResponse{ + 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": "Runs an aggregation query.", + // "flatPath": "v1beta3/projects/{projectId}:runAggregationQuery", + // "httpMethod": "POST", + // "id": "datastore.projects.runAggregationQuery", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "Required. The ID of the project against which to make the request.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta3/projects/{projectId}:runAggregationQuery", + // "request": { + // "$ref": "RunAggregationQueryRequest" + // }, + // "response": { + // "$ref": "RunAggregationQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/datastore" + // ] + // } + +} + // method id "datastore.projects.runQuery": type ProjectsRunQueryCall struct { diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 8434085879a..f3dec1e62c7 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -3412,7 +3412,7 @@ } } }, - "revision": "20221001", + "revision": "20221017", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -3425,7 +3425,7 @@ }, "jobNotificationEmails": { "$ref": "GooglePrivacyDlpV2JobNotificationEmails", - "description": "Enable email notification for project owners and editors on job's completion/failure." + "description": "Sends an email when the job completes. The email goes to IAM project owners and technical [Essential Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts)." }, "pubSub": { "$ref": "GooglePrivacyDlpV2PublishToPubSub", @@ -4100,7 +4100,6 @@ "type": "object" }, "GooglePrivacyDlpV2ContentItem": { - "description": "Container structure for the content to inspect.", "id": "GooglePrivacyDlpV2ContentItem", "properties": { "byteItem": { @@ -5529,7 +5528,7 @@ "id": "GooglePrivacyDlpV2InfoType", "properties": { "name": { - "description": "Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`.", + "description": "Name of the information type. Either a name of your choosing when creating a CustomInfoType, or one of the names listed at https://cloud.google.com/dlp/docs/infotypes-reference when specifying a built-in type. When sending Cloud DLP results to Data Catalog, infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`.", "type": "string" }, "version": { @@ -5699,6 +5698,10 @@ "description": "Internal name of the infoType.", "type": "string" }, + "sensitivityScore": { + "$ref": "GooglePrivacyDlpV2SensitivityScore", + "description": "The default sensitivity of the infoType." + }, "supportedBy": { "description": "Which parts of the API supports this InfoType.", "items": { diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 50a2a4d66cc..27836f8b25a 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -491,8 +491,9 @@ type GooglePrivacyDlpV2Action struct { // Deidentify: Create a de-identified copy of the input data. Deidentify *GooglePrivacyDlpV2Deidentify `json:"deidentify,omitempty"` - // JobNotificationEmails: Enable email notification for project owners - // and editors on job's completion/failure. + // JobNotificationEmails: Sends an email when the job completes. The + // email goes to IAM project owners and technical Essential Contacts + // (https://cloud.google.com/resource-manager/docs/managing-notification-contacts). JobNotificationEmails *GooglePrivacyDlpV2JobNotificationEmails `json:"jobNotificationEmails,omitempty"` // PubSub: Publish a notification to a Pub/Sub topic. @@ -1635,8 +1636,6 @@ func (s *GooglePrivacyDlpV2Container) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GooglePrivacyDlpV2ContentItem: Container structure for the content to -// inspect. type GooglePrivacyDlpV2ContentItem struct { // ByteItem: Content data to inspect or redact. Replaces `type` and // `data`. @@ -4386,7 +4385,7 @@ type GooglePrivacyDlpV2InfoType struct { // when creating a CustomInfoType, or one of the names listed at // https://cloud.google.com/dlp/docs/infotypes-reference when specifying // a built-in type. When sending Cloud DLP results to Data Catalog, - // infoType names should conform to the pattern `[A-Za-z0-9$-_]{1,64}`. + // infoType names should conform to the pattern `[A-Za-z0-9$_-]{1,64}`. Name string `json:"name,omitempty"` // Version: Optional version name for this InfoType. @@ -4541,6 +4540,9 @@ type GooglePrivacyDlpV2InfoTypeDescription struct { // Name: Internal name of the infoType. Name string `json:"name,omitempty"` + // SensitivityScore: The default sensitivity of the infoType. + SensitivityScore *GooglePrivacyDlpV2SensitivityScore `json:"sensitivityScore,omitempty"` + // SupportedBy: Which parts of the API supports this InfoType. // // Possible values: diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 00c85e6ef5c..b5660ff46a8 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1382,7 +1382,7 @@ } } }, - "revision": "20220915", + "revision": "20221017", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -2088,6 +2088,13 @@ }, "type": "array" }, + "namespaceIds": { + "description": "An empty list represents all namespaces. This is the preferred usage for databases that don't use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.", + "items": { + "type": "string" + }, + "type": "array" + }, "outputUriPrefix": { "description": "The output URI. Currently only supports Google Cloud Storage URIs of the form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional Google Cloud Storage namespace path. When choosing a name, be sure to consider Google Cloud Storage naming guidelines: https://cloud.google.com/storage/docs/naming. If the URI is a bucket (without a namespace path), a prefix will be generated based on the start time.", "type": "string" @@ -2263,6 +2270,13 @@ "inputUriPrefix": { "description": "Location of the exported files. This must match the output_uri_prefix of an ExportDocumentsResponse from an export that has completed successfully. See: google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix.", "type": "string" + }, + "namespaceIds": { + "description": "An empty list represents all namespaces. This is the preferred usage for databases that don't use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index b87fcc293dc..731d8e4f083 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -1507,6 +1507,13 @@ type GoogleFirestoreAdminV1ExportDocumentsRequest struct { // collections. CollectionIds []string `json:"collectionIds,omitempty"` + // NamespaceIds: An empty list represents all namespaces. This is the + // preferred usage for databases that don't use namespaces. An empty + // string element represents the default namespace. This should be used + // if the database has data in non-default namespaces, but doesn't want + // to include them. Each namespace in this list must be unique. + NamespaceIds []string `json:"namespaceIds,omitempty"` + // OutputUriPrefix: The output URI. Currently only supports Google Cloud // Storage URIs of the form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where // `BUCKET_NAME` is the name of the Google Cloud Storage bucket and @@ -1783,6 +1790,13 @@ type GoogleFirestoreAdminV1ImportDocumentsRequest struct { // google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix. InputUriPrefix string `json:"inputUriPrefix,omitempty"` + // NamespaceIds: An empty list represents all namespaces. This is the + // preferred usage for databases that don't use namespaces. An empty + // string element represents the default namespace. This should be used + // if the database has data in non-default namespaces, but doesn't want + // to include them. Each namespace in this list must be unique. + NamespaceIds []string `json:"namespaceIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "CollectionIds") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/iam/v1/iam-api.json b/iam/v1/iam-api.json index 75ee8c197c9..5423ed186f8 100644 --- a/iam/v1/iam-api.json +++ b/iam/v1/iam-api.json @@ -1921,7 +1921,7 @@ } } }, - "revision": "20220825", + "revision": "20221013", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AdminAuditData": { @@ -2725,14 +2725,14 @@ "id": "Saml", "properties": { "idpMetadataXml": { - "description": "Required. SAML Identity provider configuration metadata xml doc. The xml document should comply with [SAML 2.0 specification](https://www.oasis-open.org/committees/download.php/56785/sstc-saml-metadata-errata-2.0-wd-05.pdf). The max size of the acceptable xml document will be bounded to 128k characters. The metadata xml document should satisfy the following constraints: 1) Must contain an Identity Provider Entity ID. 2) Must contain at least one non-expired signing key certificate. 3) For each signing key: a) Valid from should be no more than 7 days from now. b) Valid to should be no more than 10 years in the future. 4) Upto 3 IdP signing keys are allowed in the metadata xml. When updating the provider's metadata xml, at lease one non-expired signing key must overlap with the existing metadata. This requirement is skipped if there are no non-expired signing keys present in the existing metadata", + "description": "Required. SAML Identity provider configuration metadata xml doc. The xml document should comply with [SAML 2.0 specification](https://www.oasis-open.org/committees/download.php/56785/sstc-saml-metadata-errata-2.0-wd-05.pdf). The max size of the acceptable xml document will be bounded to 128k characters. The metadata xml document should satisfy the following constraints: 1) Must contain an Identity Provider Entity ID. 2) Must contain at least one non-expired signing key certificate. 3) For each signing key: a) Valid from should be no more than 7 days from now. b) Valid to should be no more than 14 years in the future. 4) Upto 3 IdP signing keys are allowed in the metadata xml. When updating the provider's metadata xml, at lease one non-expired signing key must overlap with the existing metadata. This requirement is skipped if there are no non-expired signing keys present in the existing metadata", "type": "string" } }, "type": "object" }, "ServiceAccount": { - "description": "An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service account.", + "description": "An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service //", "id": "ServiceAccount", "properties": { "description": { diff --git a/iam/v1/iam-gen.go b/iam/v1/iam-gen.go index 220bcb9cc66..6ffac235c6b 100644 --- a/iam/v1/iam-gen.go +++ b/iam/v1/iam-gen.go @@ -2006,7 +2006,7 @@ type Saml struct { // constraints: 1) Must contain an Identity Provider Entity ID. 2) Must // contain at least one non-expired signing key certificate. 3) For each // signing key: a) Valid from should be no more than 7 days from now. b) - // Valid to should be no more than 10 years in the future. 4) Upto 3 IdP + // Valid to should be no more than 14 years in the future. 4) Upto 3 IdP // signing keys are allowed in the metadata xml. When updating the // provider's metadata xml, at lease one non-expired signing key must // overlap with the existing metadata. This requirement is skipped if @@ -2046,7 +2046,7 @@ func (s *Saml) MarshalJSON() ([]byte, error) { // you create a service account, you specify the project ID that owns // the service account, as well as a name that must be unique within the // project. IAM uses these values to create an email address that -// identifies the service account. +// identifies the service // type ServiceAccount struct { // Description: Optional. A user-specified, human-readable description // of the service account. The maximum length is 256 UTF-8 bytes. diff --git a/managedidentities/v1alpha1/managedidentities-api.json b/managedidentities/v1alpha1/managedidentities-api.json index 3d58e2587f1..ab0ef0622ae 100644 --- a/managedidentities/v1alpha1/managedidentities-api.json +++ b/managedidentities/v1alpha1/managedidentities-api.json @@ -209,6 +209,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "checkMigrationPermission": { + "description": "AuditMigration API gets the current state of DomainMigration", + "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:checkMigrationPermission", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.domains.checkMigrationPermission", + "parameterOrder": [ + "domain" + ], + "parameters": { + "domain": { + "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+domain}:checkMigrationPermission", + "request": { + "$ref": "CheckMigrationPermissionRequest" + }, + "response": { + "$ref": "CheckMigrationPermissionResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a Microsoft AD Domain in a given project. Operation", "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains", @@ -295,6 +323,62 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "disableMigration": { + "description": "Disable Domain Migration", + "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:disableMigration", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.domains.disableMigration", + "parameterOrder": [ + "domain" + ], + "parameters": { + "domain": { + "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+domain}:disableMigration", + "request": { + "$ref": "DisableMigrationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "enableMigration": { + "description": "Enable Domain Migration", + "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:enableMigration", + "httpMethod": "POST", + "id": "managedidentities.projects.locations.global.domains.enableMigration", + "parameterOrder": [ + "domain" + ], + "parameters": { + "domain": { + "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+domain}:enableMigration", + "request": { + "$ref": "EnableMigrationRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "extendSchema": { "description": "Extend Schema for Domain", "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:extendSchema", @@ -1403,7 +1487,7 @@ } } }, - "revision": "20220826", + "revision": "20220926", "rootUrl": "https://managedidentities.googleapis.com/", "schemas": { "AttachTrustRequest": { @@ -1551,6 +1635,42 @@ }, "type": "object" }, + "CheckMigrationPermissionRequest": { + "description": "CheckMigrationPermissionRequest is the request message for CheckMigrationPermission method.", + "id": "CheckMigrationPermissionRequest", + "properties": {}, + "type": "object" + }, + "CheckMigrationPermissionResponse": { + "description": "CheckMigrationPermissionResponse is the response message for CheckMigrationPermission method.", + "id": "CheckMigrationPermissionResponse", + "properties": { + "onpremDomains": { + "description": "The state of SID filtering of all the domains which has trust established.", + "items": { + "$ref": "OnPremDomainSIDDetails" + }, + "type": "array" + }, + "state": { + "description": "The state of DomainMigration.", + "enum": [ + "STATE_UNSPECIFIED", + "DISABLED", + "ENABLED", + "NEEDS_MAINTENANCE" + ], + "enumDescriptions": [ + "DomainMigration is in unspecified state.", + "Domain Migration is Disabled.", + "Domain Migration is Enabled.", + "Domain Migration is not in valid state." + ], + "type": "string" + } + }, + "type": "object" + }, "DailyCycle": { "description": "Time window specified for daily operations.", "id": "DailyCycle", @@ -1618,6 +1738,12 @@ }, "type": "object" }, + "DisableMigrationRequest": { + "description": "DisableMigrationRequest is the request message for DisableMigration method.", + "id": "DisableMigrationRequest", + "properties": {}, + "type": "object" + }, "Domain": { "description": "If the domain is being changed, it will be placed into the UPDATING state, which indicates that the resource is being reconciled. At this point, Get will reflect an intermediate state.", "id": "Domain", @@ -1717,6 +1843,20 @@ "properties": {}, "type": "object" }, + "EnableMigrationRequest": { + "description": "EnableMigrationRequest is the request message for EnableMigration method.", + "id": "EnableMigrationRequest", + "properties": { + "migratingDomains": { + "description": "Required. List of the on-prem domains to be migrated.", + "items": { + "$ref": "OnPremDomainDetails" + }, + "type": "array" + } + }, + "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", @@ -2432,6 +2572,46 @@ }, "type": "object" }, + "OnPremDomainDetails": { + "description": "OnPremDomainDetails is the message which contains details of on-prem domain which is trusted and needs to be migrated.", + "id": "OnPremDomainDetails", + "properties": { + "disableSidFiltering": { + "description": "Optional. Option to disable SID filtering.", + "type": "boolean" + }, + "domainName": { + "description": "Required. FQDN of the on-prem domain being migrated.", + "type": "string" + } + }, + "type": "object" + }, + "OnPremDomainSIDDetails": { + "description": "OnPremDomainDetails is the message which contains details of on-prem domain which is trusted and needs to be migrated.", + "id": "OnPremDomainSIDDetails", + "properties": { + "name": { + "description": "FQDN of the on-prem domain being migrated.", + "type": "string" + }, + "sidFilteringState": { + "description": "Current SID filtering state.", + "enum": [ + "SID_FILTERING_STATE_UNSPECIFIED", + "ENABLED", + "DISABLED" + ], + "enumDescriptions": [ + "SID Filtering is in unspecified state.", + "SID Filtering is Enabled.", + "SID Filtering is Disabled." + ], + "type": "string" + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", diff --git a/managedidentities/v1alpha1/managedidentities-gen.go b/managedidentities/v1alpha1/managedidentities-gen.go index 2e744d5d7f1..a24a9db879b 100644 --- a/managedidentities/v1alpha1/managedidentities-gen.go +++ b/managedidentities/v1alpha1/managedidentities-gen.go @@ -453,6 +453,54 @@ func (s *Certificate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CheckMigrationPermissionRequest: CheckMigrationPermissionRequest is +// the request message for CheckMigrationPermission method. +type CheckMigrationPermissionRequest struct { +} + +// CheckMigrationPermissionResponse: CheckMigrationPermissionResponse is +// the response message for CheckMigrationPermission method. +type CheckMigrationPermissionResponse struct { + // OnpremDomains: The state of SID filtering of all the domains which + // has trust established. + OnpremDomains []*OnPremDomainSIDDetails `json:"onpremDomains,omitempty"` + + // State: The state of DomainMigration. + // + // Possible values: + // "STATE_UNSPECIFIED" - DomainMigration is in unspecified state. + // "DISABLED" - Domain Migration is Disabled. + // "ENABLED" - Domain Migration is Enabled. + // "NEEDS_MAINTENANCE" - Domain Migration is not in valid state. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "OnpremDomains") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OnpremDomains") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CheckMigrationPermissionResponse) MarshalJSON() ([]byte, error) { + type NoMethod CheckMigrationPermissionResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DailyCycle: Time window specified for daily operations. type DailyCycle struct { // Duration: Output only. Duration of the time window, set by service @@ -603,6 +651,11 @@ func (s *DetachTrustRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DisableMigrationRequest: DisableMigrationRequest is the request +// message for DisableMigration method. +type DisableMigrationRequest struct { +} + // Domain: If the domain is being changed, it will be placed into the // UPDATING state, which indicates that the resource is being // reconciled. At this point, Get will reflect an intermediate state. @@ -720,6 +773,37 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// EnableMigrationRequest: EnableMigrationRequest is the request message +// for EnableMigration method. +type EnableMigrationRequest struct { + // MigratingDomains: Required. List of the on-prem domains to be + // migrated. + MigratingDomains []*OnPremDomainDetails `json:"migratingDomains,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MigratingDomains") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MigratingDomains") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *EnableMigrationRequest) MarshalJSON() ([]byte, error) { + type NoMethod EnableMigrationRequest + 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 @@ -1873,6 +1957,79 @@ func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// OnPremDomainDetails: OnPremDomainDetails is the message which +// contains details of on-prem domain which is trusted and needs to be +// migrated. +type OnPremDomainDetails struct { + // DisableSidFiltering: Optional. Option to disable SID filtering. + DisableSidFiltering bool `json:"disableSidFiltering,omitempty"` + + // DomainName: Required. FQDN of the on-prem domain being migrated. + DomainName string `json:"domainName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisableSidFiltering") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisableSidFiltering") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *OnPremDomainDetails) MarshalJSON() ([]byte, error) { + type NoMethod OnPremDomainDetails + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// OnPremDomainSIDDetails: OnPremDomainDetails is the message which +// contains details of on-prem domain which is trusted and needs to be +// migrated. +type OnPremDomainSIDDetails struct { + // Name: FQDN of the on-prem domain being migrated. + Name string `json:"name,omitempty"` + + // SidFilteringState: Current SID filtering state. + // + // Possible values: + // "SID_FILTERING_STATE_UNSPECIFIED" - SID Filtering is in unspecified + // state. + // "ENABLED" - SID Filtering is Enabled. + // "DISABLED" - SID Filtering is Disabled. + SidFilteringState string `json:"sidFilteringState,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 *OnPremDomainSIDDetails) MarshalJSON() ([]byte, error) { + type NoMethod OnPremDomainSIDDetails + 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 { @@ -3241,6 +3398,150 @@ func (c *ProjectsLocationsGlobalDomainsAttachTrustCall) Do(opts ...googleapi.Cal } +// method id "managedidentities.projects.locations.global.domains.checkMigrationPermission": + +type ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall struct { + s *Service + domain string + checkmigrationpermissionrequest *CheckMigrationPermissionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CheckMigrationPermission: AuditMigration API gets the current state +// of DomainMigration +// +// - domain: The domain resource name using the form: +// `projects/{project_id}/locations/global/domains/{domain_name}`. +func (r *ProjectsLocationsGlobalDomainsService) CheckMigrationPermission(domain string, checkmigrationpermissionrequest *CheckMigrationPermissionRequest) *ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall { + c := &ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.domain = domain + c.checkmigrationpermissionrequest = checkmigrationpermissionrequest + 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 *ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall { + 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 *ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall { + 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 *ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall) 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.checkmigrationpermissionrequest) + 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, "v1alpha1/{+domain}:checkMigrationPermission") + 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{ + "domain": c.domain, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "managedidentities.projects.locations.global.domains.checkMigrationPermission" call. +// Exactly one of *CheckMigrationPermissionResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *CheckMigrationPermissionResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsGlobalDomainsCheckMigrationPermissionCall) Do(opts ...googleapi.CallOption) (*CheckMigrationPermissionResponse, 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 := &CheckMigrationPermissionResponse{ + 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": "AuditMigration API gets the current state of DomainMigration", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:checkMigrationPermission", + // "httpMethod": "POST", + // "id": "managedidentities.projects.locations.global.domains.checkMigrationPermission", + // "parameterOrder": [ + // "domain" + // ], + // "parameters": { + // "domain": { + // "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+domain}:checkMigrationPermission", + // "request": { + // "$ref": "CheckMigrationPermissionRequest" + // }, + // "response": { + // "$ref": "CheckMigrationPermissionResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "managedidentities.projects.locations.global.domains.create": type ProjectsLocationsGlobalDomainsCreateCall struct { @@ -3680,6 +3981,292 @@ func (c *ProjectsLocationsGlobalDomainsDetachTrustCall) Do(opts ...googleapi.Cal } +// method id "managedidentities.projects.locations.global.domains.disableMigration": + +type ProjectsLocationsGlobalDomainsDisableMigrationCall struct { + s *Service + domain string + disablemigrationrequest *DisableMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DisableMigration: Disable Domain Migration +// +// - domain: The domain resource name using the form: +// `projects/{project_id}/locations/global/domains/{domain_name}`. +func (r *ProjectsLocationsGlobalDomainsService) DisableMigration(domain string, disablemigrationrequest *DisableMigrationRequest) *ProjectsLocationsGlobalDomainsDisableMigrationCall { + c := &ProjectsLocationsGlobalDomainsDisableMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.domain = domain + c.disablemigrationrequest = disablemigrationrequest + 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 *ProjectsLocationsGlobalDomainsDisableMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsDisableMigrationCall { + 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 *ProjectsLocationsGlobalDomainsDisableMigrationCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsDisableMigrationCall { + 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 *ProjectsLocationsGlobalDomainsDisableMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsDisableMigrationCall) 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.disablemigrationrequest) + 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, "v1alpha1/{+domain}:disableMigration") + 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{ + "domain": c.domain, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "managedidentities.projects.locations.global.domains.disableMigration" 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 *ProjectsLocationsGlobalDomainsDisableMigrationCall) 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": "Disable Domain Migration", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:disableMigration", + // "httpMethod": "POST", + // "id": "managedidentities.projects.locations.global.domains.disableMigration", + // "parameterOrder": [ + // "domain" + // ], + // "parameters": { + // "domain": { + // "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+domain}:disableMigration", + // "request": { + // "$ref": "DisableMigrationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "managedidentities.projects.locations.global.domains.enableMigration": + +type ProjectsLocationsGlobalDomainsEnableMigrationCall struct { + s *Service + domain string + enablemigrationrequest *EnableMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EnableMigration: Enable Domain Migration +// +// - domain: The domain resource name using the form: +// `projects/{project_id}/locations/global/domains/{domain_name}`. +func (r *ProjectsLocationsGlobalDomainsService) EnableMigration(domain string, enablemigrationrequest *EnableMigrationRequest) *ProjectsLocationsGlobalDomainsEnableMigrationCall { + c := &ProjectsLocationsGlobalDomainsEnableMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.domain = domain + c.enablemigrationrequest = enablemigrationrequest + 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 *ProjectsLocationsGlobalDomainsEnableMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalDomainsEnableMigrationCall { + 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 *ProjectsLocationsGlobalDomainsEnableMigrationCall) Context(ctx context.Context) *ProjectsLocationsGlobalDomainsEnableMigrationCall { + 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 *ProjectsLocationsGlobalDomainsEnableMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGlobalDomainsEnableMigrationCall) 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.enablemigrationrequest) + 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, "v1alpha1/{+domain}:enableMigration") + 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{ + "domain": c.domain, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "managedidentities.projects.locations.global.domains.enableMigration" 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 *ProjectsLocationsGlobalDomainsEnableMigrationCall) 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": "Enable Domain Migration", + // "flatPath": "v1alpha1/projects/{projectsId}/locations/global/domains/{domainsId}:enableMigration", + // "httpMethod": "POST", + // "id": "managedidentities.projects.locations.global.domains.enableMigration", + // "parameterOrder": [ + // "domain" + // ], + // "parameters": { + // "domain": { + // "description": "Required. The domain resource name using the form: `projects/{project_id}/locations/global/domains/{domain_name}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/global/domains/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha1/{+domain}:enableMigration", + // "request": { + // "$ref": "EnableMigrationRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "managedidentities.projects.locations.global.domains.extendSchema": type ProjectsLocationsGlobalDomainsExtendSchemaCall struct { diff --git a/metastore/v1alpha/metastore-api.json b/metastore/v1alpha/metastore-api.json index 8402a2f710d..c3f3b13486b 100644 --- a/metastore/v1alpha/metastore-api.json +++ b/metastore/v1alpha/metastore-api.json @@ -1467,7 +1467,7 @@ } } }, - "revision": "20220929", + "revision": "20221012", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AuditConfig": { @@ -1650,7 +1650,7 @@ "type": "object" }, "Consumer": { - "description": "Contains information of the customer's network configurations.Next available ID: 4", + "description": "Contains information of the customer's network configurations.", "id": "Consumer", "properties": { "endpointUri": { @@ -2338,7 +2338,7 @@ "type": "object" }, "NetworkConfig": { - "description": "Network configuration for the Dataproc Metastore service.Next available ID: 3", + "description": "Network configuration for the Dataproc Metastore service.", "id": "NetworkConfig", "properties": { "consumers": { @@ -2704,6 +2704,10 @@ "readOnly": true, "type": "string" }, + "telemetryConfig": { + "$ref": "TelemetryConfig", + "description": "The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON." + }, "tier": { "description": "The tier of the service.", "enum": [ @@ -2775,6 +2779,26 @@ }, "type": "object" }, + "TelemetryConfig": { + "description": "Telemetry Configuration for the Dataproc Metastore service.", + "id": "TelemetryConfig", + "properties": { + "logFormat": { + "enum": [ + "LOG_FORMAT_UNSPECIFIED", + "LEGACY", + "JSON" + ], + "enumDescriptions": [ + "The LOG_FORMAT is not set.", + "Logging output uses the legacy textPayload format.", + "Logging output uses the jsonPayload format." + ], + "type": "string" + } + }, + "type": "object" + }, "TestIamPermissionsRequest": { "description": "Request message for TestIamPermissions method.", "id": "TestIamPermissionsRequest", diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index 5236edac0d0..ea70c314675 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -564,7 +564,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { } // Consumer: Contains information of the customer's network -// configurations.Next available ID: 4 +// configurations. type Consumer struct { // EndpointUri: Output only. The URI of the endpoint used to access the // metastore service. @@ -1677,7 +1677,7 @@ func (s *MetadataManagementActivity) MarshalJSON() ([]byte, error) { } // NetworkConfig: Network configuration for the Dataproc Metastore -// service.Next available ID: 3 +// service. type NetworkConfig struct { // Consumers: Immutable. The consumer-side network configuration for the // Dataproc Metastore instance. @@ -2216,6 +2216,10 @@ type Service struct { // state of the metastore service, if available. StateMessage string `json:"stateMessage,omitempty"` + // TelemetryConfig: The configuration specifying telemetry settings for + // the Dataproc Metastore service. If unspecified defaults to JSON. + TelemetryConfig *TelemetryConfig `json:"telemetryConfig,omitempty"` + // Tier: The tier of the service. // // Possible values: @@ -2344,6 +2348,38 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TelemetryConfig: Telemetry Configuration for the Dataproc Metastore +// service. +type TelemetryConfig struct { + // Possible values: + // "LOG_FORMAT_UNSPECIFIED" - The LOG_FORMAT is not set. + // "LEGACY" - Logging output uses the legacy textPayload format. + // "JSON" - Logging output uses the jsonPayload format. + LogFormat string `json:"logFormat,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogFormat") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LogFormat") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TelemetryConfig) MarshalJSON() ([]byte, error) { + type NoMethod TelemetryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TestIamPermissionsRequest: Request message for TestIamPermissions // method. type TestIamPermissionsRequest struct { diff --git a/metastore/v1beta/metastore-api.json b/metastore/v1beta/metastore-api.json index 677707c49ca..903f6d106c1 100644 --- a/metastore/v1beta/metastore-api.json +++ b/metastore/v1beta/metastore-api.json @@ -1467,7 +1467,7 @@ } } }, - "revision": "20220929", + "revision": "20221012", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AuditConfig": { @@ -1650,7 +1650,7 @@ "type": "object" }, "Consumer": { - "description": "Contains information of the customer's network configurations.Next available ID: 4", + "description": "Contains information of the customer's network configurations.", "id": "Consumer", "properties": { "endpointUri": { @@ -2338,7 +2338,7 @@ "type": "object" }, "NetworkConfig": { - "description": "Network configuration for the Dataproc Metastore service.Next available ID: 3", + "description": "Network configuration for the Dataproc Metastore service.", "id": "NetworkConfig", "properties": { "consumers": { @@ -2704,6 +2704,10 @@ "readOnly": true, "type": "string" }, + "telemetryConfig": { + "$ref": "TelemetryConfig", + "description": "The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON." + }, "tier": { "description": "The tier of the service.", "enum": [ @@ -2775,6 +2779,26 @@ }, "type": "object" }, + "TelemetryConfig": { + "description": "Telemetry Configuration for the Dataproc Metastore service.", + "id": "TelemetryConfig", + "properties": { + "logFormat": { + "enum": [ + "LOG_FORMAT_UNSPECIFIED", + "LEGACY", + "JSON" + ], + "enumDescriptions": [ + "The LOG_FORMAT is not set.", + "Logging output uses the legacy textPayload format.", + "Logging output uses the jsonPayload format." + ], + "type": "string" + } + }, + "type": "object" + }, "TestIamPermissionsRequest": { "description": "Request message for TestIamPermissions method.", "id": "TestIamPermissionsRequest", diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index 3373feca211..764ea2f3655 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -564,7 +564,7 @@ func (s *Binding) MarshalJSON() ([]byte, error) { } // Consumer: Contains information of the customer's network -// configurations.Next available ID: 4 +// configurations. type Consumer struct { // EndpointUri: Output only. The URI of the endpoint used to access the // metastore service. @@ -1677,7 +1677,7 @@ func (s *MetadataManagementActivity) MarshalJSON() ([]byte, error) { } // NetworkConfig: Network configuration for the Dataproc Metastore -// service.Next available ID: 3 +// service. type NetworkConfig struct { // Consumers: Immutable. The consumer-side network configuration for the // Dataproc Metastore instance. @@ -2216,6 +2216,10 @@ type Service struct { // state of the metastore service, if available. StateMessage string `json:"stateMessage,omitempty"` + // TelemetryConfig: The configuration specifying telemetry settings for + // the Dataproc Metastore service. If unspecified defaults to JSON. + TelemetryConfig *TelemetryConfig `json:"telemetryConfig,omitempty"` + // Tier: The tier of the service. // // Possible values: @@ -2344,6 +2348,38 @@ func (s *Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TelemetryConfig: Telemetry Configuration for the Dataproc Metastore +// service. +type TelemetryConfig struct { + // Possible values: + // "LOG_FORMAT_UNSPECIFIED" - The LOG_FORMAT is not set. + // "LEGACY" - Logging output uses the legacy textPayload format. + // "JSON" - Logging output uses the jsonPayload format. + LogFormat string `json:"logFormat,omitempty"` + + // ForceSendFields is a list of field names (e.g. "LogFormat") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "LogFormat") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TelemetryConfig) MarshalJSON() ([]byte, error) { + type NoMethod TelemetryConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // TestIamPermissionsRequest: Request message for TestIamPermissions // method. type TestIamPermissionsRequest struct { diff --git a/networkconnectivity/v1/networkconnectivity-api.json b/networkconnectivity/v1/networkconnectivity-api.json index 00d1e31bb97..a5ccb15e35a 100644 --- a/networkconnectivity/v1/networkconnectivity-api.json +++ b/networkconnectivity/v1/networkconnectivity-api.json @@ -541,6 +541,188 @@ } } }, + "internalRanges": { + "methods": { + "create": { + "description": "Creates a new InternalRange in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.internalRanges.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "internalRangeId": { + "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource's name of the InternalRange.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/internalRanges", + "request": { + "$ref": "InternalRange" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single InternalRange.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", + "httpMethod": "DELETE", + "id": "networkconnectivity.projects.locations.internalRanges.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the InternalRange to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single InternalRange.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.internalRanges.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the InternalRange to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "InternalRange" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists InternalRanges in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.internalRanges.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters the results listed in the response.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Sort the results by a certain order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results per page that should be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource's name.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/internalRanges", + "response": { + "$ref": "ListInternalRangesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single InternalRange.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", + "httpMethod": "PATCH", + "id": "networkconnectivity.projects.locations.internalRanges.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The name of a InternalRange. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the InternalRange 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" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "InternalRange" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "cancel": { @@ -664,6 +846,279 @@ } } }, + "serviceClasses": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:getIamPolicy", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceClasses.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/[^/]+/serviceClasses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceClasses.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceClasses.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serviceConnectionMaps": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:getIamPolicy", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.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/[^/]+/serviceConnectionMaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serviceConnectionPolicies": { + "methods": { + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:getIamPolicy", + "httpMethod": "GET", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.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/[^/]+/serviceConnectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:setIamPolicy", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:testIamPermissions", + "httpMethod": "POST", + "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "spokes": { "methods": { "create": { @@ -938,7 +1393,7 @@ } } }, - "revision": "20220912", + "revision": "20221020", "rootUrl": "https://networkconnectivity.googleapis.com/", "schemas": { "AuditConfig": { @@ -1191,6 +1646,111 @@ }, "type": "object" }, + "InternalRange": { + "description": "The InternalRange resource for IPAM operations within a VPC network. Used to represent a private address range along with behavioral characterstics of that range (it's usage and peering behavior). Networking resources can link to this range if they are created as belonging to it. Next id: 14", + "id": "InternalRange", + "properties": { + "createTime": { + "description": "Time when the InternalRange was created.", + "format": "google-datetime", + "type": "string" + }, + "description": { + "description": "A description of this resource.", + "type": "string" + }, + "ipCidrRange": { + "description": "IP range that this InternalRange defines.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels.", + "type": "object" + }, + "name": { + "description": "Immutable. The name of a InternalRange. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", + "type": "string" + }, + "network": { + "description": "The URL or resource ID of the network in which to reserve the Internal Range. The network cannot be deleted if there are any reserved Internal Ranges referring to it. Legacy network is not supported. This can only be specified for a global internal address. Example: - URL: /compute/v1/projects/{project}/global/networks/{resourceId} - ID: network123", + "type": "string" + }, + "overlaps": { + "description": "Optional. Types of resources that are allowed to overlap with the current InternalRange.", + "items": { + "enum": [ + "OVERLAP_UNSPECIFIED", + "OVERLAP_ROUTE_RANGE" + ], + "enumDescriptions": [ + "No overlap overrides.", + "Allow creation of static routes more specific that the current InternalRange." + ], + "type": "string" + }, + "type": "array" + }, + "peering": { + "description": "The type of peering set for this InternalRange.", + "enum": [ + "PEERING_UNSPECIFIED", + "FOR_SELF", + "FOR_PEER", + "NOT_SHARED" + ], + "enumDescriptions": [ + "If Peering is left unspecified in CreateInternalRange or UpdateInternalRange, it will be defaulted to FOR_SELF.", + "This is the default behavior and represents the case that this InternalRange is intended to be used in the VPC on which it is created and is accessible from it’s peers. This implies that peers or peer-of-peer’s cannot use this range.", + "This behavior can be set when the Internal Range is being reserved for usage by the peers. This means that no resource within the VPC in which it is being created can use this to associate with a GCP resource, but one of the peer’s can. This represents \"donating\" a range for peers to use.", + "This behavior can be set when the Internal Range is being reserved for usage by the VPC on which it is created but not shared with the peers. In a sense it is local to the VPC. This can be used to create Internal Ranges for various purposes like HTTP_INTERNAL_LOAD_BALANCER or for interconnect routes that are not shared with peers. This also implies that peer’s cannot use this range in a way that is visible to this VPC, but can re-use this range as long as it is NOT_SHARED from the peer VPC too." + ], + "type": "string" + }, + "prefixLength": { + "description": "An alternate to ip_cidr_range. Can be set when trying to create a reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, it's an error if the range sizes don't match. Can also be used during updates to change the range size.", + "format": "int32", + "type": "integer" + }, + "targetCidrRange": { + "description": "Optional. Can be set to narrow down or pick a different address space while searching for a free range. If not set, defaults to the \"10.0.0.0/8\" address space. This can be used to search in other rfc-1918 address spaces like \"172.16.0.0/12\" and \"192.168.0.0/16\" or non-rfc-1918 address spaces used in the VPC.", + "items": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Time when the InternalRange was updated.", + "format": "google-datetime", + "type": "string" + }, + "usage": { + "description": "The type of usage set for this InternalRange.", + "enum": [ + "USAGE_UNSPECIFIED", + "FOR_VPC", + "EXTERNAL_TO_VPC" + ], + "enumDescriptions": [ + "Unspecified usage is allowed in calls which identify the resource by other fields and do not need Usage set to complete. These are i.e.: GetInternalRange and DeleteInternalRange. Usage needs to be specified explicitly in CreateInternalRange or UpdateInternalRange calls.", + "A GCP resource can use the reserved CIDR block by associating it with the Internal Range resource if usage is set to FOR_VPC.", + "Ranges created with EXTERNAL_TO_VPC cannot be associated with GCP resources and are meant to block out address ranges for various use cases, like for example, usage on-prem, with dynamic route announcements via interconnect." + ], + "type": "string" + }, + "users": { + "description": "Output only. The list of resources that refer to this internal range. Resources that use the InternalRange for their range allocation are referred to as users of the range. Other resources mark themselves as users while doing so by creating a reference to this InternalRange. Having a user, based on this reference, prevents deletion of the InternalRange referred to. Can be empty.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "LinkedInterconnectAttachments": { "description": "A collection of VLAN attachment resources. These resources should be redundant attachments that all advertise the same prefixes to Google Cloud. Alternatively, in active/passive configurations, all attachments should be capable of advertising the same prefixes.", "id": "LinkedInterconnectAttachments", @@ -1205,6 +1765,11 @@ "type": "string" }, "type": "array" + }, + "vpcNetwork": { + "description": "Output only. The VPC network where these VLAN attachments are located.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1223,6 +1788,11 @@ "siteToSiteDataTransfer": { "description": "A value that controls whether site-to-site data transfer is enabled for these resources. Data transfer is available only in [supported locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).", "type": "boolean" + }, + "vpcNetwork": { + "description": "Output only. The VPC network where these router appliance instances are located.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1241,6 +1811,11 @@ "type": "string" }, "type": "array" + }, + "vpcNetwork": { + "description": "Output only. The VPC network where these VPN tunnels are located.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1270,6 +1845,31 @@ }, "type": "object" }, + "ListInternalRangesResponse": { + "description": "Response for InternalRange.ListInternalRanges", + "id": "ListInternalRangesResponse", + "properties": { + "internalRanges": { + "description": "InternalRanges to be returned.", + "items": { + "$ref": "InternalRange" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", diff --git a/networkconnectivity/v1/networkconnectivity-gen.go b/networkconnectivity/v1/networkconnectivity-gen.go index 2ecb7565001..ed1884582d0 100644 --- a/networkconnectivity/v1/networkconnectivity-gen.go +++ b/networkconnectivity/v1/networkconnectivity-gen.go @@ -152,7 +152,11 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Global = NewProjectsLocationsGlobalService(s) + rs.InternalRanges = NewProjectsLocationsInternalRangesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) + rs.ServiceClasses = NewProjectsLocationsServiceClassesService(s) + rs.ServiceConnectionMaps = NewProjectsLocationsServiceConnectionMapsService(s) + rs.ServiceConnectionPolicies = NewProjectsLocationsServiceConnectionPoliciesService(s) rs.Spokes = NewProjectsLocationsSpokesService(s) return rs } @@ -162,8 +166,16 @@ type ProjectsLocationsService struct { Global *ProjectsLocationsGlobalService + InternalRanges *ProjectsLocationsInternalRangesService + Operations *ProjectsLocationsOperationsService + ServiceClasses *ProjectsLocationsServiceClassesService + + ServiceConnectionMaps *ProjectsLocationsServiceConnectionMapsService + + ServiceConnectionPolicies *ProjectsLocationsServiceConnectionPoliciesService + Spokes *ProjectsLocationsSpokesService } @@ -200,6 +212,15 @@ type ProjectsLocationsGlobalPolicyBasedRoutesService struct { s *Service } +func NewProjectsLocationsInternalRangesService(s *Service) *ProjectsLocationsInternalRangesService { + rs := &ProjectsLocationsInternalRangesService{s: s} + return rs +} + +type ProjectsLocationsInternalRangesService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -209,6 +230,33 @@ type ProjectsLocationsOperationsService struct { s *Service } +func NewProjectsLocationsServiceClassesService(s *Service) *ProjectsLocationsServiceClassesService { + rs := &ProjectsLocationsServiceClassesService{s: s} + return rs +} + +type ProjectsLocationsServiceClassesService struct { + s *Service +} + +func NewProjectsLocationsServiceConnectionMapsService(s *Service) *ProjectsLocationsServiceConnectionMapsService { + rs := &ProjectsLocationsServiceConnectionMapsService{s: s} + return rs +} + +type ProjectsLocationsServiceConnectionMapsService struct { + s *Service +} + +func NewProjectsLocationsServiceConnectionPoliciesService(s *Service) *ProjectsLocationsServiceConnectionPoliciesService { + rs := &ProjectsLocationsServiceConnectionPoliciesService{s: s} + return rs +} + +type ProjectsLocationsServiceConnectionPoliciesService struct { + s *Service +} + func NewProjectsLocationsSpokesService(s *Service) *ProjectsLocationsSpokesService { rs := &ProjectsLocationsSpokesService{s: s} return rs @@ -686,6 +734,141 @@ func (s *Hub) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InternalRange: The InternalRange resource for IPAM operations within +// a VPC network. Used to represent a private address range along with +// behavioral characterstics of that range (it's usage and peering +// behavior). Networking resources can link to this range if they are +// created as belonging to it. Next id: 14 +type InternalRange struct { + // CreateTime: Time when the InternalRange was created. + CreateTime string `json:"createTime,omitempty"` + + // Description: A description of this resource. + Description string `json:"description,omitempty"` + + // IpCidrRange: IP range that this InternalRange defines. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // Labels: User-defined labels. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Immutable. The name of a InternalRange. Format: + // projects/{project}/locations/{location}/internalRanges/{internal_range + // } See: https://google.aip.dev/122#fields-representing-resource-names + Name string `json:"name,omitempty"` + + // Network: The URL or resource ID of the network in which to reserve + // the Internal Range. The network cannot be deleted if there are any + // reserved Internal Ranges referring to it. Legacy network is not + // supported. This can only be specified for a global internal address. + // Example: - URL: + // /compute/v1/projects/{project}/global/networks/{resourceId} - ID: + // network123 + Network string `json:"network,omitempty"` + + // Overlaps: Optional. Types of resources that are allowed to overlap + // with the current InternalRange. + // + // Possible values: + // "OVERLAP_UNSPECIFIED" - No overlap overrides. + // "OVERLAP_ROUTE_RANGE" - Allow creation of static routes more + // specific that the current InternalRange. + Overlaps []string `json:"overlaps,omitempty"` + + // Peering: The type of peering set for this InternalRange. + // + // Possible values: + // "PEERING_UNSPECIFIED" - If Peering is left unspecified in + // CreateInternalRange or UpdateInternalRange, it will be defaulted to + // FOR_SELF. + // "FOR_SELF" - This is the default behavior and represents the case + // that this InternalRange is intended to be used in the VPC on which it + // is created and is accessible from it’s peers. This implies that + // peers or peer-of-peer’s cannot use this range. + // "FOR_PEER" - This behavior can be set when the Internal Range is + // being reserved for usage by the peers. This means that no resource + // within the VPC in which it is being created can use this to associate + // with a GCP resource, but one of the peer’s can. This represents + // "donating" a range for peers to use. + // "NOT_SHARED" - This behavior can be set when the Internal Range is + // being reserved for usage by the VPC on which it is created but not + // shared with the peers. In a sense it is local to the VPC. This can be + // used to create Internal Ranges for various purposes like + // HTTP_INTERNAL_LOAD_BALANCER or for interconnect routes that are not + // shared with peers. This also implies that peer’s cannot use this + // range in a way that is visible to this VPC, but can re-use this range + // as long as it is NOT_SHARED from the peer VPC too. + Peering string `json:"peering,omitempty"` + + // PrefixLength: An alternate to ip_cidr_range. Can be set when trying + // to create a reservation that automatically finds a free range of the + // given size. If both ip_cidr_range and prefix_length are set, it's an + // error if the range sizes don't match. Can also be used during updates + // to change the range size. + PrefixLength int64 `json:"prefixLength,omitempty"` + + // TargetCidrRange: Optional. Can be set to narrow down or pick a + // different address space while searching for a free range. If not set, + // defaults to the "10.0.0.0/8" address space. This can be used to + // search in other rfc-1918 address spaces like "172.16.0.0/12" and + // "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC. + TargetCidrRange []string `json:"targetCidrRange,omitempty"` + + // UpdateTime: Time when the InternalRange was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // Usage: The type of usage set for this InternalRange. + // + // Possible values: + // "USAGE_UNSPECIFIED" - Unspecified usage is allowed in calls which + // identify the resource by other fields and do not need Usage set to + // complete. These are i.e.: GetInternalRange and DeleteInternalRange. + // Usage needs to be specified explicitly in CreateInternalRange or + // UpdateInternalRange calls. + // "FOR_VPC" - A GCP resource can use the reserved CIDR block by + // associating it with the Internal Range resource if usage is set to + // FOR_VPC. + // "EXTERNAL_TO_VPC" - Ranges created with EXTERNAL_TO_VPC cannot be + // associated with GCP resources and are meant to block out address + // ranges for various use cases, like for example, usage on-prem, with + // dynamic route announcements via interconnect. + Usage string `json:"usage,omitempty"` + + // Users: Output only. The list of resources that refer to this internal + // range. Resources that use the InternalRange for their range + // allocation are referred to as users of the range. Other resources + // mark themselves as users while doing so by creating a reference to + // this InternalRange. Having a user, based on this reference, prevents + // deletion of the InternalRange referred to. Can be empty. + Users []string `json:"users,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InternalRange) MarshalJSON() ([]byte, error) { + type NoMethod InternalRange + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LinkedInterconnectAttachments: A collection of VLAN attachment // resources. These resources should be redundant attachments that all // advertise the same prefixes to Google Cloud. Alternatively, in @@ -701,6 +884,10 @@ type LinkedInterconnectAttachments struct { // Uris: The URIs of linked interconnect attachment resources Uris []string `json:"uris,omitempty"` + // VpcNetwork: Output only. The VPC network where these VLAN attachments + // are located. + VpcNetwork string `json:"vpcNetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. // "SiteToSiteDataTransfer") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -740,6 +927,10 @@ type LinkedRouterApplianceInstances struct { // (https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). SiteToSiteDataTransfer bool `json:"siteToSiteDataTransfer,omitempty"` + // VpcNetwork: Output only. The VPC network where these router appliance + // instances are located. + VpcNetwork string `json:"vpcNetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -778,6 +969,10 @@ type LinkedVpnTunnels struct { // Uris: The URIs of linked VPN tunnel resources. Uris []string `json:"uris,omitempty"` + // VpcNetwork: Output only. The VPC network where these VPN tunnels are + // located. + VpcNetwork string `json:"vpcNetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. // "SiteToSiteDataTransfer") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -843,6 +1038,48 @@ func (s *ListHubsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListInternalRangesResponse: Response for +// InternalRange.ListInternalRanges +type ListInternalRangesResponse struct { + // InternalRanges: InternalRanges to be returned. + InternalRanges []*InternalRange `json:"internalRanges,omitempty"` + + // NextPageToken: The next pagination token in the List response. It + // should be used as page_token for the following request. An empty + // value means no more result. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "InternalRanges") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InternalRanges") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListInternalRangesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInternalRangesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListLocationsResponse: The response message for // Locations.ListLocations. type ListLocationsResponse struct { @@ -3607,40 +3844,58 @@ func (c *ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall) Do(opts } -// method id "networkconnectivity.projects.locations.operations.cancel": +// method id "networkconnectivity.projects.locations.internalRanges.create": -type ProjectsLocationsOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInternalRangesCreateCall struct { + s *Service + parent string + internalrange *InternalRange + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. -// The server makes a best effort to cancel the operation, but success -// is not guaranteed. If the server doesn't support this method, it -// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use -// Operations.GetOperation or other methods to check whether the -// cancellation succeeded or whether the operation completed despite -// cancellation. On successful cancellation, the operation is not -// deleted; instead, it becomes an operation with an Operation.error -// value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Create: Creates a new InternalRange in a given project and location. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest +// - parent: The parent resource's name of the InternalRange. +func (r *ProjectsLocationsInternalRangesService) Create(parent string, internalrange *InternalRange) *ProjectsLocationsInternalRangesCreateCall { + c := &ProjectsLocationsInternalRangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.internalrange = internalrange + return c +} + +// InternalRangeId sets the optional parameter "internalRangeId": +// Resource ID (i.e. 'foo' in +// '[...]/projects/p/locations/l/internalRanges/foo') See +// https://google.aip.dev/122#resource-id-segments Unique per location. +func (c *ProjectsLocationsInternalRangesCreateCall) InternalRangeId(internalRangeId string) *ProjectsLocationsInternalRangesCreateCall { + c.urlParams_.Set("internalRangeId", internalRangeId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsInternalRangesCreateCall) RequestId(requestId string) *ProjectsLocationsInternalRangesCreateCall { + 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 *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsInternalRangesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3648,21 +3903,21 @@ func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsInternalRangesCreateCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsInternalRangesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInternalRangesCreateCall) 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_ { @@ -3670,14 +3925,14 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.internalrange) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/internalRanges") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3685,19 +3940,19 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.operations.cancel" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "networkconnectivity.projects.locations.internalRanges.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsInternalRangesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3716,7 +3971,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Empty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3728,28 +3983,38 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "description": "Creates a new InternalRange in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges", // "httpMethod": "POST", - // "id": "networkconnectivity.projects.locations.operations.cancel", + // "id": "networkconnectivity.projects.locations.internalRanges.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource to be cancelled.", + // "internalRangeId": { + // "description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource's name of the InternalRange.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1/{+name}:cancel", + // "path": "v1/{+parent}/internalRanges", // "request": { - // "$ref": "GoogleLongrunningCancelOperationRequest" + // "$ref": "InternalRange" // }, // "response": { - // "$ref": "Empty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3758,9 +4023,9 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) } -// method id "networkconnectivity.projects.locations.operations.delete": +// method id "networkconnectivity.projects.locations.internalRanges.delete": -type ProjectsLocationsOperationsDeleteCall struct { +type ProjectsLocationsInternalRangesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3768,22 +4033,37 @@ type ProjectsLocationsOperationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a long-running operation. This method indicates that -// the client is no longer interested in the operation result. It does -// not cancel the operation. If the server doesn't support this method, -// it returns `google.rpc.Code.UNIMPLEMENTED`. +// Delete: Deletes a single InternalRange. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { - c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the InternalRange to delete. +func (r *ProjectsLocationsInternalRangesService) Delete(name string) *ProjectsLocationsInternalRangesDeleteCall { + c := &ProjectsLocationsInternalRangesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes after the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsInternalRangesDeleteCall) RequestId(requestId string) *ProjectsLocationsInternalRangesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsInternalRangesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3791,21 +4071,21 @@ func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsInternalRangesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsInternalRangesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInternalRangesDeleteCall) 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_ { @@ -3828,14 +4108,14 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.operations.delete" call. -// Exactly one of *Empty or error will be non-nil. Any non-2xx status -// code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified -// was returned. -func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +// Do executes the "networkconnectivity.projects.locations.internalRanges.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsInternalRangesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3854,7 +4134,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &Empty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3866,25 +4146,30 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Deletes a single InternalRange.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", // "httpMethod": "DELETE", - // "id": "networkconnectivity.projects.locations.operations.delete", + // "id": "networkconnectivity.projects.locations.internalRanges.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource to be deleted.", + // "description": "Required. The name of the InternalRange to delete.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", // "required": true, // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "Empty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -3893,9 +4178,9 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "networkconnectivity.projects.locations.operations.get": +// method id "networkconnectivity.projects.locations.internalRanges.get": -type ProjectsLocationsOperationsGetCall struct { +type ProjectsLocationsInternalRangesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3904,13 +4189,11 @@ type ProjectsLocationsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets details of a single InternalRange. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the InternalRange to get. +func (r *ProjectsLocationsInternalRangesService) Get(name string) *ProjectsLocationsInternalRangesGetCall { + c := &ProjectsLocationsInternalRangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -3918,7 +4201,7 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsInternalRangesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3928,7 +4211,7 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsInternalRangesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInternalRangesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -3936,21 +4219,21 @@ func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsInternalRangesGetCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsInternalRangesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInternalRangesGetCall) 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_ { @@ -3976,14 +4259,14 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "networkconnectivity.projects.locations.internalRanges.get" call. +// Exactly one of *InternalRange or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *InternalRange.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsInternalRangesGetCall) Do(opts ...googleapi.CallOption) (*InternalRange, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4002,7 +4285,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningOperation{ + ret := &InternalRange{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4014,25 +4297,25 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "description": "Gets details of a single InternalRange.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.operations.get", + // "id": "networkconnectivity.projects.locations.internalRanges.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Name of the InternalRange to get.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "InternalRange" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4041,52 +4324,49 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "networkconnectivity.projects.locations.operations.list": +// method id "networkconnectivity.projects.locations.internalRanges.list": -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsInternalRangesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to -// override the binding to use different resource name schemes, such as -// `users/*/operations`. To override the binding, API services can add a -// binding such as "/v1/{name=users/*}/operations" to their service -// configuration. For backwards compatibility, the default name includes -// the operations collection id, however overriding users must ensure -// the name binding is the parent resource, without the operations -// collection id. +// List: Lists InternalRanges in a given project and location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { - c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource's name. +func (r *ProjectsLocationsInternalRangesService) List(parent string) *ProjectsLocationsInternalRangesListCall { + c := &ProjectsLocationsInternalRangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { +// Filter sets the optional parameter "filter": A filter expression that +// filters the results listed in the response. +func (c *ProjectsLocationsInternalRangesListCall) Filter(filter string) *ProjectsLocationsInternalRangesListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { +// OrderBy sets the optional parameter "orderBy": Sort the results by a +// certain order. +func (c *ProjectsLocationsInternalRangesListCall) OrderBy(orderBy string) *ProjectsLocationsInternalRangesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results per page that should be returned. +func (c *ProjectsLocationsInternalRangesListCall) PageSize(pageSize int64) *ProjectsLocationsInternalRangesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { +// PageToken sets the optional parameter "pageToken": The page token. +func (c *ProjectsLocationsInternalRangesListCall) PageToken(pageToken string) *ProjectsLocationsInternalRangesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -4094,7 +4374,7 @@ func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsInternalRangesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4104,7 +4384,7 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsInternalRangesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInternalRangesListCall { c.ifNoneMatch_ = entityTag return c } @@ -4112,21 +4392,21 @@ func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsInternalRangesListCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsInternalRangesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInternalRangesListCall) 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_ { @@ -4139,7 +4419,7 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/internalRanges") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4147,20 +4427,19 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networkconnectivity.projects.locations.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "networkconnectivity.projects.locations.internalRanges.list" call. +// Exactly one of *ListInternalRangesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListInternalRangesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsInternalRangesListCall) Do(opts ...googleapi.CallOption) (*ListInternalRangesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4179,7 +4458,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &ListInternalRangesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4191,41 +4470,46 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "description": "Lists InternalRanges in a given project and location.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges", // "httpMethod": "GET", - // "id": "networkconnectivity.projects.locations.operations.list", + // "id": "networkconnectivity.projects.locations.internalRanges.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "A filter expression that filters the results listed in the response.", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "Sort the results by a certain order.", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of results per page that should be returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "The page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource's name.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1/{+name}/operations", + // "path": "v1/{+parent}/internalRanges", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "ListInternalRangesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4237,7 +4521,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsInternalRangesListCall) Pages(ctx context.Context, f func(*ListInternalRangesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -4255,6 +4539,2255 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } +// method id "networkconnectivity.projects.locations.internalRanges.patch": + +type ProjectsLocationsInternalRangesPatchCall struct { + s *Service + name string + internalrange *InternalRange + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single InternalRange. +// +// - name: Immutable. The name of a InternalRange. Format: +// projects/{project}/locations/{location}/internalRanges/{internal_ran +// ge} See: +// https://google.aip.dev/122#fields-representing-resource-names. +func (r *ProjectsLocationsInternalRangesService) Patch(name string, internalrange *InternalRange) *ProjectsLocationsInternalRangesPatchCall { + c := &ProjectsLocationsInternalRangesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.internalrange = internalrange + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. The server will guarantee +// that for at least 60 minutes since the first request. For example, +// consider a situation where you make an initial request and t he +// 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 *ProjectsLocationsInternalRangesPatchCall) RequestId(requestId string) *ProjectsLocationsInternalRangesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is +// used to specify the fields to be overwritten in the InternalRange +// 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 *ProjectsLocationsInternalRangesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInternalRangesPatchCall { + 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 *ProjectsLocationsInternalRangesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesPatchCall { + 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 *ProjectsLocationsInternalRangesPatchCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesPatchCall { + 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 *ProjectsLocationsInternalRangesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInternalRangesPatchCall) 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.internalrange) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.internalRanges.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsInternalRangesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the parameters of a single InternalRange.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", + // "httpMethod": "PATCH", + // "id": "networkconnectivity.projects.locations.internalRanges.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The name of a InternalRange. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "updateMask": { + // "description": "Optional. Field mask is used to specify the fields to be overwritten in the InternalRange 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" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "InternalRange" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.operations.cancel": + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. +// The server makes a best effort to cancel the operation, but success +// is not guaranteed. If the server doesn't support this method, it +// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use +// Operations.GetOperation or other methods to check whether the +// cancellation succeeded or whether the operation completed despite +// cancellation. On successful cancellation, the operation is not +// deleted; instead, it becomes an operation with an Operation.error +// value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + 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 *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.operations.cancel" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.operations.cancel", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be cancelled.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:cancel", + // "request": { + // "$ref": "GoogleLongrunningCancelOperationRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.operations.delete": + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that +// the client is no longer interested in the operation result. It does +// not cancel the operation. If the server doesn't support this method, +// it returns `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.operations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "DELETE", + // "id": "networkconnectivity.projects.locations.operations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource to be deleted.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.operations.get": + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.operations.list": + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to +// override the binding to use different resource name schemes, such as +// `users/*/operations`. To override the binding, API services can add a +// binding such as "/v1/{name=users/*}/operations" to their service +// configuration. For backwards compatibility, the default name includes +// the operations collection id, however overriding users must ensure +// the name binding is the parent resource, without the operations +// collection id. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "networkconnectivity.projects.locations.serviceClasses.getIamPolicy": + +type ProjectsLocationsServiceClassesGetIamPolicyCall 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 *ProjectsLocationsServiceClassesService) GetIamPolicy(resource string) *ProjectsLocationsServiceClassesGetIamPolicyCall { + c := &ProjectsLocationsServiceClassesGetIamPolicyCall{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 *ProjectsLocationsServiceClassesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceClassesGetIamPolicyCall { + 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 *ProjectsLocationsServiceClassesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesGetIamPolicyCall { + 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 *ProjectsLocationsServiceClassesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceClassesGetIamPolicyCall { + 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 *ProjectsLocationsServiceClassesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesGetIamPolicyCall { + 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 *ProjectsLocationsServiceClassesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceClasses.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 *ProjectsLocationsServiceClassesGetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceClasses.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/[^/]+/serviceClasses/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceClasses.setIamPolicy": + +type ProjectsLocationsServiceClassesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceClassesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceClassesSetIamPolicyCall { + c := &ProjectsLocationsServiceClassesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesSetIamPolicyCall { + 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 *ProjectsLocationsServiceClassesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesSetIamPolicyCall { + 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 *ProjectsLocationsServiceClassesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceClasses.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) 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": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceClasses.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceClasses.testIamPermissions": + +type ProjectsLocationsServiceClassesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceClassesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceClassesTestIamPermissionsCall { + c := &ProjectsLocationsServiceClassesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesTestIamPermissionsCall { + 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 *ProjectsLocationsServiceClassesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesTestIamPermissionsCall { + 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 *ProjectsLocationsServiceClassesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceClasses.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceClasses.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy": + +type ProjectsLocationsServiceConnectionMapsGetIamPolicyCall 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 *ProjectsLocationsServiceConnectionMapsService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionMapsGetIamPolicyCall{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 *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.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 *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.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/[^/]+/serviceConnectionMaps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy": + +type ProjectsLocationsServiceConnectionMapsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionMapsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionMapsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) 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": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions": + +type ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionMapsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { + c := &ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { + 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 *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall { + 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 *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy": + +type ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall 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 *ProjectsLocationsServiceConnectionPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall{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 *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.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 *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) 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": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.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/[^/]+/serviceConnectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy": + +type ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { + c := &ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall { + 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 *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) 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": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions": + +type ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. If the resource does not exist, this will return +// an empty set of permissions, not a `NOT_FOUND` error. Note: This +// operation is designed to be used for building permission-aware UIs +// and command-line tools, not for authorization checking. This +// operation may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsServiceConnectionPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { + c := &ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { + 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 *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall { + 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 *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &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 := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "networkconnectivity.projects.locations.spokes.create": type ProjectsLocationsSpokesCreateCall struct { diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index 1feb4d45fe6..3100558b602 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20220915", + "revision": "20220922", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1741,7 +1741,7 @@ "PEERING_SUBNET", "PEERING_STATIC", "PEERING_DYNAMIC", - "POLICY_BASED_ROUTE" + "POLICY_BASED" ], "enumDescriptions": [ "Unspecified type. Default value.", diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 58ba73227de..8dfdb0d64cc 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -1944,7 +1944,7 @@ type RouteInfo struct { // "PEERING_SUBNET" - A subnet route received from peering network. // "PEERING_STATIC" - A static route received from peering network. // "PEERING_DYNAMIC" - A dynamic route received from peering network. - // "POLICY_BASED_ROUTE" - Policy based route. + // "POLICY_BASED" - Policy based route. RouteType string `json:"routeType,omitempty"` // SrcIpRange: Source IP address range of the route. Policy based routes diff --git a/notebooks/v1/notebooks-api.json b/notebooks/v1/notebooks-api.json index e9b8d3439cb..80a1a08d3bc 100644 --- a/notebooks/v1/notebooks-api.json +++ b/notebooks/v1/notebooks-api.json @@ -1904,7 +1904,7 @@ } } }, - "revision": "20220927", + "revision": "20221017", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -3410,7 +3410,7 @@ ], "enumDescriptions": [ "Accelerator type is not specified.", - "b/241005111 K80 deprecation in Google Managed Notebooks Accelerator type is Nvidia Tesla K80.", + "Accelerator type is Nvidia Tesla K80.", "Accelerator type is Nvidia Tesla P100.", "Accelerator type is Nvidia Tesla V100.", "Accelerator type is Nvidia Tesla P4.", diff --git a/notebooks/v1/notebooks-gen.go b/notebooks/v1/notebooks-gen.go index ded11ce42b7..c86978ee663 100644 --- a/notebooks/v1/notebooks-gen.go +++ b/notebooks/v1/notebooks-gen.go @@ -2544,8 +2544,7 @@ type RuntimeAcceleratorConfig struct { // // Possible values: // "ACCELERATOR_TYPE_UNSPECIFIED" - Accelerator type is not specified. - // "NVIDIA_TESLA_K80" - b/241005111 K80 deprecation in Google Managed - // Notebooks Accelerator type is Nvidia Tesla K80. + // "NVIDIA_TESLA_K80" - Accelerator type is Nvidia Tesla K80. // "NVIDIA_TESLA_P100" - Accelerator type is Nvidia Tesla P100. // "NVIDIA_TESLA_V100" - Accelerator type is Nvidia Tesla V100. // "NVIDIA_TESLA_P4" - Accelerator type is Nvidia Tesla P4. diff --git a/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json b/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json index 13ec31ef379..b77d67df82e 100644 --- a/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json +++ b/playdeveloperreporting/v1alpha1/playdeveloperreporting-api.json @@ -718,7 +718,7 @@ } } }, - "revision": "20220726", + "revision": "20221023", "rootUrl": "https://playdeveloperreporting.googleapis.com/", "schemas": { "GooglePlayDeveloperReportingV1alpha1Anomaly": { @@ -1428,7 +1428,7 @@ "id": "GoogleTypeDecimal", "properties": { "value": { - "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -\u003e `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", + "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -\u003e `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", "type": "string" } }, diff --git a/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go b/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go index 86e3a91fc64..cdfd93713bd 100644 --- a/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go +++ b/playdeveloperreporting/v1alpha1/playdeveloperreporting-gen.go @@ -1965,27 +1965,28 @@ type GoogleTypeDecimal struct { // consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), // followed by a sequence of zero or more decimal digits ("the // integer"), optionally followed by a fraction, optionally followed by - // an exponent. The fraction consists of a decimal point followed by - // zero or more decimal digits. The string must contain at least one - // digit in either the integer or the fraction. The number formed by the - // sign, the integer and the fraction is referred to as the significand. - // The exponent consists of the character `e` (`U+0065`) or `E` - // (`U+0045`) followed by one or more decimal digits. Services - // **should** normalize decimal values before storing them by: - - // Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - - // Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - - // Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - - // Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). - // Services **may** perform additional normalization based on its own - // needs and the internal decimal implementation selected, such as - // shifting the decimal point and exponent value together (example: - // `2.5e-1` <-> `0.25`). Additionally, services **may** preserve - // trailing zeroes in the fraction to indicate increased precision, but - // are not required to do so. Note that only the `.` character is - // supported to divide the integer and the fraction; `,` **should not** - // be supported regardless of locale. Additionally, thousand separators - // **should not** be supported. If a service does support them, values - // **must** be normalized. The ENBF grammar is: DecimalString = [Sign] + // an exponent. An empty string **should** be interpreted as `0`. The + // fraction consists of a decimal point followed by zero or more decimal + // digits. The string must contain at least one digit in either the + // integer or the fraction. The number formed by the sign, the integer + // and the fraction is referred to as the significand. The exponent + // consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed + // by one or more decimal digits. Services **should** normalize decimal + // values before storing them by: - Removing an explicitly-provided `+` + // sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with + // `0` (`.5` -> `0.5`). - Coercing the exponent character to upper-case, + // with explicit sign (`2.5e8` -> `2.5E+8`). - Removing an + // explicitly-provided zero exponent (`2.5E0` -> `2.5`). Services + // **may** perform additional normalization based on its own needs and + // the internal decimal implementation selected, such as shifting the + // decimal point and exponent value together (example: `2.5E-1` <-> + // `0.25`). Additionally, services **may** preserve trailing zeroes in + // the fraction to indicate increased precision, but are not required to + // do so. Note that only the `.` character is supported to divide the + // integer and the fraction; `,` **should not** be supported regardless + // of locale. Additionally, thousand separators **should not** be + // supported. If a service does support them, values **must** be + // normalized. The ENBF grammar is: DecimalString = '' | [Sign] // Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | // [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { // '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services diff --git a/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json b/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json index 39c157fdb23..af43a550f86 100644 --- a/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json +++ b/playdeveloperreporting/v1beta1/playdeveloperreporting-api.json @@ -347,7 +347,7 @@ } } }, - "revision": "20220726", + "revision": "20221023", "rootUrl": "https://playdeveloperreporting.googleapis.com/", "schemas": { "GooglePlayDeveloperReportingV1beta1Anomaly": { @@ -884,7 +884,7 @@ "id": "GoogleTypeDecimal", "properties": { "value": { - "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to lower-case (`2.5E8` -\u003e `2.5e8`). - Removing an explicitly-provided zero exponent (`2.5e0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5e-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", + "description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -\u003e `2.5`). - Replacing a zero-length integer value with `0` (`.5` -\u003e `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -\u003e `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -\u003e `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` \u003c-\u003e `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", "type": "string" } }, diff --git a/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go b/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go index e9964d61d4d..9898a53820b 100644 --- a/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go +++ b/playdeveloperreporting/v1beta1/playdeveloperreporting-gen.go @@ -1518,27 +1518,28 @@ type GoogleTypeDecimal struct { // consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), // followed by a sequence of zero or more decimal digits ("the // integer"), optionally followed by a fraction, optionally followed by - // an exponent. The fraction consists of a decimal point followed by - // zero or more decimal digits. The string must contain at least one - // digit in either the integer or the fraction. The number formed by the - // sign, the integer and the fraction is referred to as the significand. - // The exponent consists of the character `e` (`U+0065`) or `E` - // (`U+0045`) followed by one or more decimal digits. Services - // **should** normalize decimal values before storing them by: - - // Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - - // Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - - // Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`). - - // Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`). - // Services **may** perform additional normalization based on its own - // needs and the internal decimal implementation selected, such as - // shifting the decimal point and exponent value together (example: - // `2.5e-1` <-> `0.25`). Additionally, services **may** preserve - // trailing zeroes in the fraction to indicate increased precision, but - // are not required to do so. Note that only the `.` character is - // supported to divide the integer and the fraction; `,` **should not** - // be supported regardless of locale. Additionally, thousand separators - // **should not** be supported. If a service does support them, values - // **must** be normalized. The ENBF grammar is: DecimalString = [Sign] + // an exponent. An empty string **should** be interpreted as `0`. The + // fraction consists of a decimal point followed by zero or more decimal + // digits. The string must contain at least one digit in either the + // integer or the fraction. The number formed by the sign, the integer + // and the fraction is referred to as the significand. The exponent + // consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed + // by one or more decimal digits. Services **should** normalize decimal + // values before storing them by: - Removing an explicitly-provided `+` + // sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with + // `0` (`.5` -> `0.5`). - Coercing the exponent character to upper-case, + // with explicit sign (`2.5e8` -> `2.5E+8`). - Removing an + // explicitly-provided zero exponent (`2.5E0` -> `2.5`). Services + // **may** perform additional normalization based on its own needs and + // the internal decimal implementation selected, such as shifting the + // decimal point and exponent value together (example: `2.5E-1` <-> + // `0.25`). Additionally, services **may** preserve trailing zeroes in + // the fraction to indicate increased precision, but are not required to + // do so. Note that only the `.` character is supported to divide the + // integer and the fraction; `,` **should not** be supported regardless + // of locale. Additionally, thousand separators **should not** be + // supported. If a service does support them, values **must** be + // normalized. The ENBF grammar is: DecimalString = '' | [Sign] // Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | // [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { // '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 53da147a789..c624aee4a06 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -514,7 +514,7 @@ } } }, - "revision": "20220925", + "revision": "20221017", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -1016,7 +1016,7 @@ "additionalProperties": { "$ref": "GoogleCloudRecaptchaenterpriseV1ScoreDistribution" }, - "description": "Action-based metrics. The map key is the action name which specified by the site owners at time of the \"execute\" client-side call. Populated only for SCORE keys.", + "description": "Action-based metrics. The map key is the action name which specified by the site owners at time of the \"execute\" client-side call.", "type": "object" }, "overallMetrics": { diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index ab5ff688c94..44d421dd907 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -1060,7 +1060,7 @@ func (s *GoogleCloudRecaptchaenterpriseV1ScoreDistribution) MarshalJSON() ([]byt type GoogleCloudRecaptchaenterpriseV1ScoreMetrics struct { // ActionMetrics: Action-based metrics. The map key is the action name // which specified by the site owners at time of the "execute" - // client-side call. Populated only for SCORE keys. + // client-side call. ActionMetrics map[string]GoogleCloudRecaptchaenterpriseV1ScoreDistribution `json:"actionMetrics,omitempty"` // OverallMetrics: Aggregated score metrics for all traffic. diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 90665ff2f6f..f75667ea615 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -624,7 +624,7 @@ } } }, - "revision": "20220518", + "revision": "20221007", "rootUrl": "https://redis.googleapis.com/", "schemas": { "Empty": { @@ -1286,6 +1286,31 @@ }, "type": "object" }, + "ReconciliationOperationMetadata": { + "description": "Operation metadata returned by the CLH during resource state reconciliation.", + "id": "ReconciliationOperationMetadata", + "properties": { + "deleteResource": { + "description": "DEPRECATED. Use exclusive_action instead.", + "type": "boolean" + }, + "exclusiveAction": { + "description": "Excluisive action returned by the CLH.", + "enum": [ + "UNKNOWN_REPAIR_ACTION", + "DELETE", + "RETRY" + ], + "enumDescriptions": [ + "Unknown repair action.", + "The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel. For more information - go/ccfe-delete-on-upsert, go/ccfe-reconciliation-protocol-ug#apply_delete", + "This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." + ], + "type": "string" + } + }, + "type": "object" + }, "RescheduleMaintenanceRequest": { "description": "Request for RescheduleMaintenance.", "id": "RescheduleMaintenanceRequest", diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 76d976e4dca..fe8e0766157 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -1194,6 +1194,51 @@ func (s *PersistenceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ReconciliationOperationMetadata: Operation metadata returned by the +// CLH during resource state reconciliation. +type ReconciliationOperationMetadata struct { + // DeleteResource: DEPRECATED. Use exclusive_action instead. + DeleteResource bool `json:"deleteResource,omitempty"` + + // ExclusiveAction: Excluisive action returned by the CLH. + // + // Possible values: + // "UNKNOWN_REPAIR_ACTION" - Unknown repair action. + // "DELETE" - The resource has to be deleted. When using this bit, the + // CLH should fail the operation. DEPRECATED. Instead use + // DELETE_RESOURCE OperationSignal in SideChannel. For more information + // - go/ccfe-delete-on-upsert, + // go/ccfe-reconciliation-protocol-ug#apply_delete + // "RETRY" - This resource could not be repaired but the repair should + // be tried again at a later time. This can happen if there is a + // dependency that needs to be resolved first- e.g. if a parent resource + // must be repaired before a child resource. + ExclusiveAction string `json:"exclusiveAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeleteResource") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeleteResource") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ReconciliationOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod ReconciliationOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // RescheduleMaintenanceRequest: Request for RescheduleMaintenance. type RescheduleMaintenanceRequest struct { // RescheduleType: Required. If reschedule type is SPECIFIC_TIME, must diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index aceba8234dd..3ee89b8bd4f 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -713,7 +713,7 @@ ], "parameters": { "filter": { - "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The source database name of backup contains the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", + "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The source database name of backup contains the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test) AND` \\ `(metadata.progress.start_time \u003c \\\"2022-01-18T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CopyBackupMetadata. * The source backup name contains the string \"test\". * The operation started before 2022-01-18T14:50:00Z. * The operation resulted in an error. * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.database:test_db)) OR` \\ `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test_bkp)) AND` \\ `(error:*)` - Returns operations where: * The operation's metadata matches either of criteria: * The operation's metadata type is CreateBackupMetadata AND the source database name of the backup contains the string \"test_db\" * The operation's metadata type is CopyBackupMetadata AND the source backup name contains the string \"test_bkp\" * The operation resulted in an error.", "location": "query", "type": "string" }, @@ -2402,7 +2402,7 @@ } } }, - "revision": "20221007", + "revision": "20221018", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 3e17b79d508..4f8c7633a99 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -9138,7 +9138,24 @@ func (r *ProjectsInstancesBackupOperationsService) List(parent string) *Projects // `(error:*)` - Returns operations where: * The operation's metadata // type is CreateBackupMetadata. * The backup name contains the string // "howl". * The operation started before 2018-03-28T14:50:00Z. * The -// operation resulted in an error. +// operation resulted in an error. * +// `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1. +// CopyBackupMetadata) AND` \ `(metadata.source_backup:test) AND` \ +// `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \ +// `(error:*)` - Returns operations where: * The operation's metadata +// type is CopyBackupMetadata. * The source backup name contains the +// string "test". * The operation started before 2022-01-18T14:50:00Z. * +// The operation resulted in an error. * +// `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1 +// .CreateBackupMetadata) AND` \ `(metadata.database:test_db)) OR` \ +// `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1 +// .CopyBackupMetadata) AND` \ `(metadata.source_backup:test_bkp)) AND` +// \ `(error:*)` - Returns operations where: * The operation's metadata +// matches either of criteria: * The operation's metadata type is +// CreateBackupMetadata AND the source database name of the backup +// contains the string "test_db" * The operation's metadata type is +// CopyBackupMetadata AND the source backup name contains the string +// "test_bkp" * The operation resulted in an error. func (c *ProjectsInstancesBackupOperationsListCall) Filter(filter string) *ProjectsInstancesBackupOperationsListCall { c.urlParams_.Set("filter", filter) return c @@ -9269,7 +9286,7 @@ func (c *ProjectsInstancesBackupOperationsListCall) Do(opts ...googleapi.CallOpt // ], // "parameters": { // "filter": { - // "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The source database name of backup contains the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", + // "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `\u003c`, `\u003e`, `\u003c=`, `\u003e=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The source database name of backup contains the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time \u003c \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test) AND` \\ `(metadata.progress.start_time \u003c \\\"2022-01-18T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CopyBackupMetadata. * The source backup name contains the string \"test\". * The operation started before 2022-01-18T14:50:00Z. * The operation resulted in an error. * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.database:test_db)) OR` \\ `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test_bkp)) AND` \\ `(error:*)` - Returns operations where: * The operation's metadata matches either of criteria: * The operation's metadata type is CreateBackupMetadata AND the source database name of the backup contains the string \"test_db\" * The operation's metadata type is CopyBackupMetadata AND the source backup name contains the string \"test_bkp\" * The operation resulted in an error.", // "location": "query", // "type": "string" // },