diff --git a/admin/directory/v1/admin-api.json b/admin/directory/v1/admin-api.json index 1ed090cc7ab..b5a9b5fd82a 100644 --- a/admin/directory/v1/admin-api.json +++ b/admin/directory/v1/admin-api.json @@ -4635,7 +4635,7 @@ } } }, - "revision": "20230516", + "revision": "20230724", "rootUrl": "https://admin.googleapis.com/", "schemas": { "Alias": { @@ -5405,6 +5405,29 @@ "description": "The unique ID of the Chrome device.", "type": "string" }, + "deviceLicenseType": { + "description": "Output only. Device license type.", + "enum": [ + "deviceLicenseTypeUnspecified", + "enterprise", + "enterpriseUpgrade", + "educationUpgrade", + "education", + "terminal", + "kioskUpgrade" + ], + "enumDescriptions": [ + "UNSPECIFIED type.", + "Indicating the device is a Chromebook/Chromebox/Chromebase enterprise, which is packaged with an upgrade(license).", + "Indicating the device is consuming standalone Chrome Enterprise Upgrade, a Chrome Enterprise license.", + "Indicating the device is consuming Chrome Education Upgrade(AKA Chrome EDU perpetual license).", + "Packaged with a license as education.", + "Packaged with a license as terminal.", + "Indicating the device is consuming standalone Chrome Kiosk Upgrade, a Chrome Kiosk (annual) license." + ], + "readOnly": true, + "type": "string" + }, "diskVolumeReports": { "description": "Reports of disk space and other info about mounted/connected volumes.", "items": { diff --git a/admin/directory/v1/admin-gen.go b/admin/directory/v1/admin-gen.go index 6fcef254ac7..dce6cb1e6cf 100644 --- a/admin/directory/v1/admin-gen.go +++ b/admin/directory/v1/admin-gen.go @@ -1591,6 +1591,23 @@ type ChromeOsDevice struct { // DeviceId: The unique ID of the Chrome device. DeviceId string `json:"deviceId,omitempty"` + // DeviceLicenseType: Output only. Device license type. + // + // Possible values: + // "deviceLicenseTypeUnspecified" - UNSPECIFIED type. + // "enterprise" - Indicating the device is a + // Chromebook/Chromebox/Chromebase enterprise, which is packaged with an + // upgrade(license). + // "enterpriseUpgrade" - Indicating the device is consuming standalone + // Chrome Enterprise Upgrade, a Chrome Enterprise license. + // "educationUpgrade" - Indicating the device is consuming Chrome + // Education Upgrade(AKA Chrome EDU perpetual license). + // "education" - Packaged with a license as education. + // "terminal" - Packaged with a license as terminal. + // "kioskUpgrade" - Indicating the device is consuming standalone + // Chrome Kiosk Upgrade, a Chrome Kiosk (annual) license. + DeviceLicenseType string `json:"deviceLicenseType,omitempty"` + // DiskVolumeReports: Reports of disk space and other info about // mounted/connected volumes. DiskVolumeReports []*ChromeOsDeviceDiskVolumeReports `json:"diskVolumeReports,omitempty"` diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index 66b989d1f59..a80a342c2a5 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -4322,7 +4322,7 @@ } } }, - "revision": "20230718", + "revision": "20230724", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -4870,8 +4870,8 @@ "enum": [ "ADS_WEB_CONVERSION_DATA_EXPORT_SCOPE_UNSPECIFIED", "NOT_SELECTED_YET", - "CROSS_CHANNEL", - "ADS_PREFERRED" + "PAID_AND_ORGANIC_CHANNELS", + "GOOGLE_PAID_CHANNELS" ], "enumDescriptions": [ "Default value. This value is unused.", @@ -4906,23 +4906,23 @@ "description": "Required. The reporting attribution model used to calculate conversion credit in this property's reports. Changing the attribution model will apply to both historical and future data. These changes will be reflected in reports with conversion and revenue data. User and session data will be unaffected.", "enum": [ "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED", - "CROSS_CHANNEL_DATA_DRIVEN", - "CROSS_CHANNEL_LAST_CLICK", - "CROSS_CHANNEL_FIRST_CLICK", - "CROSS_CHANNEL_LINEAR", - "CROSS_CHANNEL_POSITION_BASED", - "CROSS_CHANNEL_TIME_DECAY", - "ADS_PREFERRED_LAST_CLICK" + "PAID_AND_ORGANIC_CHANNELS_DATA_DRIVEN", + "PAID_AND_ORGANIC_CHANNELS_LAST_CLICK", + "PAID_AND_ORGANIC_CHANNELS_FIRST_CLICK", + "PAID_AND_ORGANIC_CHANNELS_LINEAR", + "PAID_AND_ORGANIC_CHANNELS_POSITION_BASED", + "PAID_AND_ORGANIC_CHANNELS_TIME_DECAY", + "GOOGLE_PAID_CHANNELS_LAST_CLICK" ], "enumDescriptions": [ "Reporting attribution model unspecified.", - "Data-driven attribution distributes credit for the conversion based on data for each conversion event. Each Data-driven model is specific to each advertiser and each conversion event.", - "Ignores direct traffic and attributes 100% of the conversion value to the last channel that the customer clicked through (or engaged view through for YouTube) before converting.", - "Starting in June 2023, new properties can no longer use this model. See [Analytics Help](https://support.google.com/analytics/answer/9164320#040623) for more details. Starting in September 2023, we will sunset this model for all properties. Gives all credit for the conversion to the first channel that a customer clicked (or engaged view through for YouTube) before converting.", - "Starting in June 2023, new properties can no longer use this model. See [Analytics Help](https://support.google.com/analytics/answer/9164320#040623) for more details. Starting in September 2023, we will sunset this model for all properties. Distributes the credit for the conversion equally across all the channels a customer clicked (or engaged view through for YouTube) before converting.", - "Starting in June 2023, new properties can no longer use this model. See [Analytics Help](https://support.google.com/analytics/answer/9164320#040623) for more details. Starting in September 2023, we will sunset this model for all properties. Attributes 40% credit to the first and last interaction, and the remaining 20% credit is distributed evenly to the middle interactions.", - "Starting in June 2023, new properties can no longer use this model. See [Analytics Help](https://support.google.com/analytics/answer/9164320#040623) for more details. Starting in September 2023, we will sunset this model for all properties. Gives more credit to the touchpoints that happened closer in time to the conversion.", - "Attributes 100% of the conversion value to the last Google Ads channel that the customer clicked through before converting." + "Data-driven attribution distributes credit for the conversion based on data for each conversion event. Each Data-driven model is specific to each advertiser and each conversion event. Previously CROSS_CHANNEL_DATA_DRIVEN", + "Ignores direct traffic and attributes 100% of the conversion value to the last channel that the customer clicked through (or engaged view through for YouTube) before converting. Previously CROSS_CHANNEL_LAST_CLICK", + "Starting in June 2023, new properties can no longer use this model. See [Analytics Help](https://support.google.com/analytics/answer/9164320#040623) for more details. Starting in September 2023, we will sunset this model for all properties. Gives all credit for the conversion to the first channel that a customer clicked (or engaged view through for YouTube) before converting. Previously CROSS_CHANNEL_FIRST_CLICK", + "Starting in June 2023, new properties can no longer use this model. See [Analytics Help](https://support.google.com/analytics/answer/9164320#040623) for more details. Starting in September 2023, we will sunset this model for all properties. Distributes the credit for the conversion equally across all the channels a customer clicked (or engaged view through for YouTube) before converting. Previously CROSS_CHANNEL_LINEAR", + "Starting in June 2023, new properties can no longer use this model. See [Analytics Help](https://support.google.com/analytics/answer/9164320#040623) for more details. Starting in September 2023, we will sunset this model for all properties. Attributes 40% credit to the first and last interaction, and the remaining 20% credit is distributed evenly to the middle interactions. Previously CROSS_CHANNEL_POSITION_BASED", + "Starting in June 2023, new properties can no longer use this model. See [Analytics Help](https://support.google.com/analytics/answer/9164320#040623) for more details. Starting in September 2023, we will sunset this model for all properties. Gives more credit to the touchpoints that happened closer in time to the conversion. Previously CROSS_CHANNEL_TIME_DECAY", + "Attributes 100% of the conversion value to the last Google Paid channel that the customer clicked through before converting. Previously ADS_PREFERRED_LAST_CLICK" ], "type": "string" } diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 24498c0003f..2fe243dbf3f 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -1457,13 +1457,13 @@ type GoogleAnalyticsAdminV1alphaAttributionSettings struct { // This value is unused. // "NOT_SELECTED_YET" - No data export scope selected yet. Export // scope can never be changed back to this value. - // "CROSS_CHANNEL" - Paid and organic channels are eligible to receive - // conversion credit, but only credit assigned to Google Ads channels - // will appear in your Ads accounts. To learn more, see [Paid and - // Organic + // "PAID_AND_ORGANIC_CHANNELS" - Paid and organic channels are + // eligible to receive conversion credit, but only credit assigned to + // Google Ads channels will appear in your Ads accounts. To learn more, + // see [Paid and Organic // channels](https://support.google.com/analytics/answer/10632359). - // "ADS_PREFERRED" - Only Google Ads paid channels are eligible to - // receive conversion credit. To learn more, see [Google Paid + // "GOOGLE_PAID_CHANNELS" - Only Google Ads paid channels are eligible + // to receive conversion credit. To learn more, see [Google Paid // channels](https://support.google.com/analytics/answer/10632359). AdsWebConversionDataExportScope string `json:"adsWebConversionDataExportScope,omitempty"` @@ -1497,44 +1497,47 @@ type GoogleAnalyticsAdminV1alphaAttributionSettings struct { // Possible values: // "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED" - Reporting attribution // model unspecified. - // "CROSS_CHANNEL_DATA_DRIVEN" - Data-driven attribution distributes - // credit for the conversion based on data for each conversion event. - // Each Data-driven model is specific to each advertiser and each - // conversion event. - // "CROSS_CHANNEL_LAST_CLICK" - Ignores direct traffic and attributes - // 100% of the conversion value to the last channel that the customer - // clicked through (or engaged view through for YouTube) before - // converting. - // "CROSS_CHANNEL_FIRST_CLICK" - Starting in June 2023, new properties - // can no longer use this model. See [Analytics + // "PAID_AND_ORGANIC_CHANNELS_DATA_DRIVEN" - Data-driven attribution + // distributes credit for the conversion based on data for each + // conversion event. Each Data-driven model is specific to each + // advertiser and each conversion event. Previously + // CROSS_CHANNEL_DATA_DRIVEN + // "PAID_AND_ORGANIC_CHANNELS_LAST_CLICK" - Ignores direct traffic and + // attributes 100% of the conversion value to the last channel that the + // customer clicked through (or engaged view through for YouTube) before + // converting. Previously CROSS_CHANNEL_LAST_CLICK + // "PAID_AND_ORGANIC_CHANNELS_FIRST_CLICK" - Starting in June 2023, + // new properties can no longer use this model. See [Analytics // Help](https://support.google.com/analytics/answer/9164320#040623) for // more details. Starting in September 2023, we will sunset this model // for all properties. Gives all credit for the conversion to the first // channel that a customer clicked (or engaged view through for YouTube) - // before converting. - // "CROSS_CHANNEL_LINEAR" - Starting in June 2023, new properties can - // no longer use this model. See [Analytics + // before converting. Previously CROSS_CHANNEL_FIRST_CLICK + // "PAID_AND_ORGANIC_CHANNELS_LINEAR" - Starting in June 2023, new + // properties can no longer use this model. See [Analytics // Help](https://support.google.com/analytics/answer/9164320#040623) for // more details. Starting in September 2023, we will sunset this model // for all properties. Distributes the credit for the conversion equally // across all the channels a customer clicked (or engaged view through - // for YouTube) before converting. - // "CROSS_CHANNEL_POSITION_BASED" - Starting in June 2023, new - // properties can no longer use this model. See [Analytics + // for YouTube) before converting. Previously CROSS_CHANNEL_LINEAR + // "PAID_AND_ORGANIC_CHANNELS_POSITION_BASED" - Starting in June 2023, + // new properties can no longer use this model. See [Analytics // Help](https://support.google.com/analytics/answer/9164320#040623) for // more details. Starting in September 2023, we will sunset this model // for all properties. Attributes 40% credit to the first and last // interaction, and the remaining 20% credit is distributed evenly to - // the middle interactions. - // "CROSS_CHANNEL_TIME_DECAY" - Starting in June 2023, new properties - // can no longer use this model. See [Analytics + // the middle interactions. Previously CROSS_CHANNEL_POSITION_BASED + // "PAID_AND_ORGANIC_CHANNELS_TIME_DECAY" - Starting in June 2023, new + // properties can no longer use this model. See [Analytics // Help](https://support.google.com/analytics/answer/9164320#040623) for // more details. Starting in September 2023, we will sunset this model // for all properties. Gives more credit to the touchpoints that - // happened closer in time to the conversion. - // "ADS_PREFERRED_LAST_CLICK" - Attributes 100% of the conversion - // value to the last Google Ads channel that the customer clicked - // through before converting. + // happened closer in time to the conversion. Previously + // CROSS_CHANNEL_TIME_DECAY + // "GOOGLE_PAID_CHANNELS_LAST_CLICK" - Attributes 100% of the + // conversion value to the last Google Paid channel that the customer + // clicked through before converting. Previously + // ADS_PREFERRED_LAST_CLICK ReportingAttributionModel string `json:"reportingAttributionModel,omitempty"` // ServerResponse contains the HTTP response code and headers from the diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index a361f6cfb14..ecbae4bb59b 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1095,7 +1095,7 @@ } } }, - "revision": "20230705", + "revision": "20230717", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -2593,6 +2593,20 @@ "description": "Controls for device radio settings.", "id": "DeviceRadioState", "properties": { + "airplaneModeState": { + "description": "Controls whether airplane mode can be toggled by the user or not", + "enum": [ + "AIRPLANE_MODE_STATE_UNSPECIFIED", + "AIRPLANE_MODE_USER_CHOICE", + "AIRPLANE_MODE_DISABLED" + ], + "enumDescriptions": [ + "Unspecified. Defaults to AIRPLANE_MODE_USER_CHOICE", + "The user is allowed to toggle airplane mode on or off.", + "Airplane mode is disabled. The user is not allowed to toggle airplane mode on. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 9." + ], + "type": "string" + }, "wifiState": { "description": "Controls current state of Wi-Fi and if user can change its state.", "enum": [ diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 7bd963178e8..070177f0c9e 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -2329,6 +2329,19 @@ func (s *DeviceConnectivityManagement) MarshalJSON() ([]byte, error) { // DeviceRadioState: Controls for device radio settings. type DeviceRadioState struct { + // AirplaneModeState: Controls whether airplane mode can be toggled by + // the user or not + // + // Possible values: + // "AIRPLANE_MODE_STATE_UNSPECIFIED" - Unspecified. Defaults to + // AIRPLANE_MODE_USER_CHOICE + // "AIRPLANE_MODE_USER_CHOICE" - The user is allowed to toggle + // airplane mode on or off. + // "AIRPLANE_MODE_DISABLED" - Airplane mode is disabled. The user is + // not allowed to toggle airplane mode on. A nonComplianceDetail with + // API_LEVEL is reported if the Android version is less than 9. + AirplaneModeState string `json:"airplaneModeState,omitempty"` + // WifiState: Controls current state of Wi-Fi and if user can change its // state. // @@ -2344,20 +2357,21 @@ type DeviceRadioState struct { // Android version is less than 13. WifiState string `json:"wifiState,omitempty"` - // ForceSendFields is a list of field names (e.g. "WifiState") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AirplaneModeState") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WifiState") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "AirplaneModeState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if 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/api-list.json b/api-list.json index a965665d97a..f5ed9037ec0 100644 --- a/api-list.json +++ b/api-list.json @@ -1138,7 +1138,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": "https://cloud.google.com/billing/", + "documentationLink": "https://cloud.google.com/billing/docs/apis", "preferred": false }, { @@ -1153,7 +1153,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": "https://cloud.google.com/billing/", + "documentationLink": "https://cloud.google.com/billing/docs/apis", "preferred": true }, { diff --git a/bigqueryreservation/v1/bigqueryreservation-api.json b/bigqueryreservation/v1/bigqueryreservation-api.json index fc7b8155e3d..30d8c84d600 100644 --- a/bigqueryreservation/v1/bigqueryreservation-api.json +++ b/bigqueryreservation/v1/bigqueryreservation-api.json @@ -824,7 +824,7 @@ } } }, - "revision": "20230701", + "revision": "20230720", "rootUrl": "https://bigqueryreservation.googleapis.com/", "schemas": { "Assignment": { @@ -1216,7 +1216,7 @@ "type": "string" }, "slotCapacity": { - "description": "Baseline slots available to this reservation. A slot is a unit of computational power in BigQuery, and serves as the unit of parallelism. Queries using this reservation might use more slots during runtime if ignore_idle_slots is set to false, or autoscaling is enabled. If edition is EDITION_UNSPECIFIED and total slot_capacity of the reservation and its siblings exceeds the total slot_count of all capacity commitments, the request will fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. If edition is any value but EDITION_UNSPECIFIED, then the above requirement is not needed. The total slot_capacity of the reservation and its siblings may exceed the total slot_count of capacity commitments. In that case, the exceeding slots will be charged with the autoscale SKU. You can increase the number of baseline slots in a reservation every few minutes. If you want to decrease your baseline slots, you are limited to once an hour if you have recently changed your baseline slot capacity and your baseline slots exceed your committed slots. Otherwise, you can decrease your baseline slots every few minutes. NOTE: for reservations in US or EU multi-regions, slot capacity constraints are checked separately for default and auxiliary regions. See multi_region_auxiliary flag for more details.", + "description": "Baseline slots available to this reservation. A slot is a unit of computational power in BigQuery, and serves as the unit of parallelism. Queries using this reservation might use more slots during runtime if ignore_idle_slots is set to false, or autoscaling is enabled. If edition is EDITION_UNSPECIFIED and total slot_capacity of the reservation and its siblings exceeds the total slot_count of all capacity commitments, the request will fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. If edition is any value but EDITION_UNSPECIFIED, then the above requirement is not needed. The total slot_capacity of the reservation and its siblings may exceed the total slot_count of capacity commitments. In that case, the exceeding slots will be charged with the autoscale SKU. You can increase the number of baseline slots in a reservation every few minutes. If you want to decrease your baseline slots, you are limited to once an hour if you have recently changed your baseline slot capacity and your baseline slots exceed your committed slots. Otherwise, you can decrease your baseline slots every few minutes.", "format": "int64", "type": "string" }, diff --git a/bigqueryreservation/v1/bigqueryreservation-gen.go b/bigqueryreservation/v1/bigqueryreservation-gen.go index fe5b384803d..a83f38f0c8a 100644 --- a/bigqueryreservation/v1/bigqueryreservation-gen.go +++ b/bigqueryreservation/v1/bigqueryreservation-gen.go @@ -784,9 +784,6 @@ type Reservation struct { // to once an hour if you have recently changed your baseline slot // capacity and your baseline slots exceed your committed slots. // Otherwise, you can decrease your baseline slots every few minutes. - // NOTE: for reservations in US or EU multi-regions, slot capacity - // constraints are checked separately for default and auxiliary regions. - // See multi_region_auxiliary flag for more details. SlotCapacity int64 `json:"slotCapacity,omitempty,string"` // UpdateTime: Output only. Last update time of the reservation. diff --git a/cloudsupport/v2/cloudsupport-api.json b/cloudsupport/v2/cloudsupport-api.json index 53d9cd91b8a..2e378c02f81 100644 --- a/cloudsupport/v2/cloudsupport-api.json +++ b/cloudsupport/v2/cloudsupport-api.json @@ -108,7 +108,7 @@ "caseClassifications": { "methods": { "search": { - "description": "Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `\" \u003e \"`. For example `\"Technical Issue \u003e Compute \u003e Compute Engine\"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least 6 months. If a given classification is deactiveated, it will immediately stop being returned. After 6 months, `case.create` requests using the classification ID will fail.", + "description": "Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `\" \u003e \"`. For example `\"Technical Issue \u003e Compute \u003e Compute Engine\"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least six months. If a given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an example of calling this endpoint using cURL: ```shell curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:\"*Compute%20Engine*\"' ```", "flatPath": "v2/caseClassifications:search", "httpMethod": "GET", "id": "cloudsupport.caseClassifications.search", @@ -144,7 +144,7 @@ "cases": { "methods": { "close": { - "description": "Close the specified case.", + "description": "Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/cloud-support-qa-premium/cases/43595344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case:close\" ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}:close", "httpMethod": "POST", "id": "cloudsupport.cases.close", @@ -172,7 +172,7 @@ ] }, "create": { - "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`.", + "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases", "httpMethod": "POST", "id": "cloudsupport.cases.create", @@ -200,7 +200,7 @@ ] }, "escalate": { - "description": "Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.", + "description": "Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header \"Content-Type: application/json\" \\ --data '{ \"escalation\": { \"reason\": \"BUSINESS_IMPACT\", \"justification\": \"This is a test escalation.\" } }' \\ \"https://cloudsupport.googleapis.com/v2/$case:escalate\" ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}:escalate", "httpMethod": "POST", "id": "cloudsupport.cases.escalate", @@ -228,7 +228,7 @@ ] }, "get": { - "description": "Retrieve the specified case.", + "description": "Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/16033687\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case\" ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}", "httpMethod": "GET", "id": "cloudsupport.cases.get", @@ -253,7 +253,7 @@ ] }, "list": { - "description": "Retrieve all cases under the specified parent. Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`.", + "description": "Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases", "httpMethod": "GET", "id": "cloudsupport.cases.list", @@ -294,7 +294,7 @@ ] }, "patch": { - "description": "Update the specified case. Only a subset of fields can be updated.", + "description": "Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --request PATCH \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header \"Content-Type: application/json\" \\ --data '{ \"priority\": \"P1\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case?updateMask=priority\" ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}", "httpMethod": "PATCH", "id": "cloudsupport.cases.patch", @@ -328,7 +328,7 @@ ] }, "search": { - "description": "Search cases using the specified query.", + "description": "Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases:search\" ```", "flatPath": "v2/{v2Id}/{v2Id1}/cases:search", "httpMethod": "GET", "id": "cloudsupport.cases.search", @@ -552,7 +552,7 @@ } } }, - "revision": "20230704", + "revision": "20230724", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { diff --git a/cloudsupport/v2/cloudsupport-gen.go b/cloudsupport/v2/cloudsupport-gen.go index 4d3ec564ac1..3cd8e9aa945 100644 --- a/cloudsupport/v2/cloudsupport-gen.go +++ b/cloudsupport/v2/cloudsupport-gen.go @@ -1419,10 +1419,14 @@ type CaseClassificationsSearchCall struct { // classification containing all levels of the hierarchy, separated by // " > ". For example "Technical Issue > Compute > Compute Engine". // Classification IDs returned by `caseClassifications.search` are -// guaranteed to be valid for at least 6 months. If a given -// classification is deactiveated, it will immediately stop being -// returned. After 6 months, `case.create` requests using the -// classification ID will fail. +// guaranteed to be valid for at least six months. If a given +// classification is deactivated, it immediately stops being returned. +// After six months, `case.create` requests using the classification ID +// will fail. Here is an example of calling this endpoint using cURL: +// ```shell curl \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ +// 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?que +// ry=display_name:"*Compute%20Engine*"' ``` func (r *CaseClassificationsService) Search() *CaseClassificationsSearchCall { c := &CaseClassificationsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -1549,7 +1553,7 @@ func (c *CaseClassificationsSearchCall) Do(opts ...googleapi.CallOption) (*Searc } return ret, nil // { - // "description": "Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `\" \u003e \"`. For example `\"Technical Issue \u003e Compute \u003e Compute Engine\"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least 6 months. If a given classification is deactiveated, it will immediately stop being returned. After 6 months, `case.create` requests using the classification ID will fail.", + // "description": "Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `\" \u003e \"`. For example `\"Technical Issue \u003e Compute \u003e Compute Engine\"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least six months. If a given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an example of calling this endpoint using cURL: ```shell curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:\"*Compute%20Engine*\"' ```", // "flatPath": "v2/caseClassifications:search", // "httpMethod": "GET", // "id": "cloudsupport.caseClassifications.search", @@ -1615,7 +1619,12 @@ type CasesCloseCall struct { header_ http.Header } -// Close: Close the specified case. +// Close: Close the specified case. Here is an example of calling this +// endpoint using cURL: ```shell +// case="projects/cloud-support-qa-premium/cases/43595344" curl \ +// --request POST \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$case:close" ``` // // - name: The fully qualified name of the case resource to be closed. func (r *CasesService) Close(name string, closecaserequest *CloseCaseRequest) *CasesCloseCall { @@ -1716,7 +1725,7 @@ func (c *CasesCloseCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Close the specified case.", + // "description": "Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/cloud-support-qa-premium/cases/43595344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case:close\" ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}:close", // "httpMethod": "POST", // "id": "cloudsupport.cases.close", @@ -1759,7 +1768,18 @@ type CasesCreateCall struct { // Create: Create a new case and associate it with the given Google // Cloud Resource. The case object must have the following fields set: -// `display_name`, `description`, `classification`, and `priority`. +// `display_name`, `description`, `classification`, and `priority`. Here +// is an example of calling this endpoint using cURL: ```shell +// parent="projects/some-project" curl \ --request POST \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ --header +// 'Content-Type: application/json' \ --data '{ "display_name": "Test +// case created by me.", "description": "a random test case, feel free +// to close", "classification": { "id": +// "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2 +// TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": +// "-07:00", "subscriber_email_addresses": [ "foo@domain.com", +// "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ +// "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` // // - parent: The name of the Google Cloud Resource under which the case // should be created. @@ -1861,7 +1881,7 @@ func (c *CasesCreateCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`.", + // "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases", // "httpMethod": "POST", // "id": "cloudsupport.cases.create", @@ -1902,12 +1922,19 @@ type CasesEscalateCall struct { header_ http.Header } -// Escalate: Escalate a case. Escalating a case will initiate the Google +// Escalate: Escalate a case. Escalating a case initiates the Google // Cloud Support escalation management process. This operation is only -// available to certain Customer Care tiers. Go to +// available to certain Customer Care support services. Go to // https://cloud.google.com/support and look for 'Technical support -// escalations' in the feature list to find out which tiers are able to -// perform escalations. +// escalations' in the feature list to find out which support services +// let you perform escalations. Here is an example of calling this +// endpoint using cURL: ```shell +// case="projects/some-project/cases/43595344" curl \ --request POST \ +// --header "Authorization: Bearer $(gcloud auth print-access-token)" \ +// --header "Content-Type: application/json" \ --data '{ "escalation": { +// "reason": "BUSINESS_IMPACT", "justification": "This is a test +// escalation." } }' \ +// "https://cloudsupport.googleapis.com/v2/$case:escalate" ``` // // - name: The fully qualified name of the Case resource to be // escalated. @@ -2009,7 +2036,7 @@ func (c *CasesEscalateCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.", + // "description": "Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header \"Content-Type: application/json\" \\ --data '{ \"escalation\": { \"reason\": \"BUSINESS_IMPACT\", \"justification\": \"This is a test escalation.\" } }' \\ \"https://cloudsupport.googleapis.com/v2/$case:escalate\" ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}:escalate", // "httpMethod": "POST", // "id": "cloudsupport.cases.escalate", @@ -2050,7 +2077,11 @@ type CasesGetCall struct { header_ http.Header } -// Get: Retrieve the specified case. +// Get: Retrieve the specified case. Here is an example of calling this +// endpoint using cURL: ```shell +// case="projects/some-project/cases/16033687" curl \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$case" ``` // // - name: The fully qualified name of a case to be retrieved. func (r *CasesService) Get(name string) *CasesGetCall { @@ -2158,7 +2189,7 @@ func (c *CasesGetCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Retrieve the specified case.", + // "description": "Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/16033687\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case\" ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}", // "httpMethod": "GET", // "id": "cloudsupport.cases.get", @@ -2197,10 +2228,13 @@ type CasesListCall struct { } // List: Retrieve all cases under the specified parent. Note: Listing -// cases under an Organization returns only the cases directly parented +// cases under an organization returns only the cases directly parented // by that organization. To retrieve all cases under an organization, // including cases parented by projects under that organization, use -// `cases.search`. +// `cases.search`. Here is an example of calling this endpoint using +// cURL: ```shell parent="projects/some-project" curl \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` // // - parent: The fully qualified name of parent resource to list cases // under. @@ -2340,7 +2374,7 @@ func (c *CasesListCall) Do(opts ...googleapi.CallOption) (*ListCasesResponse, er } return ret, nil // { - // "description": "Retrieve all cases under the specified parent. Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`.", + // "description": "Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases", // "httpMethod": "GET", // "id": "cloudsupport.cases.list", @@ -2416,7 +2450,13 @@ type CasesPatchCall struct { } // Patch: Update the specified case. Only a subset of fields can be -// updated. +// updated. Here is an example of calling this endpoint using cURL: +// ```shell case="projects/some-project/cases/43595344" curl \ --request +// PATCH \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ --header "Content-Type: application/json" \ +// --data '{ "priority": "P1" }' \ +// "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" +// ``` // // - name: The resource name for the case. func (r *CasesService) Patch(name string, case_ *Case) *CasesPatchCall { @@ -2531,7 +2571,7 @@ func (c *CasesPatchCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Update the specified case. Only a subset of fields can be updated.", + // "description": "Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --request PATCH \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header \"Content-Type: application/json\" \\ --data '{ \"priority\": \"P1\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case?updateMask=priority\" ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases/{casesId}", // "httpMethod": "PATCH", // "id": "cloudsupport.cases.patch", @@ -2578,7 +2618,11 @@ type CasesSearchCall struct { header_ http.Header } -// Search: Search cases using the specified query. +// Search: Search cases using the specified query. Here is an example of +// calling this endpoint using cURL: ```shell +// parent="projects/some-project" curl \ --header "Authorization: Bearer +// $(gcloud auth print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ``` // // - parent: The fully qualified name of parent resource to search cases // under. @@ -2731,7 +2775,7 @@ func (c *CasesSearchCall) Do(opts ...googleapi.CallOption) (*SearchCasesResponse } return ret, nil // { - // "description": "Search cases using the specified query.", + // "description": "Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases:search\" ```", // "flatPath": "v2/{v2Id}/{v2Id1}/cases:search", // "httpMethod": "GET", // "id": "cloudsupport.cases.search", diff --git a/cloudsupport/v2beta/cloudsupport-api.json b/cloudsupport/v2beta/cloudsupport-api.json index 7a491d86ba1..5980a8cf378 100644 --- a/cloudsupport/v2beta/cloudsupport-api.json +++ b/cloudsupport/v2beta/cloudsupport-api.json @@ -108,7 +108,7 @@ "caseClassifications": { "methods": { "search": { - "description": "Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `\" \u003e \"`. For example `\"Technical Issue \u003e Compute \u003e Compute Engine\"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least 6 months. If a given classification is deactiveated, it will immediately stop being returned. After 6 months, `case.create` requests using the classification ID will fail.", + "description": "Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `\" \u003e \"`. For example `\"Technical Issue \u003e Compute \u003e Compute Engine\"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least six months. If a given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an example of calling this endpoint using cURL: ```shell curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:\"*Compute%20Engine*\"' ```", "flatPath": "v2beta/caseClassifications:search", "httpMethod": "GET", "id": "cloudsupport.caseClassifications.search", @@ -144,7 +144,7 @@ "cases": { "methods": { "close": { - "description": "Close the specified case.", + "description": "Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/cloud-support-qa-premium/cases/43595344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case:close\" ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}:close", "httpMethod": "POST", "id": "cloudsupport.cases.close", @@ -172,7 +172,7 @@ ] }, "create": { - "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`.", + "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases", "httpMethod": "POST", "id": "cloudsupport.cases.create", @@ -200,7 +200,7 @@ ] }, "escalate": { - "description": "Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.", + "description": "Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header \"Content-Type: application/json\" \\ --data '{ \"escalation\": { \"reason\": \"BUSINESS_IMPACT\", \"justification\": \"This is a test escalation.\" } }' \\ \"https://cloudsupport.googleapis.com/v2/$case:escalate\" ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}:escalate", "httpMethod": "POST", "id": "cloudsupport.cases.escalate", @@ -228,7 +228,7 @@ ] }, "get": { - "description": "Retrieve the specified case.", + "description": "Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/16033687\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case\" ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}", "httpMethod": "GET", "id": "cloudsupport.cases.get", @@ -253,7 +253,7 @@ ] }, "list": { - "description": "Retrieve all cases under the specified parent. Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`.", + "description": "Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases", "httpMethod": "GET", "id": "cloudsupport.cases.list", @@ -294,7 +294,7 @@ ] }, "patch": { - "description": "Update the specified case. Only a subset of fields can be updated.", + "description": "Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --request PATCH \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header \"Content-Type: application/json\" \\ --data '{ \"priority\": \"P1\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case?updateMask=priority\" ```", "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}", "httpMethod": "PATCH", "id": "cloudsupport.cases.patch", @@ -328,7 +328,7 @@ ] }, "search": { - "description": "Search cases using the specified query.", + "description": "Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases:search\" ```", "flatPath": "v2beta/cases:search", "httpMethod": "GET", "id": "cloudsupport.cases.search", @@ -548,7 +548,7 @@ } } }, - "revision": "20230704", + "revision": "20230724", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { diff --git a/cloudsupport/v2beta/cloudsupport-gen.go b/cloudsupport/v2beta/cloudsupport-gen.go index 3215d735c31..b47a2c534df 100644 --- a/cloudsupport/v2beta/cloudsupport-gen.go +++ b/cloudsupport/v2beta/cloudsupport-gen.go @@ -1436,10 +1436,14 @@ type CaseClassificationsSearchCall struct { // classification containing all levels of the hierarchy, separated by // " > ". For example "Technical Issue > Compute > Compute Engine". // Classification IDs returned by `caseClassifications.search` are -// guaranteed to be valid for at least 6 months. If a given -// classification is deactiveated, it will immediately stop being -// returned. After 6 months, `case.create` requests using the -// classification ID will fail. +// guaranteed to be valid for at least six months. If a given +// classification is deactivated, it immediately stops being returned. +// After six months, `case.create` requests using the classification ID +// will fail. Here is an example of calling this endpoint using cURL: +// ```shell curl \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ +// 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?que +// ry=display_name:"*Compute%20Engine*"' ``` func (r *CaseClassificationsService) Search() *CaseClassificationsSearchCall { c := &CaseClassificationsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -1566,7 +1570,7 @@ func (c *CaseClassificationsSearchCall) Do(opts ...googleapi.CallOption) (*Searc } return ret, nil // { - // "description": "Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `\" \u003e \"`. For example `\"Technical Issue \u003e Compute \u003e Compute Engine\"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least 6 months. If a given classification is deactiveated, it will immediately stop being returned. After 6 months, `case.create` requests using the classification ID will fail.", + // "description": "Retrieve valid classifications to be used when creating a support case. The classications are hierarchical, with each classification containing all levels of the hierarchy, separated by `\" \u003e \"`. For example `\"Technical Issue \u003e Compute \u003e Compute Engine\"`. Classification IDs returned by `caseClassifications.search` are guaranteed to be valid for at least six months. If a given classification is deactivated, it immediately stops being returned. After six months, `case.create` requests using the classification ID will fail. Here is an example of calling this endpoint using cURL: ```shell curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ 'https://cloudsupport.googleapis.com/v2/caseClassifications:search?query=display_name:\"*Compute%20Engine*\"' ```", // "flatPath": "v2beta/caseClassifications:search", // "httpMethod": "GET", // "id": "cloudsupport.caseClassifications.search", @@ -1632,7 +1636,12 @@ type CasesCloseCall struct { header_ http.Header } -// Close: Close the specified case. +// Close: Close the specified case. Here is an example of calling this +// endpoint using cURL: ```shell +// case="projects/cloud-support-qa-premium/cases/43595344" curl \ +// --request POST \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$case:close" ``` // // - name: The fully qualified name of the case resource to be closed. func (r *CasesService) Close(name string, closecaserequest *CloseCaseRequest) *CasesCloseCall { @@ -1733,7 +1742,7 @@ func (c *CasesCloseCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Close the specified case.", + // "description": "Close the specified case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/cloud-support-qa-premium/cases/43595344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case:close\" ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}:close", // "httpMethod": "POST", // "id": "cloudsupport.cases.close", @@ -1776,7 +1785,18 @@ type CasesCreateCall struct { // Create: Create a new case and associate it with the given Google // Cloud Resource. The case object must have the following fields set: -// `display_name`, `description`, `classification`, and `priority`. +// `display_name`, `description`, `classification`, and `priority`. Here +// is an example of calling this endpoint using cURL: ```shell +// parent="projects/some-project" curl \ --request POST \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ --header +// 'Content-Type: application/json' \ --data '{ "display_name": "Test +// case created by me.", "description": "a random test case, feel free +// to close", "classification": { "id": +// "100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2 +// TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8" }, "time_zone": +// "-07:00", "subscriber_email_addresses": [ "foo@domain.com", +// "bar@domain.com" ], "testCase": true, "priority": "P3" }' \ +// "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` // // - parent: The name of the Google Cloud Resource under which the case // should be created. @@ -1878,7 +1898,7 @@ func (c *CasesCreateCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`.", + // "description": "Create a new case and associate it with the given Google Cloud Resource. The case object must have the following fields set: `display_name`, `description`, `classification`, and `priority`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header 'Content-Type: application/json' \\ --data '{ \"display_name\": \"Test case created by me.\", \"description\": \"a random test case, feel free to close\", \"classification\": { \"id\": \"100IK2AKCLHMGRJ9CDGMOCGP8DM6UTB4BT262T31BT1M2T31DHNMENPO6KS36CPJ786L2TBFEHGN6NPI64R3CDHN8880G08I1H3MURR7DHII0GRCDTQM8\" }, \"time_zone\": \"-07:00\", \"subscriber_email_addresses\": [ \"foo@domain.com\", \"bar@domain.com\" ], \"testCase\": true, \"priority\": \"P3\" }' \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases", // "httpMethod": "POST", // "id": "cloudsupport.cases.create", @@ -1919,12 +1939,19 @@ type CasesEscalateCall struct { header_ http.Header } -// Escalate: Escalate a case. Escalating a case will initiate the Google +// Escalate: Escalate a case. Escalating a case initiates the Google // Cloud Support escalation management process. This operation is only -// available to certain Customer Care tiers. Go to +// available to certain Customer Care support services. Go to // https://cloud.google.com/support and look for 'Technical support -// escalations' in the feature list to find out which tiers are able to -// perform escalations. +// escalations' in the feature list to find out which support services +// let you perform escalations. Here is an example of calling this +// endpoint using cURL: ```shell +// case="projects/some-project/cases/43595344" curl \ --request POST \ +// --header "Authorization: Bearer $(gcloud auth print-access-token)" \ +// --header "Content-Type: application/json" \ --data '{ "escalation": { +// "reason": "BUSINESS_IMPACT", "justification": "This is a test +// escalation." } }' \ +// "https://cloudsupport.googleapis.com/v2/$case:escalate" ``` // // - name: The fully qualified name of the Case resource to be // escalated. @@ -2026,7 +2053,7 @@ func (c *CasesEscalateCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Escalate a case. Escalating a case will initiate the Google Cloud Support escalation management process. This operation is only available to certain Customer Care tiers. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which tiers are able to perform escalations.", + // "description": "Escalate a case. Escalating a case initiates the Google Cloud Support escalation management process. This operation is only available to certain Customer Care support services. Go to https://cloud.google.com/support and look for 'Technical support escalations' in the feature list to find out which support services let you perform escalations. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --request POST \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header \"Content-Type: application/json\" \\ --data '{ \"escalation\": { \"reason\": \"BUSINESS_IMPACT\", \"justification\": \"This is a test escalation.\" } }' \\ \"https://cloudsupport.googleapis.com/v2/$case:escalate\" ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}:escalate", // "httpMethod": "POST", // "id": "cloudsupport.cases.escalate", @@ -2067,7 +2094,11 @@ type CasesGetCall struct { header_ http.Header } -// Get: Retrieve the specified case. +// Get: Retrieve the specified case. Here is an example of calling this +// endpoint using cURL: ```shell +// case="projects/some-project/cases/16033687" curl \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$case" ``` // // - name: The fully qualified name of a case to be retrieved. func (r *CasesService) Get(name string) *CasesGetCall { @@ -2175,7 +2206,7 @@ func (c *CasesGetCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Retrieve the specified case.", + // "description": "Retrieve the specified case. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/16033687\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$case\" ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}", // "httpMethod": "GET", // "id": "cloudsupport.cases.get", @@ -2214,10 +2245,13 @@ type CasesListCall struct { } // List: Retrieve all cases under the specified parent. Note: Listing -// cases under an Organization returns only the cases directly parented +// cases under an organization returns only the cases directly parented // by that organization. To retrieve all cases under an organization, // including cases parented by projects under that organization, use -// `cases.search`. +// `cases.search`. Here is an example of calling this endpoint using +// cURL: ```shell parent="projects/some-project" curl \ --header +// "Authorization: Bearer $(gcloud auth print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$parent/cases" ``` // // - parent: The fully qualified name of parent resource to list cases // under. @@ -2357,7 +2391,7 @@ func (c *CasesListCall) Do(opts ...googleapi.CallOption) (*ListCasesResponse, er } return ret, nil // { - // "description": "Retrieve all cases under the specified parent. Note: Listing cases under an Organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`.", + // "description": "Retrieve all cases under the specified parent. Note: Listing cases under an organization returns only the cases directly parented by that organization. To retrieve all cases under an organization, including cases parented by projects under that organization, use `cases.search`. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases\" ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases", // "httpMethod": "GET", // "id": "cloudsupport.cases.list", @@ -2433,7 +2467,13 @@ type CasesPatchCall struct { } // Patch: Update the specified case. Only a subset of fields can be -// updated. +// updated. Here is an example of calling this endpoint using cURL: +// ```shell case="projects/some-project/cases/43595344" curl \ --request +// PATCH \ --header "Authorization: Bearer $(gcloud auth +// print-access-token)" \ --header "Content-Type: application/json" \ +// --data '{ "priority": "P1" }' \ +// "https://cloudsupport.googleapis.com/v2/$case?updateMask=priority" +// ``` // // - name: The resource name for the case. func (r *CasesService) Patch(name string, case_ *Case) *CasesPatchCall { @@ -2548,7 +2588,7 @@ func (c *CasesPatchCall) Do(opts ...googleapi.CallOption) (*Case, error) { } return ret, nil // { - // "description": "Update the specified case. Only a subset of fields can be updated.", + // "description": "Update the specified case. Only a subset of fields can be updated. Here is an example of calling this endpoint using cURL: ```shell case=\"projects/some-project/cases/43595344\" curl \\ --request PATCH \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ --header \"Content-Type: application/json\" \\ --data '{ \"priority\": \"P1\" }' \\ \"https://cloudsupport.googleapis.com/v2/$case?updateMask=priority\" ```", // "flatPath": "v2beta/{v2betaId}/{v2betaId1}/cases/{casesId}", // "httpMethod": "PATCH", // "id": "cloudsupport.cases.patch", @@ -2594,7 +2634,11 @@ type CasesSearchCall struct { header_ http.Header } -// Search: Search cases using the specified query. +// Search: Search cases using the specified query. Here is an example of +// calling this endpoint using cURL: ```shell +// parent="projects/some-project" curl \ --header "Authorization: Bearer +// $(gcloud auth print-access-token)" \ +// "https://cloudsupport.googleapis.com/v2/$parent/cases:search" ``` func (r *CasesService) Search() *CasesSearchCall { c := &CasesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} return c @@ -2747,7 +2791,7 @@ func (c *CasesSearchCall) Do(opts ...googleapi.CallOption) (*SearchCasesResponse } return ret, nil // { - // "description": "Search cases using the specified query.", + // "description": "Search cases using the specified query. Here is an example of calling this endpoint using cURL: ```shell parent=\"projects/some-project\" curl \\ --header \"Authorization: Bearer $(gcloud auth print-access-token)\" \\ \"https://cloudsupport.googleapis.com/v2/$parent/cases:search\" ```", // "flatPath": "v2beta/cases:search", // "httpMethod": "GET", // "id": "cloudsupport.cases.search", diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index 1f3a1fe7f03..b9af559bebe 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1042,7 +1042,7 @@ } } }, - "revision": "20230719", + "revision": "20230721", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -1051,7 +1051,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "individualAutoLabelStatuses": { "description": "The list of individual auto-labeling statuses of the dataset documents.", @@ -1094,7 +1094,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "errorDocumentCount": { "description": "Total number of documents that failed to be deleted in storage.", @@ -1142,7 +1142,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "destDatasetType": { "deprecated": true, @@ -1154,7 +1154,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -1170,7 +1170,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -1422,7 +1422,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "individualExportStatuses": { "description": "The list of response details of each document.", @@ -1473,7 +1473,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -1522,7 +1522,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "importConfigValidationResults": { "description": "Validation statuses of the batch documents import config.", @@ -1547,7 +1547,7 @@ "type": "object" }, "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult": { - "description": "The validation status of each import config. Status is set to errors if there is no documents to import in the import_config, or OK if the operation will try to proceed at least one document.", + "description": "The validation status of each import config. Status is set to an error if there are no documents to import in the `import_config`, or `OK` if the operation will try to proceed with at least one document.", "id": "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult", "properties": { "inputGcsSource": { @@ -1618,7 +1618,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "datasetResyncStatuses": { "description": "The list of dataset resync statuses. Not checked when `dataset_documents` is specified in ResyncRequest.", @@ -1714,7 +1714,7 @@ "BASE_OCR_REVISION" ], "enumDescriptions": [ - "Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.", + "Unspecified case, fall back to read the `LATEST_HUMAN_REVIEW`.", "The latest revision made by a human.", "The latest revision based on timestamp.", "The first (OCR) revision." @@ -1734,7 +1734,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." } }, "type": "object" @@ -1871,7 +1871,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." } }, "type": "object" @@ -1928,10 +1928,6 @@ "gcsPrefix": { "$ref": "GoogleCloudDocumentaiV1GcsPrefix", "description": "The set of documents that match the specified Cloud Storage `gcs_prefix`." - }, - "rawDocuments": { - "$ref": "GoogleCloudDocumentaiV1RawDocuments", - "description": "The set of documents specified inline." } }, "type": "object" @@ -4115,6 +4111,14 @@ "readOnly": true, "type": "string" }, + "processorVersionAliases": { + "description": "Output only. The processor version aliases.", + "items": { + "$ref": "GoogleCloudDocumentaiV1ProcessorVersionAlias" + }, + "readOnly": true, + "type": "array" + }, "state": { "description": "Output only. The state of the processor.", "enum": [ @@ -4290,6 +4294,21 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1ProcessorVersionAlias": { + "description": "Contains the alias and the aliased resource name of processor version.", + "id": "GoogleCloudDocumentaiV1ProcessorVersionAlias", + "properties": { + "alias": { + "description": "The alias in the form of `processor_version` resource name.", + "type": "string" + }, + "processorVersion": { + "description": "The resource name of aliased processor version.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo": { "description": "Information about the upcoming deprecation of this processor version.", "id": "GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo", @@ -4315,6 +4334,10 @@ "format": "byte", "type": "string" }, + "displayName": { + "description": "The display name of the document, it supports all Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\\\"`, `,` `~`, `=` and `:` are reserved. If not specified, a default ID will be generated.", + "type": "string" + }, "mimeType": { "description": "An IANA MIME type (RFC6838) indicating the nature and format of the content.", "type": "string" @@ -4322,20 +4345,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiV1RawDocuments": { - "description": "Specifies a set of raw documents.", - "id": "GoogleCloudDocumentaiV1RawDocuments", - "properties": { - "documents": { - "description": "Specifies raw document content and mime type.", - "items": { - "$ref": "GoogleCloudDocumentaiV1RawDocument" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata": { "description": "The long-running operation metadata for the ReviewDocument method.", "id": "GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata", @@ -7388,7 +7397,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "errorDocumentCount": { "description": "Total number of documents that failed to be deleted in storage.", @@ -7834,7 +7843,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "importConfigValidationResults": { "description": "Validation statuses of the batch documents import config.", @@ -7859,7 +7868,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult": { - "description": "The validation status of each import config. Status is set to errors if there is no documents to import in the import_config, or OK if the operation will try to proceed at least one document.", + "description": "The validation status of each import config. Status is set to an error if there are no documents to import in the `import_config`, or `OK` if the operation will try to proceed with at least one document.", "id": "GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult", "properties": { "inputGcsSource": { @@ -8015,7 +8024,7 @@ "BASE_OCR_REVISION" ], "enumDescriptions": [ - "Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.", + "Unspecified case, fall back to read the `LATEST_HUMAN_REVIEW`.", "The latest revision made by a human.", "The latest revision based on timestamp.", "The first (OCR) revision." @@ -8129,7 +8138,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." } }, "type": "object" diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index 8c20c8c7197..758b644f068 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -258,7 +258,7 @@ type ProjectsOperationsService struct { // GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata: Metadata of // the auto-labeling documents operation. type GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // IndividualAutoLabelStatuses: The list of individual auto-labeling @@ -332,7 +332,7 @@ type GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsResponse struct { } type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ErrorDocumentCount: Total number of documents that failed to be @@ -409,14 +409,14 @@ type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse struct { } type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // DestDatasetType: The destination dataset split type. // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -426,7 +426,7 @@ type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -938,7 +938,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse) Marshal // GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata: Metadata of // the batch export documents operation. type GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // IndividualExportStatuses: The list of response details of each @@ -1015,7 +1015,7 @@ type GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat struct // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -1117,7 +1117,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionResponse) MarshalJS // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata: Metadata of // the import document operation. type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ImportConfigValidationResults: Validation statuses of the batch @@ -1158,9 +1158,9 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata) MarshalJSON() ([ // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValid // ationResult: The validation status of each import config. Status is -// set to errors if there is no documents to import in the -// import_config, or OK if the operation will try to proceed at least -// one document. +// set to an error if there are no documents to import in the +// `import_config`, or `OK` if the operation will try to proceed with at +// least one document. type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult struct { // InputGcsSource: The source Cloud Storage URI specified in the import // config. @@ -1303,7 +1303,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionResponse) MarshalJS // GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata: The metadata // proto of ResyncDataset method. type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // DatasetResyncStatuses: The list of dataset resync statuses. Not @@ -1446,8 +1446,8 @@ type GoogleCloudDocumentaiUiv1beta3RevisionRef struct { // RevisionCase: Reads the revision by the predefined case. // // Possible values: - // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fallback to read - // the LATEST_HUMAN_REVIEW. + // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fall back to read + // the `LATEST_HUMAN_REVIEW`. // "LATEST_HUMAN_REVIEW" - The latest revision made by a human. // "LATEST_TIMESTAMP" - The latest revision based on timestamp. // "BASE_OCR_REVISION" - The first (OCR) revision. @@ -1484,7 +1484,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3RevisionRef) MarshalJSON() ([]byte, error // GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata: Metadata of // the sample documents operation. type GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonMetadata") to @@ -1760,7 +1760,7 @@ type GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionResponse struct { } type GoogleCloudDocumentaiUiv1beta3UpdateDatasetOperationMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonMetadata") to @@ -1907,9 +1907,6 @@ type GoogleCloudDocumentaiV1BatchDocumentsInputConfig struct { // Storage `gcs_prefix`. GcsPrefix *GoogleCloudDocumentaiV1GcsPrefix `json:"gcsPrefix,omitempty"` - // RawDocuments: The set of documents specified inline. - RawDocuments *GoogleCloudDocumentaiV1RawDocuments `json:"rawDocuments,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsDocuments") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -5510,6 +5507,9 @@ type GoogleCloudDocumentaiV1Processor struct { // be called to invoke processing. ProcessEndpoint string `json:"processEndpoint,omitempty"` + // ProcessorVersionAliases: Output only. The processor version aliases. + ProcessorVersionAliases []*GoogleCloudDocumentaiV1ProcessorVersionAlias `json:"processorVersionAliases,omitempty"` + // State: Output only. The state of the processor. // // Possible values: @@ -5774,6 +5774,38 @@ func (s *GoogleCloudDocumentaiV1ProcessorVersion) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1ProcessorVersionAlias: Contains the alias and +// the aliased resource name of processor version. +type GoogleCloudDocumentaiV1ProcessorVersionAlias struct { + // Alias: The alias in the form of `processor_version` resource name. + Alias string `json:"alias,omitempty"` + + // ProcessorVersion: The resource name of aliased processor version. + ProcessorVersion string `json:"processorVersion,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 *GoogleCloudDocumentaiV1ProcessorVersionAlias) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1ProcessorVersionAlias + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo: Information // about the upcoming deprecation of this processor version. type GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo struct { @@ -5815,6 +5847,12 @@ type GoogleCloudDocumentaiV1RawDocument struct { // Content: Inline document content. Content string `json:"content,omitempty"` + // DisplayName: The display name of the document, it supports all + // Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, + // `{`, `}`,`'`, `\", `,` `~`, `=` and `:` are reserved. If not + // specified, a default ID will be generated. + DisplayName string `json:"displayName,omitempty"` + // MimeType: An IANA MIME type (RFC6838) indicating the nature and // format of the content. MimeType string `json:"mimeType,omitempty"` @@ -5842,35 +5880,6 @@ func (s *GoogleCloudDocumentaiV1RawDocument) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1RawDocuments: Specifies a set of raw -// documents. -type GoogleCloudDocumentaiV1RawDocuments struct { - // Documents: Specifies raw document content and mime type. - Documents []*GoogleCloudDocumentaiV1RawDocument `json:"documents,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Documents") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Documents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDocumentaiV1RawDocuments) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1RawDocuments - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata: The // long-running operation metadata for the ReviewDocument method. type GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata struct { @@ -10860,7 +10869,7 @@ func (s *GoogleCloudDocumentaiV1beta2Vertex) MarshalJSON() ([]byte, error) { } type GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ErrorDocumentCount: Total number of documents that failed to be @@ -11644,7 +11653,7 @@ func (s *GoogleCloudDocumentaiV1beta3HumanReviewStatus) MarshalJSON() ([]byte, e // GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata: Metadata of the // import document operation. type GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ImportConfigValidationResults: Validation statuses of the batch @@ -11685,8 +11694,9 @@ func (s *GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata) MarshalJSON() ([]b // GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidat // ionResult: The validation status of each import config. Status is set -// to errors if there is no documents to import in the import_config, or -// OK if the operation will try to proceed at least one document. +// to an error if there are no documents to import in the +// `import_config`, or `OK` if the operation will try to proceed with at +// least one document. type GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult struct { // InputGcsSource: The source Cloud Storage URI specified in the import // config. @@ -11933,8 +11943,8 @@ type GoogleCloudDocumentaiV1beta3RevisionRef struct { // RevisionCase: Reads the revision by the predefined case. // // Possible values: - // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fallback to read - // the LATEST_HUMAN_REVIEW. + // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fall back to read + // the `LATEST_HUMAN_REVIEW`. // "LATEST_HUMAN_REVIEW" - The latest revision made by a human. // "LATEST_TIMESTAMP" - The latest revision based on timestamp. // "BASE_OCR_REVISION" - The first (OCR) revision. @@ -12153,7 +12163,7 @@ type GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse struct { } type GoogleCloudDocumentaiV1beta3UpdateDatasetOperationMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonMetadata") to diff --git a/documentai/v1beta2/documentai-api.json b/documentai/v1beta2/documentai-api.json index b7cab2ba3d6..6b8dea88bf9 100644 --- a/documentai/v1beta2/documentai-api.json +++ b/documentai/v1beta2/documentai-api.json @@ -292,7 +292,7 @@ } } }, - "revision": "20230706", + "revision": "20230721", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -301,7 +301,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "individualAutoLabelStatuses": { "description": "The list of individual auto-labeling statuses of the dataset documents.", @@ -344,7 +344,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "errorDocumentCount": { "description": "Total number of documents that failed to be deleted in storage.", @@ -392,7 +392,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "destDatasetType": { "deprecated": true, @@ -404,7 +404,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -420,7 +420,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -672,7 +672,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "individualExportStatuses": { "description": "The list of response details of each document.", @@ -723,7 +723,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -772,7 +772,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "importConfigValidationResults": { "description": "Validation statuses of the batch documents import config.", @@ -797,7 +797,7 @@ "type": "object" }, "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult": { - "description": "The validation status of each import config. Status is set to errors if there is no documents to import in the import_config, or OK if the operation will try to proceed at least one document.", + "description": "The validation status of each import config. Status is set to an error if there are no documents to import in the `import_config`, or `OK` if the operation will try to proceed with at least one document.", "id": "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult", "properties": { "inputGcsSource": { @@ -868,7 +868,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "datasetResyncStatuses": { "description": "The list of dataset resync statuses. Not checked when `dataset_documents` is specified in ResyncRequest.", @@ -964,7 +964,7 @@ "BASE_OCR_REVISION" ], "enumDescriptions": [ - "Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.", + "Unspecified case, fall back to read the `LATEST_HUMAN_REVIEW`.", "The latest revision made by a human.", "The latest revision based on timestamp.", "The first (OCR) revision." @@ -984,7 +984,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." } }, "type": "object" @@ -1121,7 +1121,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." } }, "type": "object" @@ -4506,7 +4506,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "errorDocumentCount": { "description": "Total number of documents that failed to be deleted in storage.", @@ -4952,7 +4952,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "importConfigValidationResults": { "description": "Validation statuses of the batch documents import config.", @@ -4977,7 +4977,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult": { - "description": "The validation status of each import config. Status is set to errors if there is no documents to import in the import_config, or OK if the operation will try to proceed at least one document.", + "description": "The validation status of each import config. Status is set to an error if there are no documents to import in the `import_config`, or `OK` if the operation will try to proceed with at least one document.", "id": "GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult", "properties": { "inputGcsSource": { @@ -5133,7 +5133,7 @@ "BASE_OCR_REVISION" ], "enumDescriptions": [ - "Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.", + "Unspecified case, fall back to read the `LATEST_HUMAN_REVIEW`.", "The latest revision made by a human.", "The latest revision based on timestamp.", "The first (OCR) revision." @@ -5247,7 +5247,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." } }, "type": "object" diff --git a/documentai/v1beta2/documentai-gen.go b/documentai/v1beta2/documentai-gen.go index 8a783eb327f..73138e8dad8 100644 --- a/documentai/v1beta2/documentai-gen.go +++ b/documentai/v1beta2/documentai-gen.go @@ -210,7 +210,7 @@ type ProjectsOperationsService struct { // GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata: Metadata of // the auto-labeling documents operation. type GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // IndividualAutoLabelStatuses: The list of individual auto-labeling @@ -284,7 +284,7 @@ type GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsResponse struct { } type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ErrorDocumentCount: Total number of documents that failed to be @@ -361,14 +361,14 @@ type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse struct { } type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // DestDatasetType: The destination dataset split type. // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -378,7 +378,7 @@ type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -890,7 +890,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse) Marshal // GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata: Metadata of // the batch export documents operation. type GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // IndividualExportStatuses: The list of response details of each @@ -967,7 +967,7 @@ type GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat struct // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -1069,7 +1069,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionResponse) MarshalJS // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata: Metadata of // the import document operation. type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ImportConfigValidationResults: Validation statuses of the batch @@ -1110,9 +1110,9 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata) MarshalJSON() ([ // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValid // ationResult: The validation status of each import config. Status is -// set to errors if there is no documents to import in the -// import_config, or OK if the operation will try to proceed at least -// one document. +// set to an error if there are no documents to import in the +// `import_config`, or `OK` if the operation will try to proceed with at +// least one document. type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult struct { // InputGcsSource: The source Cloud Storage URI specified in the import // config. @@ -1255,7 +1255,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionResponse) MarshalJS // GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata: The metadata // proto of ResyncDataset method. type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // DatasetResyncStatuses: The list of dataset resync statuses. Not @@ -1398,8 +1398,8 @@ type GoogleCloudDocumentaiUiv1beta3RevisionRef struct { // RevisionCase: Reads the revision by the predefined case. // // Possible values: - // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fallback to read - // the LATEST_HUMAN_REVIEW. + // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fall back to read + // the `LATEST_HUMAN_REVIEW`. // "LATEST_HUMAN_REVIEW" - The latest revision made by a human. // "LATEST_TIMESTAMP" - The latest revision based on timestamp. // "BASE_OCR_REVISION" - The first (OCR) revision. @@ -1436,7 +1436,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3RevisionRef) MarshalJSON() ([]byte, error // GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata: Metadata of // the sample documents operation. type GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonMetadata") to @@ -1712,7 +1712,7 @@ type GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionResponse struct { } type GoogleCloudDocumentaiUiv1beta3UpdateDatasetOperationMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonMetadata") to @@ -7338,7 +7338,7 @@ func (s *GoogleCloudDocumentaiV1beta2Vertex) MarshalJSON() ([]byte, error) { } type GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ErrorDocumentCount: Total number of documents that failed to be @@ -8122,7 +8122,7 @@ func (s *GoogleCloudDocumentaiV1beta3HumanReviewStatus) MarshalJSON() ([]byte, e // GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata: Metadata of the // import document operation. type GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ImportConfigValidationResults: Validation statuses of the batch @@ -8163,8 +8163,9 @@ func (s *GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata) MarshalJSON() ([]b // GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidat // ionResult: The validation status of each import config. Status is set -// to errors if there is no documents to import in the import_config, or -// OK if the operation will try to proceed at least one document. +// to an error if there are no documents to import in the +// `import_config`, or `OK` if the operation will try to proceed with at +// least one document. type GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult struct { // InputGcsSource: The source Cloud Storage URI specified in the import // config. @@ -8411,8 +8412,8 @@ type GoogleCloudDocumentaiV1beta3RevisionRef struct { // RevisionCase: Reads the revision by the predefined case. // // Possible values: - // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fallback to read - // the LATEST_HUMAN_REVIEW. + // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fall back to read + // the `LATEST_HUMAN_REVIEW`. // "LATEST_HUMAN_REVIEW" - The latest revision made by a human. // "LATEST_TIMESTAMP" - The latest revision based on timestamp. // "BASE_OCR_REVISION" - The first (OCR) revision. @@ -8631,7 +8632,7 @@ type GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse struct { } type GoogleCloudDocumentaiV1beta3UpdateDatasetOperationMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonMetadata") to diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index a7c3fdcbafa..cd2e037cfdf 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -755,7 +755,7 @@ "BASE_OCR_REVISION" ], "enumDescriptions": [ - "Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.", + "Unspecified case, fall back to read the `LATEST_HUMAN_REVIEW`.", "The latest revision made by a human.", "The latest revision based on timestamp.", "The first (OCR) revision." @@ -1256,7 +1256,7 @@ } } }, - "revision": "20230719", + "revision": "20230721", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -1265,7 +1265,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "individualAutoLabelStatuses": { "description": "The list of individual auto-labeling statuses of the dataset documents.", @@ -1308,7 +1308,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "errorDocumentCount": { "description": "Total number of documents that failed to be deleted in storage.", @@ -1356,7 +1356,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "destDatasetType": { "deprecated": true, @@ -1368,7 +1368,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -1384,7 +1384,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -1636,7 +1636,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "individualExportStatuses": { "description": "The list of response details of each document.", @@ -1687,7 +1687,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -1736,7 +1736,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "importConfigValidationResults": { "description": "Validation statuses of the batch documents import config.", @@ -1761,7 +1761,7 @@ "type": "object" }, "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult": { - "description": "The validation status of each import config. Status is set to errors if there is no documents to import in the import_config, or OK if the operation will try to proceed at least one document.", + "description": "The validation status of each import config. Status is set to an error if there are no documents to import in the `import_config`, or `OK` if the operation will try to proceed with at least one document.", "id": "GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult", "properties": { "inputGcsSource": { @@ -1832,7 +1832,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "datasetResyncStatuses": { "description": "The list of dataset resync statuses. Not checked when `dataset_documents` is specified in ResyncRequest.", @@ -1928,7 +1928,7 @@ "BASE_OCR_REVISION" ], "enumDescriptions": [ - "Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.", + "Unspecified case, fall back to read the `LATEST_HUMAN_REVIEW`.", "The latest revision made by a human.", "The latest revision based on timestamp.", "The first (OCR) revision." @@ -1948,7 +1948,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." } }, "type": "object" @@ -2085,7 +2085,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." } }, "type": "object" @@ -5336,7 +5336,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "errorDocumentCount": { "description": "Total number of documents that failed to be deleted in storage.", @@ -5400,10 +5400,6 @@ "gcsPrefix": { "$ref": "GoogleCloudDocumentaiV1beta3GcsPrefix", "description": "The set of documents that match the specified Cloud Storage `gcs_prefix`." - }, - "rawDocuments": { - "$ref": "GoogleCloudDocumentaiV1beta3RawDocuments", - "description": "The set of documents specified inline." } }, "type": "object" @@ -7585,7 +7581,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." }, "importConfigValidationResults": { "description": "Validation statuses of the batch documents import config.", @@ -7610,7 +7606,7 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult": { - "description": "The validation status of each import config. Status is set to errors if there is no documents to import in the import_config, or OK if the operation will try to proceed at least one document.", + "description": "The validation status of each import config. Status is set to an error if there are no documents to import in the `import_config`, or `OK` if the operation will try to proceed with at least one document.", "id": "GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult", "properties": { "inputGcsSource": { @@ -7677,7 +7673,7 @@ "DATASET_SPLIT_UNASSIGNED" ], "enumDescriptions": [ - "Default value if the enum is not set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum", + "Default value if the enum is not set.", "Identifies the train documents.", "Identifies the test documents.", "Identifies the unassigned documents." @@ -7717,9 +7713,13 @@ "type": "object" }, "GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest": { - "description": "The request message for the ImportProcessorVersion method. Requirements: - The source processor version and destination processor must be in the same location. - The Document AI [Service Agent](https://cloud.google.com/iam/docs/service-agents) of the destination project must have [Document AI Editor role](https://cloud.google.com/document-ai/docs/access-control/iam-roles) on the source project. The destination project is specified as part of the parent field. The source project is specified as part of the source field.", + "description": "The request message for the ImportProcessorVersion method. Requirements: - The Document AI [Service Agent](https://cloud.google.com/iam/docs/service-agents) of the destination project must have [Document AI Editor role](https://cloud.google.com/document-ai/docs/access-control/iam-roles) on the source project. The destination project is specified as part of the parent field. The source project is specified as part of the source field.", "id": "GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest", "properties": { + "externalProcessorVersionSource": { + "$ref": "GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource", + "description": "The source processor version to import from, and can be from different environment and region than the destination processor." + }, "processorVersionSource": { "description": "The source processor version to import from. The source processor version and destination processor need to be in the same environment and region.", "type": "string" @@ -7727,6 +7727,21 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource": { + "description": "The external source processor version.", + "id": "GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource", + "properties": { + "processorVersion": { + "description": "Required. The processor version name. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`", + "type": "string" + }, + "serviceEndpoint": { + "description": "Optional. The Document AI service endpoint. For example, 'https://us-documentai.googleapis.com'", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3ImportProcessorVersionResponse": { "description": "The response message for the ImportProcessorVersion method.", "id": "GoogleCloudDocumentaiV1beta3ImportProcessorVersionResponse", @@ -7974,6 +7989,14 @@ "readOnly": true, "type": "string" }, + "processorVersionAliases": { + "description": "Output only. The processor version aliases.", + "items": { + "$ref": "GoogleCloudDocumentaiV1beta3ProcessorVersionAlias" + }, + "readOnly": true, + "type": "array" + }, "state": { "description": "Output only. The state of the processor.", "enum": [ @@ -8149,6 +8172,21 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3ProcessorVersionAlias": { + "description": "Contains the alias and the aliased resource name of processor version.", + "id": "GoogleCloudDocumentaiV1beta3ProcessorVersionAlias", + "properties": { + "alias": { + "description": "The alias in the form of `processor_version` resource name.", + "type": "string" + }, + "processorVersion": { + "description": "The resource name of aliased processor version.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo": { "description": "Information about the upcoming deprecation of this processor version.", "id": "GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo", @@ -8185,6 +8223,10 @@ "format": "byte", "type": "string" }, + "displayName": { + "description": "The display name of the document, it supports all Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, `\\\"`, `,` `~`, `=` and `:` are reserved. If not specified, a default ID will be generated.", + "type": "string" + }, "mimeType": { "description": "An IANA MIME type (RFC6838) indicating the nature and format of the content.", "type": "string" @@ -8192,20 +8234,6 @@ }, "type": "object" }, - "GoogleCloudDocumentaiV1beta3RawDocuments": { - "description": "Specifies a set of raw documents.", - "id": "GoogleCloudDocumentaiV1beta3RawDocuments", - "properties": { - "documents": { - "description": "Specifies raw document content and mime type.", - "items": { - "$ref": "GoogleCloudDocumentaiV1beta3RawDocument" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata": { "description": "The long-running operation metadata for the ReviewDocument method.", "id": "GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata", @@ -8337,7 +8365,7 @@ "BASE_OCR_REVISION" ], "enumDescriptions": [ - "Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.", + "Unspecified case, fall back to read the `LATEST_HUMAN_REVIEW`.", "The latest revision made by a human.", "The latest revision based on timestamp.", "The first (OCR) revision." @@ -8531,7 +8559,7 @@ "properties": { "commonMetadata": { "$ref": "GoogleCloudDocumentaiV1beta3CommonOperationMetadata", - "description": "The basic metadata of the long running operation." + "description": "The basic metadata of the long-running operation." } }, "type": "object" diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 1ecd354dfaf..63d8fd8cd48 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -246,7 +246,7 @@ type ProjectsLocationsProcessorsProcessorVersionsEvaluationsService struct { // GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata: Metadata of // the auto-labeling documents operation. type GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // IndividualAutoLabelStatuses: The list of individual auto-labeling @@ -320,7 +320,7 @@ type GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsResponse struct { } type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ErrorDocumentCount: Total number of documents that failed to be @@ -397,14 +397,14 @@ type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse struct { } type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // DestDatasetType: The destination dataset split type. // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -414,7 +414,7 @@ type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -926,7 +926,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse) Marshal // GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata: Metadata of // the batch export documents operation. type GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // IndividualExportStatuses: The list of response details of each @@ -1003,7 +1003,7 @@ type GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat struct // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -1105,7 +1105,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionResponse) MarshalJS // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata: Metadata of // the import document operation. type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ImportConfigValidationResults: Validation statuses of the batch @@ -1146,9 +1146,9 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata) MarshalJSON() ([ // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValid // ationResult: The validation status of each import config. Status is -// set to errors if there is no documents to import in the -// import_config, or OK if the operation will try to proceed at least -// one document. +// set to an error if there are no documents to import in the +// `import_config`, or `OK` if the operation will try to proceed with at +// least one document. type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult struct { // InputGcsSource: The source Cloud Storage URI specified in the import // config. @@ -1291,7 +1291,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionResponse) MarshalJS // GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata: The metadata // proto of ResyncDataset method. type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // DatasetResyncStatuses: The list of dataset resync statuses. Not @@ -1434,8 +1434,8 @@ type GoogleCloudDocumentaiUiv1beta3RevisionRef struct { // RevisionCase: Reads the revision by the predefined case. // // Possible values: - // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fallback to read - // the LATEST_HUMAN_REVIEW. + // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fall back to read + // the `LATEST_HUMAN_REVIEW`. // "LATEST_HUMAN_REVIEW" - The latest revision made by a human. // "LATEST_TIMESTAMP" - The latest revision based on timestamp. // "BASE_OCR_REVISION" - The first (OCR) revision. @@ -1472,7 +1472,7 @@ func (s *GoogleCloudDocumentaiUiv1beta3RevisionRef) MarshalJSON() ([]byte, error // GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata: Metadata of // the sample documents operation. type GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonMetadata") to @@ -1748,7 +1748,7 @@ type GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionResponse struct { } type GoogleCloudDocumentaiUiv1beta3UpdateDatasetOperationMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonMetadata") to @@ -7135,7 +7135,7 @@ func (s *GoogleCloudDocumentaiV1beta3BatchDatasetDocumentsIndividualDocumentIds) } type GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ErrorDocumentCount: Total number of documents that failed to be @@ -7254,9 +7254,6 @@ type GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig struct { // Storage `gcs_prefix`. GcsPrefix *GoogleCloudDocumentaiV1beta3GcsPrefix `json:"gcsPrefix,omitempty"` - // RawDocuments: The set of documents specified inline. - RawDocuments *GoogleCloudDocumentaiV1beta3RawDocuments `json:"rawDocuments,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsDocuments") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -10859,7 +10856,7 @@ func (s *GoogleCloudDocumentaiV1beta3HumanReviewStatus) MarshalJSON() ([]byte, e // GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata: Metadata of the // import document operation. type GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ImportConfigValidationResults: Validation statuses of the batch @@ -10900,8 +10897,9 @@ func (s *GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata) MarshalJSON() ([]b // GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidat // ionResult: The validation status of each import config. Status is set -// to errors if there is no documents to import in the import_config, or -// OK if the operation will try to proceed at least one document. +// to an error if there are no documents to import in the +// `import_config`, or `OK` if the operation will try to proceed with at +// least one document. type GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult struct { // InputGcsSource: The source Cloud Storage URI specified in the import // config. @@ -11018,7 +11016,7 @@ type GoogleCloudDocumentaiV1beta3ImportDocumentsRequestBatchDocumentsImportConfi // // Possible values: // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not - // set. go/protodosdonts#do-include-an-unspecified-value-in-an-enum + // set. // "DATASET_SPLIT_TRAIN" - Identifies the train documents. // "DATASET_SPLIT_TEST" - Identifies the test documents. // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. @@ -11130,8 +11128,7 @@ func (s *GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata) MarshalJSON // GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest: The // request message for the ImportProcessorVersion method. Requirements: -// - The source processor version and destination processor must be in -// the same location. - The Document AI Service Agent +// - The Document AI Service Agent // (https://cloud.google.com/iam/docs/service-agents) of the destination // project must have Document AI Editor role // (https://cloud.google.com/document-ai/docs/access-control/iam-roles) @@ -11139,32 +11136,73 @@ func (s *GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata) MarshalJSON // of the parent field. The source project is specified as part of the // source field. type GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest struct { + // ExternalProcessorVersionSource: The source processor version to + // import from, and can be from different environment and region than + // the destination processor. + ExternalProcessorVersionSource *GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource `json:"externalProcessorVersionSource,omitempty"` + // ProcessorVersionSource: The source processor version to import from. // The source processor version and destination processor need to be in // the same environment and region. ProcessorVersionSource string `json:"processorVersionSource,omitempty"` // ForceSendFields is a list of field names (e.g. - // "ProcessorVersionSource") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // "ExternalProcessorVersionSource") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProcessorVersionSource") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. + // "ExternalProcessorVersionSource") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProce +// ssorVersionSource: The external source processor version. +type GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource struct { + // ProcessorVersion: Required. The processor version name. Format: + // `projects/{project}/locations/{location}/processors/{processor}/proces + // sorVersions/{processorVersion}` + ProcessorVersion string `json:"processorVersion,omitempty"` + + // ServiceEndpoint: Optional. The Document AI service endpoint. For + // example, 'https://us-documentai.googleapis.com' + ServiceEndpoint string `json:"serviceEndpoint,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ProcessorVersion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ProcessorVersion") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest +func (s *GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequestExternalProcessorVersionSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } @@ -11635,6 +11673,9 @@ type GoogleCloudDocumentaiV1beta3Processor struct { // be called to invoke processing. ProcessEndpoint string `json:"processEndpoint,omitempty"` + // ProcessorVersionAliases: Output only. The processor version aliases. + ProcessorVersionAliases []*GoogleCloudDocumentaiV1beta3ProcessorVersionAlias `json:"processorVersionAliases,omitempty"` + // State: Output only. The state of the processor. // // Possible values: @@ -11899,6 +11940,38 @@ func (s *GoogleCloudDocumentaiV1beta3ProcessorVersion) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3ProcessorVersionAlias: Contains the alias +// and the aliased resource name of processor version. +type GoogleCloudDocumentaiV1beta3ProcessorVersionAlias struct { + // Alias: The alias in the form of `processor_version` resource name. + Alias string `json:"alias,omitempty"` + + // ProcessorVersion: The resource name of aliased processor version. + ProcessorVersion string `json:"processorVersion,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 *GoogleCloudDocumentaiV1beta3ProcessorVersionAlias) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3ProcessorVersionAlias + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo: // Information about the upcoming deprecation of this processor version. type GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo struct { @@ -11969,6 +12042,12 @@ type GoogleCloudDocumentaiV1beta3RawDocument struct { // Content: Inline document content. Content string `json:"content,omitempty"` + // DisplayName: The display name of the document, it supports all + // Unicode characters except the following: `*`, `?`, `[`, `]`, `%`, + // `{`, `}`,`'`, `\", `,` `~`, `=` and `:` are reserved. If not + // specified, a default ID will be generated. + DisplayName string `json:"displayName,omitempty"` + // MimeType: An IANA MIME type (RFC6838) indicating the nature and // format of the content. MimeType string `json:"mimeType,omitempty"` @@ -11996,35 +12075,6 @@ func (s *GoogleCloudDocumentaiV1beta3RawDocument) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDocumentaiV1beta3RawDocuments: Specifies a set of raw -// documents. -type GoogleCloudDocumentaiV1beta3RawDocuments struct { - // Documents: Specifies raw document content and mime type. - Documents []*GoogleCloudDocumentaiV1beta3RawDocument `json:"documents,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Documents") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Documents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDocumentaiV1beta3RawDocuments) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDocumentaiV1beta3RawDocuments - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata: The // long-running operation metadata for the ReviewDocument method. type GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata struct { @@ -12184,8 +12234,8 @@ type GoogleCloudDocumentaiV1beta3RevisionRef struct { // RevisionCase: Reads the revision by the predefined case. // // Possible values: - // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fallback to read - // the LATEST_HUMAN_REVIEW. + // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fall back to read + // the `LATEST_HUMAN_REVIEW`. // "LATEST_HUMAN_REVIEW" - The latest revision made by a human. // "LATEST_TIMESTAMP" - The latest revision based on timestamp. // "BASE_OCR_REVISION" - The first (OCR) revision. @@ -12561,7 +12611,7 @@ type GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse struct { } type GoogleCloudDocumentaiV1beta3UpdateDatasetOperationMetadata struct { - // CommonMetadata: The basic metadata of the long running operation. + // CommonMetadata: The basic metadata of the long-running operation. CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` // ForceSendFields is a list of field names (e.g. "CommonMetadata") to @@ -16526,9 +16576,9 @@ func (c *ProjectsLocationsProcessorsDatasetGetDocumentCall) DocumentIdRevisionRe // // Possible values: // -// "REVISION_CASE_UNSPECIFIED" - Unspecified case, fallback to read +// "REVISION_CASE_UNSPECIFIED" - Unspecified case, fall back to read // -// the LATEST_HUMAN_REVIEW. +// the `LATEST_HUMAN_REVIEW`. // // "LATEST_HUMAN_REVIEW" - The latest revision made by a human. // "LATEST_TIMESTAMP" - The latest revision based on timestamp. @@ -16718,7 +16768,7 @@ func (c *ProjectsLocationsProcessorsDatasetGetDocumentCall) Do(opts ...googleapi // "BASE_OCR_REVISION" // ], // "enumDescriptions": [ - // "Unspecified case, fallback to read the LATEST_HUMAN_REVIEW.", + // "Unspecified case, fall back to read the `LATEST_HUMAN_REVIEW`.", // "The latest revision made by a human.", // "The latest revision based on timestamp.", // "The first (OCR) revision." diff --git a/policysimulator/v1/policysimulator-api.json b/policysimulator/v1/policysimulator-api.json index 816c6b3a4fe..d0206c69ba2 100644 --- a/policysimulator/v1/policysimulator-api.json +++ b/policysimulator/v1/policysimulator-api.json @@ -707,9 +707,197 @@ } } }, - "revision": "20230312", + "revision": "20230723", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { + "GoogleCloudOrgpolicyV2AlternatePolicySpec": { + "description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.", + "id": "GoogleCloudOrgpolicyV2AlternatePolicySpec", + "properties": { + "launch": { + "description": "Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.", + "type": "string" + }, + "spec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Specify constraint for configurations of Google Cloud resources." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2CustomConstraint": { + "description": "A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.", + "id": "GoogleCloudOrgpolicyV2CustomConstraint", + "properties": { + "actionType": { + "description": "Allow or deny type.", + "enum": [ + "ACTION_TYPE_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "Unspecified. Results in an error.", + "Allowed action type.", + "Deny action type." + ], + "type": "string" + }, + "condition": { + "description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")'` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.", + "type": "string" + }, + "description": { + "description": "Detailed information about this custom policy constraint. The max length of the description is 2000 characters.", + "type": "string" + }, + "displayName": { + "description": "One line display name for the UI. The max length of the display_name is 200 characters.", + "type": "string" + }, + "methodTypes": { + "description": "All the operations being applied for this constraint.", + "items": { + "enum": [ + "METHOD_TYPE_UNSPECIFIED", + "CREATE", + "UPDATE", + "DELETE" + ], + "enumDescriptions": [ + "Unspecified. Results in an error.", + "Constraint applied when creating the resource.", + "Constraint applied when updating the resource.", + "Constraint applied when deleting the resource. Not supported yet." + ], + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.", + "type": "string" + }, + "resourceTypes": { + "description": "Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2Policy": { + "description": "Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.", + "id": "GoogleCloudOrgpolicyV2Policy", + "properties": { + "alternate": { + "$ref": "GoogleCloudOrgpolicyV2AlternatePolicySpec", + "deprecated": true, + "description": "Deprecated." + }, + "dryRunSpec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced." + }, + "name": { + "description": "Immutable. The resource name of the policy. Must be one of the following forms, where constraint_name is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, \"projects/123/policies/compute.disableSerialPortAccess\". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", + "type": "string" + }, + "spec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Basic information about the Organization Policy." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpec": { + "description": "Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.", + "id": "GoogleCloudOrgpolicyV2PolicySpec", + "properties": { + "etag": { + "description": "An opaque tag indicating the current version of the policy, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy` is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policy to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", + "type": "string" + }, + "inheritFromParent": { + "description": "Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.", + "type": "boolean" + }, + "reset": { + "description": "Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.", + "type": "boolean" + }, + "rules": { + "description": "In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.", + "items": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpecPolicyRule": { + "description": "A rule used to express this policy.", + "id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule", + "properties": { + "allowAll": { + "description": "Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.", + "type": "boolean" + }, + "condition": { + "$ref": "GoogleTypeExpr", + "description": "A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the \"||\" or \"\u0026\u0026\" operators. Each subexpression must be of the form \"resource.matchTag('/tag_key_short_name, 'tag_value_short_name')\". or \"resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')\". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: \"resource.matchTag('123456789/environment, 'prod')\". or \"resource.matchTagId('tagKeys/123', 'tagValues/456')\"." + }, + "denyAll": { + "description": "Setting this to true means that all values are denied. This field can be set only in policies for list constraints.", + "type": "boolean" + }, + "enforce": { + "description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", + "type": "boolean" + }, + "values": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", + "description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues": { + "description": "A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a \":\". Values prefixed with \"is:\" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - \"projects/\", e.g. \"projects/tokyo-rain-123\" - \"folders/\", e.g. \"folders/1234\" - \"organizations/\", e.g. \"organizations/1234\" The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used.", + "id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", + "properties": { + "allowedValues": { + "description": "List of values allowed at this resource.", + "items": { + "type": "string" + }, + "type": "array" + }, + "deniedValues": { + "description": "List of values denied at this resource.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1AccessStateDiff": { "description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple.", "id": "GoogleCloudPolicysimulatorV1AccessStateDiff", @@ -1155,6 +1343,364 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e. when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay": { + "description": "The proposed changes to OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", + "properties": { + "customConstraints": { + "description": "The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay" + }, + "type": "array" + }, + "policies": { + "description": "The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay": { + "description": "A change to an OrgPolicy custom constraint.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The new or updated custom constraint." + }, + "customConstraintParent": { + "description": "Resource the constraint is attached to. Example: \"organization/987654\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay": { + "description": "A change to an OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay", + "properties": { + "policy": { + "$ref": "GoogleCloudOrgpolicyV2Policy", + "description": "The new or updated OrgPolicy." + }, + "policyParent": { + "description": "The parent of the policy we are attaching to. Example: \"projects/123456\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview": { + "description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview", + "properties": { + "name": { + "description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", + "readOnly": true, + "type": "string" + }, + "overlay": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", + "description": "Required. The proposed changes we are previewing violations for." + }, + "resourceCounts": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", + "description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the `OrgPolicyViolationsPreview`.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + }, + "violationsCount": { + "description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts": { + "description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", + "properties": { + "compliant": { + "description": "Number of scanned resources with zero violations.", + "format": "int32", + "type": "integer" + }, + "errors": { + "description": "Number of resources that returned an error when scanned.", + "format": "int32", + "type": "integer" + }, + "noncompliant": { + "description": "Number of scanned resources with at least one violation.", + "format": "int32", + "type": "integer" + }, + "scanned": { + "description": "Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", + "format": "int32", + "type": "integer" + }, + "unenforced": { + "description": "Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e. when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay": { + "description": "The proposed changes to OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", + "properties": { + "customConstraints": { + "description": "The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay" + }, + "type": "array" + }, + "policies": { + "description": "The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay": { + "description": "A change to an OrgPolicy custom constraint.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The new or updated custom constraint." + }, + "customConstraintParent": { + "description": "Resource the constraint is attached to. Example: \"organization/987654\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay": { + "description": "A change to an OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay", + "properties": { + "policy": { + "$ref": "GoogleCloudOrgpolicyV2Policy", + "description": "The new or updated OrgPolicy." + }, + "policyParent": { + "description": "The parent of the policy we are attaching to. Example: \"projects/123456\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview": { + "description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview", + "properties": { + "name": { + "description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", + "readOnly": true, + "type": "string" + }, + "overlay": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", + "description": "Required. The proposed changes we are previewing violations for." + }, + "resourceCounts": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", + "description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the `OrgPolicyViolationsPreview`.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + }, + "violationsCount": { + "description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts": { + "description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", + "properties": { + "compliant": { + "description": "Number of scanned resources with zero violations.", + "format": "int32", + "type": "integer" + }, + "errors": { + "description": "Number of resources that returned an error when scanned.", + "format": "int32", + "type": "integer" + }, + "noncompliant": { + "description": "Number of scanned resources with at least one violation.", + "format": "int32", + "type": "integer" + }, + "scanned": { + "description": "Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", + "format": "int32", + "type": "integer" + }, + "unenforced": { + "description": "Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleIamV1AuditConfig": { "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": "GoogleIamV1AuditConfig", diff --git a/policysimulator/v1/policysimulator-gen.go b/policysimulator/v1/policysimulator-gen.go index c9fba5b36b4..c012627e713 100644 --- a/policysimulator/v1/policysimulator-gen.go +++ b/policysimulator/v1/policysimulator-gen.go @@ -327,6 +327,336 @@ type ProjectsLocationsReplaysResultsService struct { s *Service } +// GoogleCloudOrgpolicyV2AlternatePolicySpec: Similar to PolicySpec but +// with an extra 'launch' field for launch reference. The PolicySpec +// here is specific for dry-run/darklaunch. +type GoogleCloudOrgpolicyV2AlternatePolicySpec struct { + // Launch: Reference to the launch that will be used while audit logging + // and to control the launch. Should be set only in the alternate + // policy. + Launch string `json:"launch,omitempty"` + + // Spec: Specify constraint for configurations of Google Cloud + // resources. + Spec *GoogleCloudOrgpolicyV2PolicySpec `json:"spec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Launch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Launch") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2AlternatePolicySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2AlternatePolicySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2CustomConstraint: A custom constraint defined +// by customers which can *only* be applied to the given resource types +// and organization. By creating a custom constraint, customers can +// apply policies of this custom constraint. *Creating a custom +// constraint itself does NOT apply any policy enforcement*. +type GoogleCloudOrgpolicyV2CustomConstraint struct { + // ActionType: Allow or deny type. + // + // Possible values: + // "ACTION_TYPE_UNSPECIFIED" - Unspecified. Results in an error. + // "ALLOW" - Allowed action type. + // "DENY" - Deny action type. + ActionType string `json:"actionType,omitempty"` + + // Condition: Org policy condition/expression. For example: + // `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or, + // `resource.management.auto_upgrade == true` The max length of the + // condition is 1000 characters. + Condition string `json:"condition,omitempty"` + + // Description: Detailed information about this custom policy + // constraint. The max length of the description is 2000 characters. + Description string `json:"description,omitempty"` + + // DisplayName: One line display name for the UI. The max length of the + // display_name is 200 characters. + DisplayName string `json:"displayName,omitempty"` + + // MethodTypes: All the operations being applied for this constraint. + // + // Possible values: + // "METHOD_TYPE_UNSPECIFIED" - Unspecified. Results in an error. + // "CREATE" - Constraint applied when creating the resource. + // "UPDATE" - Constraint applied when updating the resource. + // "DELETE" - Constraint applied when deleting the resource. Not + // supported yet. + MethodTypes []string `json:"methodTypes,omitempty"` + + // Name: Immutable. Name of the constraint. This is unique within the + // organization. Format of the name should be * + // `organizations/{organization_id}/customConstraints/{custom_constraint_ + // id}` Example: + // `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The + // max length is 70 characters and the minimum length is 1. Note that + // the prefix `organizations/{organization_id}/customConstraints/` is + // not counted. + Name string `json:"name,omitempty"` + + // ResourceTypes: Immutable. The resource instance type on which this + // policy applies. Format will be of the form : `/` Example: * + // `compute.googleapis.com/Instance`. + ResourceTypes []string `json:"resourceTypes,omitempty"` + + // UpdateTime: Output only. The last time this custom constraint was + // updated. This represents the last time that the + // `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActionType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2CustomConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2CustomConstraint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2Policy: Defines an organization policy which is +// used to specify constraints for configurations of Google Cloud +// resources. +type GoogleCloudOrgpolicyV2Policy struct { + // Alternate: Deprecated. + Alternate *GoogleCloudOrgpolicyV2AlternatePolicySpec `json:"alternate,omitempty"` + + // DryRunSpec: Dry-run policy. Audit-only policy, can be used to monitor + // how the policy would have impacted the existing and future resources + // if it's enforced. + DryRunSpec *GoogleCloudOrgpolicyV2PolicySpec `json:"dryRunSpec,omitempty"` + + // Name: Immutable. The resource name of the policy. Must be one of the + // following forms, where constraint_name is the name of the constraint + // which this policy configures: * + // `projects/{project_number}/policies/{constraint_name}` * + // `folders/{folder_id}/policies/{constraint_name}` * + // `organizations/{organization_id}/policies/{constraint_name}` For + // example, "projects/123/policies/compute.disableSerialPortAccess". + // Note: `projects/{project_id}/policies/{constraint_name}` is also an + // acceptable name for API requests, but responses will return the name + // using the equivalent project number. + Name string `json:"name,omitempty"` + + // Spec: Basic information about the Organization Policy. + Spec *GoogleCloudOrgpolicyV2PolicySpec `json:"spec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alternate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alternate") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2PolicySpec: Defines a Google Cloud policy +// specification which is used to specify constraints for configurations +// of Google Cloud resources. +type GoogleCloudOrgpolicyV2PolicySpec struct { + // Etag: An opaque tag indicating the current version of the policy, + // used for concurrency control. This field is ignored if used in a + // `CreatePolicy` request. When the policy` is returned from either a + // `GetPolicy` or a `ListPolicies` request, this `etag` indicates the + // version of the current policy to use when executing a + // read-modify-write loop. When the policy is returned from a + // `GetEffectivePolicy` request, the `etag` will be unset. + Etag string `json:"etag,omitempty"` + + // InheritFromParent: Determines the inheritance behavior for this + // policy. If `inherit_from_parent` is true, policy rules set higher up + // in the hierarchy (up to the closest root) are inherited and present + // in the effective policy. If it is false, then no rules are inherited, + // and this policy becomes the new root for evaluation. This field can + // be set only for policies which configure list constraints. + InheritFromParent bool `json:"inheritFromParent,omitempty"` + + // Reset: Ignores policies set above this resource and restores the + // `constraint_default` enforcement behavior of the specific constraint + // at this resource. This field can be set in policies for either list + // or boolean constraints. If set, `rules` must be empty and + // `inherit_from_parent` must be set to false. + Reset bool `json:"reset,omitempty"` + + // Rules: In policies for boolean constraints, the following + // requirements apply: - There must be one and only one policy rule + // where condition is unset. - Boolean policy rules with conditions must + // set `enforced` to the opposite of the policy rule without a + // condition. - During policy evaluation, policy rules with conditions + // that are true for a target resource take precedence. + Rules []*GoogleCloudOrgpolicyV2PolicySpecPolicyRule `json:"rules,omitempty"` + + // UpdateTime: Output only. The time stamp this was previously updated. + // This represents the last time a call to `CreatePolicy` or + // `UpdatePolicy` was made for that policy. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2PolicySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2PolicySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2PolicySpecPolicyRule: A rule used to express +// this policy. +type GoogleCloudOrgpolicyV2PolicySpecPolicyRule struct { + // AllowAll: Setting this to true means that all values are allowed. + // This field can be set only in policies for list constraints. + AllowAll bool `json:"allowAll,omitempty"` + + // Condition: A condition which determines whether this rule is used in + // the evaluation of the policy. When set, the `expression` field in the + // `Expr' must include from 1 to 10 subexpressions, joined by the "||" + // or "&&" operators. Each subexpression must be of the form + // "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or + // "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where + // key_name and value_name are the resource names for Label Keys and + // Values. These names are available from the Tag Manager Service. An + // example expression is: "resource.matchTag('123456789/environment, + // 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')". + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // DenyAll: Setting this to true means that all values are denied. This + // field can be set only in policies for list constraints. + DenyAll bool `json:"denyAll,omitempty"` + + // Enforce: If `true`, then the policy is enforced. If `false`, then any + // configuration is acceptable. This field can be set only in policies + // for boolean constraints. + Enforce bool `json:"enforce,omitempty"` + + // Values: List of values to be used for this policy rule. This field + // can be set only in policies for list constraints. + Values *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowAll") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowAll") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2PolicySpecPolicyRule) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2PolicySpecPolicyRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues: A message +// that holds specific allowed and denied values. This message can +// define specific values and subtrees of the Resource Manager resource +// hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed +// or denied. This is achieved by using the `under:` and optional `is:` +// prefixes. The `under:` prefix is used to denote resource subtree +// values. The `is:` prefix is used to denote specific values, and is +// required only if the value contains a ":". Values prefixed with "is:" +// are treated the same as values with no prefix. Ancestry subtrees must +// be in one of the following formats: - "projects/", e.g. +// "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - +// "organizations/", e.g. "organizations/1234" The `supports_under` +// field of the associated `Constraint` defines whether ancestry +// prefixes can be used. +type GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues struct { + // AllowedValues: List of values allowed at this resource. + AllowedValues []string `json:"allowedValues,omitempty"` + + // DeniedValues: List of values denied at this resource. + DeniedValues []string `json:"deniedValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowedValues") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedValues") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1AccessStateDiff: A summary and comparison // of the principal's access under the current (baseline) policies and // the proposed (simulated) policies for a single access tuple. @@ -1062,6 +1392,565 @@ func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe +// rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata +// is metadata about an OrgPolicyViolationsPreview generations +// operation. +type GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct { + // CustomConstraints: The OrgPolicy CustomConstraint changes to preview + // violations for. Any existing CustomConstraints with the same name + // will be overridden in the simulation. That is, violations will be + // determined as if all custom constraints in the overlay were + // instantiated. + CustomConstraints []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: The OrgPolicy changes to preview violations for. Any + // existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverl +// ay: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` + + // CustomConstraintParent: Resource the constraint is attached to. + // Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay struct { + // Policy: The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` + + // PolicyParent: The parent of the policy we are attaching to. Example: + // "projects/123456" + PolicyParent string `json:"policyParent,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 *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` + Name string `json:"name,omitempty"` + + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay `json:"overlay,omitempty"` + + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,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 *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCou +// nts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Number of scanned resources with zero violations. + Compliant int64 `json:"compliant,omitempty"` + + // Errors: Number of resources that returned an error when scanned. + Errors int64 `json:"errors,omitempty"` + + // Noncompliant: Number of scanned resources with at least one + // violation. + Noncompliant int64 `json:"noncompliant,omitempty"` + + // Scanned: Number of resources checked for compliance. Must equal: + // unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` + + // Unenforced: Number of resources where the constraint was not + // enforced, i.e. the Policy set `enforced: false` for that resource. + Unenforced int64 `json:"unenforced,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compliant") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper +// ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct { + // CustomConstraints: The OrgPolicy CustomConstraint changes to preview + // violations for. Any existing CustomConstraints with the same name + // will be overridden in the simulation. That is, violations will be + // determined as if all custom constraints in the overlay were + // instantiated. + CustomConstraints []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: The OrgPolicy changes to preview violations for. Any + // existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverla +// y: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` + + // CustomConstraintParent: Resource the constraint is attached to. + // Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { + // Policy: The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` + + // PolicyParent: The parent of the policy we are attaching to. Example: + // "projects/123456" + PolicyParent string `json:"policyParent,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 *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct { + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` + Name string `json:"name,omitempty"` + + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay `json:"overlay,omitempty"` + + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,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 *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCoun +// ts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Number of scanned resources with zero violations. + Compliant int64 `json:"compliant,omitempty"` + + // Errors: Number of resources that returned an error when scanned. + Errors int64 `json:"errors,omitempty"` + + // Noncompliant: Number of scanned resources with at least one + // violation. + Noncompliant int64 `json:"noncompliant,omitempty"` + + // Scanned: Number of resources checked for compliance. Must equal: + // unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` + + // Unenforced: Number of resources where the constraint was not + // enforced, i.e. the Policy set `enforced: false` for that resource. + Unenforced int64 `json:"unenforced,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compliant") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleIamV1AuditConfig: 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 diff --git a/policysimulator/v1alpha/policysimulator-api.json b/policysimulator/v1alpha/policysimulator-api.json index 33554397537..46ce30e6d1c 100644 --- a/policysimulator/v1alpha/policysimulator-api.json +++ b/policysimulator/v1alpha/policysimulator-api.json @@ -293,8 +293,101 @@ "organizations": { "resources": { "locations": { + "methods": { + "orgPolicyViolationsPreviews": { + "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "orgPolicyViolationsPreviews": { + "methods": { + "get": { + "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the OrgPolicyViolationsPreview to get.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent the violations are scoped to. Format: organizations/{organization}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -324,6 +417,46 @@ ] } } + }, + "orgPolicyViolations": { + "methods": { + "list": { + "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/orgPolicyViolations", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -521,9 +654,197 @@ } } }, - "revision": "20230304", + "revision": "20230723", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { + "GoogleCloudOrgpolicyV2AlternatePolicySpec": { + "description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.", + "id": "GoogleCloudOrgpolicyV2AlternatePolicySpec", + "properties": { + "launch": { + "description": "Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.", + "type": "string" + }, + "spec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Specify constraint for configurations of Google Cloud resources." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2CustomConstraint": { + "description": "A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.", + "id": "GoogleCloudOrgpolicyV2CustomConstraint", + "properties": { + "actionType": { + "description": "Allow or deny type.", + "enum": [ + "ACTION_TYPE_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "Unspecified. Results in an error.", + "Allowed action type.", + "Deny action type." + ], + "type": "string" + }, + "condition": { + "description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")'` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.", + "type": "string" + }, + "description": { + "description": "Detailed information about this custom policy constraint. The max length of the description is 2000 characters.", + "type": "string" + }, + "displayName": { + "description": "One line display name for the UI. The max length of the display_name is 200 characters.", + "type": "string" + }, + "methodTypes": { + "description": "All the operations being applied for this constraint.", + "items": { + "enum": [ + "METHOD_TYPE_UNSPECIFIED", + "CREATE", + "UPDATE", + "DELETE" + ], + "enumDescriptions": [ + "Unspecified. Results in an error.", + "Constraint applied when creating the resource.", + "Constraint applied when updating the resource.", + "Constraint applied when deleting the resource. Not supported yet." + ], + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.", + "type": "string" + }, + "resourceTypes": { + "description": "Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2Policy": { + "description": "Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.", + "id": "GoogleCloudOrgpolicyV2Policy", + "properties": { + "alternate": { + "$ref": "GoogleCloudOrgpolicyV2AlternatePolicySpec", + "deprecated": true, + "description": "Deprecated." + }, + "dryRunSpec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced." + }, + "name": { + "description": "Immutable. The resource name of the policy. Must be one of the following forms, where constraint_name is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, \"projects/123/policies/compute.disableSerialPortAccess\". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", + "type": "string" + }, + "spec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Basic information about the Organization Policy." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpec": { + "description": "Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.", + "id": "GoogleCloudOrgpolicyV2PolicySpec", + "properties": { + "etag": { + "description": "An opaque tag indicating the current version of the policy, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy` is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policy to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", + "type": "string" + }, + "inheritFromParent": { + "description": "Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.", + "type": "boolean" + }, + "reset": { + "description": "Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.", + "type": "boolean" + }, + "rules": { + "description": "In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.", + "items": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpecPolicyRule": { + "description": "A rule used to express this policy.", + "id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule", + "properties": { + "allowAll": { + "description": "Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.", + "type": "boolean" + }, + "condition": { + "$ref": "GoogleTypeExpr", + "description": "A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the \"||\" or \"\u0026\u0026\" operators. Each subexpression must be of the form \"resource.matchTag('/tag_key_short_name, 'tag_value_short_name')\". or \"resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')\". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: \"resource.matchTag('123456789/environment, 'prod')\". or \"resource.matchTagId('tagKeys/123', 'tagValues/456')\"." + }, + "denyAll": { + "description": "Setting this to true means that all values are denied. This field can be set only in policies for list constraints.", + "type": "boolean" + }, + "enforce": { + "description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", + "type": "boolean" + }, + "values": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", + "description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues": { + "description": "A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a \":\". Values prefixed with \"is:\" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - \"projects/\", e.g. \"projects/tokyo-rain-123\" - \"folders/\", e.g. \"folders/1234\" - \"organizations/\", e.g. \"organizations/1234\" The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used.", + "id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", + "properties": { + "allowedValues": { + "description": "List of values allowed at this resource.", + "items": { + "type": "string" + }, + "type": "array" + }, + "deniedValues": { + "description": "List of values denied at this resource.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1Replay": { "description": "A resource describing a `Replay`, or simulation.", "id": "GoogleCloudPolicysimulatorV1Replay", @@ -637,6 +958,445 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e. when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse": { + "description": "ListOrgPolicyViolationsPreviewsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.", + "id": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "orgPolicyViolationsPreviews": { + "description": "The list of OrgPolicyViolationsPreview", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse": { + "description": "ListOrgPolicyViolationsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolations", + "id": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "orgPolicyViolations": { + "description": "The list of OrgPolicyViolations", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay": { + "description": "The proposed changes to OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", + "properties": { + "customConstraints": { + "description": "The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay" + }, + "type": "array" + }, + "policies": { + "description": "The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay": { + "description": "A change to an OrgPolicy custom constraint.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The new or updated custom constraint." + }, + "customConstraintParent": { + "description": "Resource the constraint is attached to. Example: \"organization/987654\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay": { + "description": "A change to an OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay", + "properties": { + "policy": { + "$ref": "GoogleCloudOrgpolicyV2Policy", + "description": "The new or updated OrgPolicy." + }, + "policyParent": { + "description": "The parent of the policy we are attaching to. Example: \"projects/123456\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation": { + "description": "OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The custom constraint being violated." + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Any error encountered during the evaluation." + }, + "name": { + "description": "The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`", + "type": "string" + }, + "resource": { + "$ref": "GoogleCloudPolicysimulatorV1alphaResourceContext", + "description": "The resource violating the constraint." + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview": { + "description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview", + "properties": { + "name": { + "description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", + "readOnly": true, + "type": "string" + }, + "overlay": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", + "description": "Required. The proposed changes we are previewing violations for." + }, + "resourceCounts": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", + "description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the `OrgPolicyViolationsPreview`.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + }, + "violationsCount": { + "description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts": { + "description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", + "properties": { + "compliant": { + "description": "Number of scanned resources with zero violations.", + "format": "int32", + "type": "integer" + }, + "errors": { + "description": "Number of resources that returned an error when scanned.", + "format": "int32", + "type": "integer" + }, + "noncompliant": { + "description": "Number of scanned resources with at least one violation.", + "format": "int32", + "type": "integer" + }, + "scanned": { + "description": "Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", + "format": "int32", + "type": "integer" + }, + "unenforced": { + "description": "Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaResourceContext": { + "description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.", + "id": "GoogleCloudPolicysimulatorV1alphaResourceContext", + "properties": { + "ancestors": { + "description": "The ancestry path of the resource in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the resource is a project, folder, or organization, the ancestry path starts from the resource itself. Example: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`", + "items": { + "type": "string" + }, + "type": "array" + }, + "assetType": { + "description": "The asset type of the resource as defined by CAIS. Example: `compute.googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.", + "type": "string" + }, + "resource": { + "description": "The full name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e. when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay": { + "description": "The proposed changes to OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", + "properties": { + "customConstraints": { + "description": "The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay" + }, + "type": "array" + }, + "policies": { + "description": "The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay": { + "description": "A change to an OrgPolicy custom constraint.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The new or updated custom constraint." + }, + "customConstraintParent": { + "description": "Resource the constraint is attached to. Example: \"organization/987654\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay": { + "description": "A change to an OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay", + "properties": { + "policy": { + "$ref": "GoogleCloudOrgpolicyV2Policy", + "description": "The new or updated OrgPolicy." + }, + "policyParent": { + "description": "The parent of the policy we are attaching to. Example: \"projects/123456\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview": { + "description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview", + "properties": { + "name": { + "description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", + "readOnly": true, + "type": "string" + }, + "overlay": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", + "description": "Required. The proposed changes we are previewing violations for." + }, + "resourceCounts": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", + "description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the `OrgPolicyViolationsPreview`.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + }, + "violationsCount": { + "description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts": { + "description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", + "properties": { + "compliant": { + "description": "Number of scanned resources with zero violations.", + "format": "int32", + "type": "integer" + }, + "errors": { + "description": "Number of resources that returned an error when scanned.", + "format": "int32", + "type": "integer" + }, + "noncompliant": { + "description": "Number of scanned resources with at least one violation.", + "format": "int32", + "type": "integer" + }, + "scanned": { + "description": "Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", + "format": "int32", + "type": "integer" + }, + "unenforced": { + "description": "Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleIamV1AuditConfig": { "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": "GoogleIamV1AuditConfig", diff --git a/policysimulator/v1alpha/policysimulator-gen.go b/policysimulator/v1alpha/policysimulator-gen.go index d975e49bb31..86123064949 100644 --- a/policysimulator/v1alpha/policysimulator-gen.go +++ b/policysimulator/v1alpha/policysimulator-gen.go @@ -239,7 +239,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} - rs.OrgPolicyViolationsPreviews = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) + rs.OrgPolicyViolationsPreviews_ = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) rs.Replays = NewOrganizationsLocationsReplaysService(s) return rs } @@ -247,7 +247,7 @@ func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService type OrganizationsLocationsService struct { s *Service - OrgPolicyViolationsPreviews *OrganizationsLocationsOrgPolicyViolationsPreviewsService + OrgPolicyViolationsPreviews_ *OrganizationsLocationsOrgPolicyViolationsPreviewsService Replays *OrganizationsLocationsReplaysService } @@ -255,6 +255,7 @@ type OrganizationsLocationsService struct { func NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsService { rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsService{s: s} rs.Operations = NewOrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService(s) + rs.OrgPolicyViolations = NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s) return rs } @@ -262,6 +263,8 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsService struct { s *Service Operations *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService + + OrgPolicyViolations *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService } func NewOrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService { @@ -273,6 +276,15 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService struct { s *Service } +func NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService { + rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService{s: s} + return rs +} + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService struct { + s *Service +} + func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService { rs := &OrganizationsLocationsReplaysService{s: s} rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s) @@ -363,6 +375,336 @@ type ProjectsLocationsReplaysOperationsService struct { s *Service } +// GoogleCloudOrgpolicyV2AlternatePolicySpec: Similar to PolicySpec but +// with an extra 'launch' field for launch reference. The PolicySpec +// here is specific for dry-run/darklaunch. +type GoogleCloudOrgpolicyV2AlternatePolicySpec struct { + // Launch: Reference to the launch that will be used while audit logging + // and to control the launch. Should be set only in the alternate + // policy. + Launch string `json:"launch,omitempty"` + + // Spec: Specify constraint for configurations of Google Cloud + // resources. + Spec *GoogleCloudOrgpolicyV2PolicySpec `json:"spec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Launch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Launch") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2AlternatePolicySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2AlternatePolicySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2CustomConstraint: A custom constraint defined +// by customers which can *only* be applied to the given resource types +// and organization. By creating a custom constraint, customers can +// apply policies of this custom constraint. *Creating a custom +// constraint itself does NOT apply any policy enforcement*. +type GoogleCloudOrgpolicyV2CustomConstraint struct { + // ActionType: Allow or deny type. + // + // Possible values: + // "ACTION_TYPE_UNSPECIFIED" - Unspecified. Results in an error. + // "ALLOW" - Allowed action type. + // "DENY" - Deny action type. + ActionType string `json:"actionType,omitempty"` + + // Condition: Org policy condition/expression. For example: + // `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or, + // `resource.management.auto_upgrade == true` The max length of the + // condition is 1000 characters. + Condition string `json:"condition,omitempty"` + + // Description: Detailed information about this custom policy + // constraint. The max length of the description is 2000 characters. + Description string `json:"description,omitempty"` + + // DisplayName: One line display name for the UI. The max length of the + // display_name is 200 characters. + DisplayName string `json:"displayName,omitempty"` + + // MethodTypes: All the operations being applied for this constraint. + // + // Possible values: + // "METHOD_TYPE_UNSPECIFIED" - Unspecified. Results in an error. + // "CREATE" - Constraint applied when creating the resource. + // "UPDATE" - Constraint applied when updating the resource. + // "DELETE" - Constraint applied when deleting the resource. Not + // supported yet. + MethodTypes []string `json:"methodTypes,omitempty"` + + // Name: Immutable. Name of the constraint. This is unique within the + // organization. Format of the name should be * + // `organizations/{organization_id}/customConstraints/{custom_constraint_ + // id}` Example: + // `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The + // max length is 70 characters and the minimum length is 1. Note that + // the prefix `organizations/{organization_id}/customConstraints/` is + // not counted. + Name string `json:"name,omitempty"` + + // ResourceTypes: Immutable. The resource instance type on which this + // policy applies. Format will be of the form : `/` Example: * + // `compute.googleapis.com/Instance`. + ResourceTypes []string `json:"resourceTypes,omitempty"` + + // UpdateTime: Output only. The last time this custom constraint was + // updated. This represents the last time that the + // `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActionType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2CustomConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2CustomConstraint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2Policy: Defines an organization policy which is +// used to specify constraints for configurations of Google Cloud +// resources. +type GoogleCloudOrgpolicyV2Policy struct { + // Alternate: Deprecated. + Alternate *GoogleCloudOrgpolicyV2AlternatePolicySpec `json:"alternate,omitempty"` + + // DryRunSpec: Dry-run policy. Audit-only policy, can be used to monitor + // how the policy would have impacted the existing and future resources + // if it's enforced. + DryRunSpec *GoogleCloudOrgpolicyV2PolicySpec `json:"dryRunSpec,omitempty"` + + // Name: Immutable. The resource name of the policy. Must be one of the + // following forms, where constraint_name is the name of the constraint + // which this policy configures: * + // `projects/{project_number}/policies/{constraint_name}` * + // `folders/{folder_id}/policies/{constraint_name}` * + // `organizations/{organization_id}/policies/{constraint_name}` For + // example, "projects/123/policies/compute.disableSerialPortAccess". + // Note: `projects/{project_id}/policies/{constraint_name}` is also an + // acceptable name for API requests, but responses will return the name + // using the equivalent project number. + Name string `json:"name,omitempty"` + + // Spec: Basic information about the Organization Policy. + Spec *GoogleCloudOrgpolicyV2PolicySpec `json:"spec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alternate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alternate") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2PolicySpec: Defines a Google Cloud policy +// specification which is used to specify constraints for configurations +// of Google Cloud resources. +type GoogleCloudOrgpolicyV2PolicySpec struct { + // Etag: An opaque tag indicating the current version of the policy, + // used for concurrency control. This field is ignored if used in a + // `CreatePolicy` request. When the policy` is returned from either a + // `GetPolicy` or a `ListPolicies` request, this `etag` indicates the + // version of the current policy to use when executing a + // read-modify-write loop. When the policy is returned from a + // `GetEffectivePolicy` request, the `etag` will be unset. + Etag string `json:"etag,omitempty"` + + // InheritFromParent: Determines the inheritance behavior for this + // policy. If `inherit_from_parent` is true, policy rules set higher up + // in the hierarchy (up to the closest root) are inherited and present + // in the effective policy. If it is false, then no rules are inherited, + // and this policy becomes the new root for evaluation. This field can + // be set only for policies which configure list constraints. + InheritFromParent bool `json:"inheritFromParent,omitempty"` + + // Reset: Ignores policies set above this resource and restores the + // `constraint_default` enforcement behavior of the specific constraint + // at this resource. This field can be set in policies for either list + // or boolean constraints. If set, `rules` must be empty and + // `inherit_from_parent` must be set to false. + Reset bool `json:"reset,omitempty"` + + // Rules: In policies for boolean constraints, the following + // requirements apply: - There must be one and only one policy rule + // where condition is unset. - Boolean policy rules with conditions must + // set `enforced` to the opposite of the policy rule without a + // condition. - During policy evaluation, policy rules with conditions + // that are true for a target resource take precedence. + Rules []*GoogleCloudOrgpolicyV2PolicySpecPolicyRule `json:"rules,omitempty"` + + // UpdateTime: Output only. The time stamp this was previously updated. + // This represents the last time a call to `CreatePolicy` or + // `UpdatePolicy` was made for that policy. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2PolicySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2PolicySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2PolicySpecPolicyRule: A rule used to express +// this policy. +type GoogleCloudOrgpolicyV2PolicySpecPolicyRule struct { + // AllowAll: Setting this to true means that all values are allowed. + // This field can be set only in policies for list constraints. + AllowAll bool `json:"allowAll,omitempty"` + + // Condition: A condition which determines whether this rule is used in + // the evaluation of the policy. When set, the `expression` field in the + // `Expr' must include from 1 to 10 subexpressions, joined by the "||" + // or "&&" operators. Each subexpression must be of the form + // "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or + // "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where + // key_name and value_name are the resource names for Label Keys and + // Values. These names are available from the Tag Manager Service. An + // example expression is: "resource.matchTag('123456789/environment, + // 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')". + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // DenyAll: Setting this to true means that all values are denied. This + // field can be set only in policies for list constraints. + DenyAll bool `json:"denyAll,omitempty"` + + // Enforce: If `true`, then the policy is enforced. If `false`, then any + // configuration is acceptable. This field can be set only in policies + // for boolean constraints. + Enforce bool `json:"enforce,omitempty"` + + // Values: List of values to be used for this policy rule. This field + // can be set only in policies for list constraints. + Values *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowAll") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowAll") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2PolicySpecPolicyRule) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2PolicySpecPolicyRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues: A message +// that holds specific allowed and denied values. This message can +// define specific values and subtrees of the Resource Manager resource +// hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed +// or denied. This is achieved by using the `under:` and optional `is:` +// prefixes. The `under:` prefix is used to denote resource subtree +// values. The `is:` prefix is used to denote specific values, and is +// required only if the value contains a ":". Values prefixed with "is:" +// are treated the same as values with no prefix. Ancestry subtrees must +// be in one of the following formats: - "projects/", e.g. +// "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - +// "organizations/", e.g. "organizations/1234" The `supports_under` +// field of the associated `Constraint` defines whether ancestry +// prefixes can be used. +type GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues struct { + // AllowedValues: List of values allowed at this resource. + AllowedValues []string `json:"allowedValues,omitempty"` + + // DeniedValues: List of values denied at this resource. + DeniedValues []string `json:"deniedValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowedValues") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedValues") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, // or simulation. type GoogleCloudPolicysimulatorV1Replay struct { @@ -540,35 +882,43 @@ func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1AuditConfig: 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 GoogleIamV1AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` +// GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe +// rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata +// is metadata about an OrgPolicyViolationsPreview generations +// operation. +type GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,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"` + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -576,44 +926,38 @@ type GoogleIamV1AuditConfig struct { // 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 is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditConfig +func (s *GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1AuditLogConfig: 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 GoogleIamV1AuditLogConfig 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"` +// GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsRespon +// se: ListOrgPolicyViolationsPreviewsResponse is the response message +// for +// OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews. +type GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // results. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,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"` + // OrgPolicyViolationsPreviews: The list of OrgPolicyViolationsPreview + OrgPolicyViolationsPreviews []*GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview `json:"orgPolicyViolationsPreviews,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // 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 @@ -621,79 +965,37 @@ type GoogleIamV1AuditLogConfig struct { // 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 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 *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditLogConfig +func (s *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Binding: Associates `members`, or principals, with a -// `role`. -type GoogleIamV1Binding 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 *GoogleTypeExpr `json:"condition,omitempty"` +// GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse: +// ListOrgPolicyViolationsResponse is the response message for +// OrgPolicyViolationsPreviewService.ListOrgPolicyViolations +type GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // results. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,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`. * `domain:{domain}`: The G Suite - // domain (primary) that represents all the users of that domain. For - // example, `google.com` or `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. - Members []string `json:"members,omitempty"` + // OrgPolicyViolations: The list of OrgPolicyViolations + OrgPolicyViolations []*GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation `json:"orgPolicyViolations,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"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Condition") 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 @@ -701,105 +1003,72 @@ type GoogleIamV1Binding struct { // 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 + // 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 *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Binding +func (s *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Policy: 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 GoogleIamV1Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct { + // CustomConstraints: The OrgPolicy CustomConstraint changes to preview + // violations for. Any existing CustomConstraints with the same name + // will be overridden in the simulation. That is, violations will be + // determined as if all custom constraints in the overlay were + // instantiated. + CustomConstraints []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: The OrgPolicy changes to preview violations for. Any + // existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // 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 []*GoogleIamV1Binding `json:"bindings,omitempty"` + // NullFields is a list of field names (e.g. "CustomConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // 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"` +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // 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"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverl +// ay: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // CustomConstraintParent: Resource the constraint is attached to. + // Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -807,36 +1076,33 @@ type GoogleIamV1Policy struct { // 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 is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Policy +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse 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 []*GoogleLongrunningOperation `json:"operations,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay struct { + // Policy: The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // PolicyParent: The parent of the policy we are attaching to. Example: + // "projects/123456" + PolicyParent string `json:"policyParent,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // 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 @@ -844,61 +1110,114 @@ type GoogleLongrunningListOperationsResponse struct { // 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 + // 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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation 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"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation: +// OrgPolicyViolation is a resource representing a single resource +// violating a single OrgPolicy constraint. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation struct { + // CustomConstraint: The custom constraint being violated. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - // Error: The error result of the operation in case of failure or - // cancellation. + // Error: Any error encountered during the evaluation. Error *GoogleRpcStatus `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 name of the `OrgPolicyViolation`. Example: + // organizations/my-example-org/locations/global/orgPolicyViolationsPrevi + // ews/506a5f7f/orgPolicyViolations/38ce` + Name string `json:"name,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}`. + // Resource: The resource violating the constraint. + Resource *GoogleCloudPolicysimulatorV1alphaResourceContext `json:"resource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` 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"` + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay `json:"overlay,omitempty"` + + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,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 + // 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 @@ -906,7 +1225,7 @@ type GoogleLongrunningOperation struct { // 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 + // 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 @@ -915,34 +1234,35 @@ type GoogleLongrunningOperation struct { NullFields []string `json:"-"` } -func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleRpcStatus: 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 GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCou +// nts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Number of scanned resources with zero violations. + Compliant int64 `json:"compliant,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"` + // Errors: Number of resources that returned an error when scanned. + Errors int64 `json:"errors,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"` + // Noncompliant: Number of scanned resources with at least one + // violation. + Noncompliant int64 `json:"noncompliant,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to + // Scanned: Number of resources checked for compliance. Must equal: + // unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` + + // Unenforced: Number of resources where the constraint was not + // enforced, i.e. the Policy set `enforced: false` for that resource. + Unenforced int64 `json:"unenforced,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compliant") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -950,7 +1270,223 @@ type GoogleRpcStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API + // NullFields is a list of field names (e.g. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaResourceContext: ResourceContext +// provides the context we know about a resource. It is similar in +// concept to google.cloud.asset.v1.Resource, but focuses on the +// information specifically used by Simulator. +type GoogleCloudPolicysimulatorV1alphaResourceContext struct { + // Ancestors: The ancestry path of the resource in Google Cloud resource + // hierarchy + // (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path + // starts with the closest ancestor in the hierarchy and ends at root. + // If the resource is a project, folder, or organization, the ancestry + // path starts from the resource itself. Example: + // `["projects/123456789", "folders/5432", "organizations/1234"]` + Ancestors []string `json:"ancestors,omitempty"` + + // AssetType: The asset type of the resource as defined by CAIS. + // Example: `compute.googleapis.com/Firewall` See Supported asset types + // (https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + AssetType string `json:"assetType,omitempty"` + + // Resource: The full name of the resource. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instance + // s/instance1` See Resource names + // (https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + Resource string `json:"resource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ancestors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Ancestors") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaResourceContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaResourceContext + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper +// ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` + + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` + + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct { + // CustomConstraints: The OrgPolicy CustomConstraint changes to preview + // violations for. Any existing CustomConstraints with the same name + // will be overridden in the simulation. That is, violations will be + // determined as if all custom constraints in the overlay were + // instantiated. + CustomConstraints []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: The OrgPolicy changes to preview violations for. Any + // existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverla +// y: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` + + // CustomConstraintParent: Resource the constraint is attached to. + // Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { + // Policy: The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` + + // PolicyParent: The parent of the policy we are attaching to. Example: + // "projects/123456" + PolicyParent string `json:"policyParent,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 @@ -959,37 +1495,59 @@ type GoogleRpcStatus struct { NullFields []string `json:"-"` } -func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: Represents a whole or partial calendar date, such as -// a birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct { + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` + Name string `json:"name,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay `json:"overlay,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,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 @@ -997,7 +1555,7 @@ type GoogleTypeDate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API + // 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 @@ -1006,50 +1564,35 @@ type GoogleTypeDate struct { NullFields []string `json:"-"` } -func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeExpr: 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 GoogleTypeExpr 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"` +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCoun +// ts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Number of scanned resources with zero violations. + Compliant int64 `json:"compliant,omitempty"` - // Expression: Textual representation of an expression in Common - // Expression Language syntax. - Expression string `json:"expression,omitempty"` + // Errors: Number of resources that returned an error when scanned. + Errors int64 `json:"errors,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"` + // Noncompliant: Number of scanned resources with at least one + // violation. + Noncompliant int64 `json:"noncompliant,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"` + // Scanned: Number of resources checked for compliance. Must equal: + // unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // Unenforced: Number of resources where the constraint was not + // enforced, i.e. the Policy set `enforced: false` for that resource. + Unenforced int64 `json:"unenforced,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compliant") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1057,47 +1600,896 @@ type GoogleTypeExpr struct { // 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 + // NullFields is a list of field names (e.g. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeExpr +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get": +// GoogleIamV1AuditConfig: 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 GoogleIamV1AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` -type FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + // 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 *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditLogConfig: 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 GoogleIamV1AuditLogConfig 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 *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates `members`, or principals, with a +// `role`. +type GoogleIamV1Binding 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 *GoogleTypeExpr `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`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `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. + 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 *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: 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 GoogleIamV1Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*GoogleIamV1AuditConfig `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 []*GoogleIamV1Binding `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"` + + // 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 *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse 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 []*GoogleLongrunningOperation `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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation 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 *GoogleRpcStatus `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 *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleRpcStatus: 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 GoogleRpcStatus 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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeExpr: 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 GoogleTypeExpr 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 *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get": + +type FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c := &FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall{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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.orgPolicyViolationsPreviews.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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.operations.get": + +type FoldersLocationsReplaysOperationsGetCall 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 *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { + c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { + 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 *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { + 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 *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.operations.list": + +type FoldersLocationsReplaysOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { + c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c } -// 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { - c := &FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1107,7 +2499,7 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s // 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1115,21 +2507,21 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMat // 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1155,14 +2547,15 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1181,7 +2574,7 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1193,25 +2586,41 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts . } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get", + // "id": "policysimulator.folders.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1220,9 +2629,30 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts . } -// method id "policysimulator.folders.locations.replays.operations.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 *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type FoldersLocationsReplaysOperationsGetCall struct { +// method id "policysimulator.operations.get": + +type OperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1236,8 +2666,8 @@ type FoldersLocationsReplaysOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { - c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -1245,7 +2675,7 @@ func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLoca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1255,7 +2685,7 @@ func (c *FoldersLocationsReplaysOperationsGetCall) 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 *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -1263,21 +2693,21 @@ func (c *FoldersLocationsReplaysOperationsGetCall) 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 *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *OperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1303,14 +2733,14 @@ func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Do executes the "policysimulator.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1342,9 +2772,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "flatPath": "v1alpha/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.get", + // "id": "policysimulator.operations.get", // "parameterOrder": [ // "name" // ], @@ -1352,7 +2782,7 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^operations/.*$", // "required": true, // "type": "string" // } @@ -1368,9 +2798,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti } -// method id "policysimulator.folders.locations.replays.operations.list": +// method id "policysimulator.operations.list": -type FoldersLocationsReplaysOperationsListCall struct { +type OperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1384,29 +2814,29 @@ type FoldersLocationsReplaysOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { - c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OperationsService) List(name string) *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1414,7 +2844,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1424,7 +2854,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) 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 *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1432,21 +2862,21 @@ func (c *FoldersLocationsReplaysOperationsListCall) 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 *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { +func (c *OperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1472,7 +2902,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Do executes the "policysimulator.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -1480,7 +2910,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1512,9 +2942,9 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt 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`.", - // "flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + // "flatPath": "v1alpha/operations", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.list", + // "id": "policysimulator.operations.list", // "parameterOrder": [ // "name" // ], @@ -1527,7 +2957,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "pattern": "^operations$", // "required": true, // "type": "string" // }, @@ -1557,7 +2987,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -1575,9 +3005,157 @@ func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f } } -// method id "policysimulator.operations.get": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview +// generates an OrgPolicyViolationsPreview for the proposed changes in +// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes +// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources +// to scan are inferred from these specified changes. +// +// - parent: The organization under which this +// OrgPolicyViolationsPreview will be created. Example: +// `organizations/my-example-org/locations/global`. +func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview = googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) 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.googlecloudpolicysimulatorv1alphaorgpolicyviolationspreview) + 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}/orgPolicyViolationsPreviews") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get": -type OperationsGetCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1586,13 +3164,13 @@ type OperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: GetOrgPolicyViolationsPreview gets the specified +// OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is +// available for at least 7 days. // -// - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the OrgPolicyViolationsPreview to get. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -1600,7 +3178,7 @@ func (r *OperationsService) Get(name string) *OperationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1610,7 +3188,7 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -1618,21 +3196,21 @@ func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) 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_ { @@ -1658,14 +3236,17 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1684,7 +3265,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1696,25 +3277,25 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/operations/{operationsId}", + // "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", // "httpMethod": "GET", - // "id": "policysimulator.operations.get", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The name of the OrgPolicyViolationsPreview to get.", // "location": "path", - // "pattern": "^operations/.*$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1723,45 +3304,43 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } -// method id "policysimulator.operations.list": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list": -type OperationsListCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall 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`. +// List: ListOrgPolicyViolationsPreviews lists each +// OrgPolicyViolationsPreview in an organization. Each +// OrgPolicyViolationsPreview is available for at least 7 days. // -// - name: The name of the operation's parent resource. -func (r *OperationsService) List(name string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent the violations are scoped to. Format: +// organizations/{organization}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 5 items will be returned. The maximum value is +// 10; values above 10 will be coerced to 10. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1769,7 +3348,7 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1779,7 +3358,7 @@ func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1787,21 +3366,21 @@ func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsListCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) 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_ { @@ -1814,7 +3393,7 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/orgPolicyViolationsPreviews") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1822,20 +3401,22 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsRespo +// nse or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsRespo +// nse.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1854,7 +3435,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1866,41 +3447,36 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/operations", + // "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", // "httpMethod": "GET", - // "id": "policysimulator.operations.list", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^operations$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent the violations are scoped to. Format: organizations/{organization}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1912,7 +3488,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -2078,6 +3654,209 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do( } +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListOrgPolicyViolations lists the OrgPolicyViolations that are +// present in an OrgPolicyViolationsPreview. +// +// - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations +// from. Format: +// organizations/{organization}/locations/{location}/orgPolicyViolation +// sPreviews/{orgPolicyViolationsPreview}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 50 items will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) 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}/orgPolicyViolations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse.Serv +// erResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse{ + 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": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + // "flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/orgPolicyViolations", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse" + // }, + // "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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "policysimulator.organizations.locations.replays.operations.get": type OrganizationsLocationsReplaysOperationsGetCall struct { diff --git a/policysimulator/v1beta/policysimulator-api.json b/policysimulator/v1beta/policysimulator-api.json index 723b5301225..650e6aa603b 100644 --- a/policysimulator/v1beta/policysimulator-api.json +++ b/policysimulator/v1beta/policysimulator-api.json @@ -293,8 +293,101 @@ "organizations": { "resources": { "locations": { + "methods": { + "orgPolicyViolationsPreviews": { + "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "POST", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", + "request": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "orgPolicyViolationsPreviews": { + "methods": { + "get": { + "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the OrgPolicyViolationsPreview to get.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent the violations are scoped to. Format: organizations/{organization}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -324,6 +417,46 @@ ] } } + }, + "orgPolicyViolations": { + "methods": { + "list": { + "description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/orgPolicyViolations", + "response": { + "$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } }, @@ -521,9 +654,197 @@ } } }, - "revision": "20230312", + "revision": "20230723", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { + "GoogleCloudOrgpolicyV2AlternatePolicySpec": { + "description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.", + "id": "GoogleCloudOrgpolicyV2AlternatePolicySpec", + "properties": { + "launch": { + "description": "Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.", + "type": "string" + }, + "spec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Specify constraint for configurations of Google Cloud resources." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2CustomConstraint": { + "description": "A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.", + "id": "GoogleCloudOrgpolicyV2CustomConstraint", + "properties": { + "actionType": { + "description": "Allow or deny type.", + "enum": [ + "ACTION_TYPE_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "Unspecified. Results in an error.", + "Allowed action type.", + "Deny action type." + ], + "type": "string" + }, + "condition": { + "description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")'` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.", + "type": "string" + }, + "description": { + "description": "Detailed information about this custom policy constraint. The max length of the description is 2000 characters.", + "type": "string" + }, + "displayName": { + "description": "One line display name for the UI. The max length of the display_name is 200 characters.", + "type": "string" + }, + "methodTypes": { + "description": "All the operations being applied for this constraint.", + "items": { + "enum": [ + "METHOD_TYPE_UNSPECIFIED", + "CREATE", + "UPDATE", + "DELETE" + ], + "enumDescriptions": [ + "Unspecified. Results in an error.", + "Constraint applied when creating the resource.", + "Constraint applied when updating the resource.", + "Constraint applied when deleting the resource. Not supported yet." + ], + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.", + "type": "string" + }, + "resourceTypes": { + "description": "Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2Policy": { + "description": "Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.", + "id": "GoogleCloudOrgpolicyV2Policy", + "properties": { + "alternate": { + "$ref": "GoogleCloudOrgpolicyV2AlternatePolicySpec", + "deprecated": true, + "description": "Deprecated." + }, + "dryRunSpec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced." + }, + "name": { + "description": "Immutable. The resource name of the policy. Must be one of the following forms, where constraint_name is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, \"projects/123/policies/compute.disableSerialPortAccess\". Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", + "type": "string" + }, + "spec": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpec", + "description": "Basic information about the Organization Policy." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpec": { + "description": "Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.", + "id": "GoogleCloudOrgpolicyV2PolicySpec", + "properties": { + "etag": { + "description": "An opaque tag indicating the current version of the policy, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy` is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policy to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", + "type": "string" + }, + "inheritFromParent": { + "description": "Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.", + "type": "boolean" + }, + "reset": { + "description": "Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.", + "type": "boolean" + }, + "rules": { + "description": "In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.", + "items": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpecPolicyRule": { + "description": "A rule used to express this policy.", + "id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule", + "properties": { + "allowAll": { + "description": "Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.", + "type": "boolean" + }, + "condition": { + "$ref": "GoogleTypeExpr", + "description": "A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the \"||\" or \"\u0026\u0026\" operators. Each subexpression must be of the form \"resource.matchTag('/tag_key_short_name, 'tag_value_short_name')\". or \"resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')\". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: \"resource.matchTag('123456789/environment, 'prod')\". or \"resource.matchTagId('tagKeys/123', 'tagValues/456')\"." + }, + "denyAll": { + "description": "Setting this to true means that all values are denied. This field can be set only in policies for list constraints.", + "type": "boolean" + }, + "enforce": { + "description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", + "type": "boolean" + }, + "values": { + "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", + "description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." + } + }, + "type": "object" + }, + "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues": { + "description": "A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a \":\". Values prefixed with \"is:\" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - \"projects/\", e.g. \"projects/tokyo-rain-123\" - \"folders/\", e.g. \"folders/1234\" - \"organizations/\", e.g. \"organizations/1234\" The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used.", + "id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", + "properties": { + "allowedValues": { + "description": "List of values allowed at this resource.", + "items": { + "type": "string" + }, + "type": "array" + }, + "deniedValues": { + "description": "List of values denied at this resource.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudPolicysimulatorV1Replay": { "description": "A resource describing a `Replay`, or simulation.", "id": "GoogleCloudPolicysimulatorV1Replay", @@ -637,6 +958,445 @@ }, "type": "object" }, + "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e. when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay": { + "description": "The proposed changes to OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", + "properties": { + "customConstraints": { + "description": "The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay" + }, + "type": "array" + }, + "policies": { + "description": "The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay": { + "description": "A change to an OrgPolicy custom constraint.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The new or updated custom constraint." + }, + "customConstraintParent": { + "description": "Resource the constraint is attached to. Example: \"organization/987654\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay": { + "description": "A change to an OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay", + "properties": { + "policy": { + "$ref": "GoogleCloudOrgpolicyV2Policy", + "description": "The new or updated OrgPolicy." + }, + "policyParent": { + "description": "The parent of the policy we are attaching to. Example: \"projects/123456\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview": { + "description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview", + "properties": { + "name": { + "description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", + "readOnly": true, + "type": "string" + }, + "overlay": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", + "description": "Required. The proposed changes we are previewing violations for." + }, + "resourceCounts": { + "$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", + "description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the `OrgPolicyViolationsPreview`.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + }, + "violationsCount": { + "description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts": { + "description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", + "properties": { + "compliant": { + "description": "Number of scanned resources with zero violations.", + "format": "int32", + "type": "integer" + }, + "errors": { + "description": "Number of resources that returned an error when scanned.", + "format": "int32", + "type": "integer" + }, + "noncompliant": { + "description": "Number of scanned resources with at least one violation.", + "format": "int32", + "type": "integer" + }, + "scanned": { + "description": "Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", + "format": "int32", + "type": "integer" + }, + "unenforced": { + "description": "Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { + "description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", + "id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", + "properties": { + "requestTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + }, + "resourcesFound": { + "description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", + "format": "int32", + "type": "integer" + }, + "resourcesPending": { + "description": "Number of resources still to scan.", + "format": "int32", + "type": "integer" + }, + "resourcesScanned": { + "description": "Number of resources already scanned.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Time when the request started processing, i.e. when the state was set to RUNNING.", + "format": "google-datetime", + "type": "string" + }, + "state": { + "description": "The current state of the operation.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse": { + "description": "ListOrgPolicyViolationsPreviewsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.", + "id": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "orgPolicyViolationsPreviews": { + "description": "The list of OrgPolicyViolationsPreview", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse": { + "description": "ListOrgPolicyViolationsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolations", + "id": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse", + "properties": { + "nextPageToken": { + "description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "orgPolicyViolations": { + "description": "The list of OrgPolicyViolations", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay": { + "description": "The proposed changes to OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", + "properties": { + "customConstraints": { + "description": "The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay" + }, + "type": "array" + }, + "policies": { + "description": "The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", + "items": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay": { + "description": "A change to an OrgPolicy custom constraint.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The new or updated custom constraint." + }, + "customConstraintParent": { + "description": "Resource the constraint is attached to. Example: \"organization/987654\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay": { + "description": "A change to an OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay", + "properties": { + "policy": { + "$ref": "GoogleCloudOrgpolicyV2Policy", + "description": "The new or updated OrgPolicy." + }, + "policyParent": { + "description": "The parent of the policy we are attaching to. Example: \"projects/123456\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyViolation": { + "description": "OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolation", + "properties": { + "customConstraint": { + "$ref": "GoogleCloudOrgpolicyV2CustomConstraint", + "description": "The custom constraint being violated." + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Any error encountered during the evaluation." + }, + "name": { + "description": "The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`", + "type": "string" + }, + "resource": { + "$ref": "GoogleCloudPolicysimulatorV1betaResourceContext", + "description": "The resource violating the constraint." + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview": { + "description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview", + "properties": { + "name": { + "description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", + "readOnly": true, + "type": "string" + }, + "overlay": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", + "description": "Required. The proposed changes we are previewing violations for." + }, + "resourceCounts": { + "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", + "description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the `OrgPolicyViolationsPreview`.", + "enum": [ + "PREVIEW_STATE_UNSPECIFIED", + "PREVIEW_PENDING", + "PREVIEW_RUNNING", + "PREVIEW_SUCCEEDED", + "PREVIEW_FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The OrgPolicyViolationsPreview has not been created yet.", + "The OrgPolicyViolationsPreview is currently being created.", + "The OrgPolicyViolationsPreview creation finished successfully.", + "The OrgPolicyViolationsPreview creation failed with an error." + ], + "readOnly": true, + "type": "string" + }, + "violationsCount": { + "description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", + "format": "int32", + "readOnly": true, + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts": { + "description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", + "id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", + "properties": { + "compliant": { + "description": "Number of scanned resources with zero violations.", + "format": "int32", + "type": "integer" + }, + "errors": { + "description": "Number of resources that returned an error when scanned.", + "format": "int32", + "type": "integer" + }, + "noncompliant": { + "description": "Number of scanned resources with at least one violation.", + "format": "int32", + "type": "integer" + }, + "scanned": { + "description": "Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", + "format": "int32", + "type": "integer" + }, + "unenforced": { + "description": "Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1betaResourceContext": { + "description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.", + "id": "GoogleCloudPolicysimulatorV1betaResourceContext", + "properties": { + "ancestors": { + "description": "The ancestry path of the resource in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the resource is a project, folder, or organization, the ancestry path starts from the resource itself. Example: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`", + "items": { + "type": "string" + }, + "type": "array" + }, + "assetType": { + "description": "The asset type of the resource as defined by CAIS. Example: `compute.googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.", + "type": "string" + }, + "resource": { + "description": "The full name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.", + "type": "string" + } + }, + "type": "object" + }, "GoogleIamV1AuditConfig": { "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": "GoogleIamV1AuditConfig", diff --git a/policysimulator/v1beta/policysimulator-gen.go b/policysimulator/v1beta/policysimulator-gen.go index e67c5666ef5..a59fd841a1e 100644 --- a/policysimulator/v1beta/policysimulator-gen.go +++ b/policysimulator/v1beta/policysimulator-gen.go @@ -239,7 +239,7 @@ type OrganizationsService struct { func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService { rs := &OrganizationsLocationsService{s: s} - rs.OrgPolicyViolationsPreviews = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) + rs.OrgPolicyViolationsPreviews_ = NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s) rs.Replays = NewOrganizationsLocationsReplaysService(s) return rs } @@ -247,7 +247,7 @@ func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService type OrganizationsLocationsService struct { s *Service - OrgPolicyViolationsPreviews *OrganizationsLocationsOrgPolicyViolationsPreviewsService + OrgPolicyViolationsPreviews_ *OrganizationsLocationsOrgPolicyViolationsPreviewsService Replays *OrganizationsLocationsReplaysService } @@ -255,6 +255,7 @@ type OrganizationsLocationsService struct { func NewOrganizationsLocationsOrgPolicyViolationsPreviewsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsService { rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsService{s: s} rs.Operations = NewOrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService(s) + rs.OrgPolicyViolations = NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s) return rs } @@ -262,6 +263,8 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsService struct { s *Service Operations *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService + + OrgPolicyViolations *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService } func NewOrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService { @@ -273,6 +276,15 @@ type OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsService struct { s *Service } +func NewOrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService(s *Service) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService { + rs := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService{s: s} + return rs +} + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService struct { + s *Service +} + func NewOrganizationsLocationsReplaysService(s *Service) *OrganizationsLocationsReplaysService { rs := &OrganizationsLocationsReplaysService{s: s} rs.Operations = NewOrganizationsLocationsReplaysOperationsService(s) @@ -363,6 +375,336 @@ type ProjectsLocationsReplaysOperationsService struct { s *Service } +// GoogleCloudOrgpolicyV2AlternatePolicySpec: Similar to PolicySpec but +// with an extra 'launch' field for launch reference. The PolicySpec +// here is specific for dry-run/darklaunch. +type GoogleCloudOrgpolicyV2AlternatePolicySpec struct { + // Launch: Reference to the launch that will be used while audit logging + // and to control the launch. Should be set only in the alternate + // policy. + Launch string `json:"launch,omitempty"` + + // Spec: Specify constraint for configurations of Google Cloud + // resources. + Spec *GoogleCloudOrgpolicyV2PolicySpec `json:"spec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Launch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Launch") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2AlternatePolicySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2AlternatePolicySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2CustomConstraint: A custom constraint defined +// by customers which can *only* be applied to the given resource types +// and organization. By creating a custom constraint, customers can +// apply policies of this custom constraint. *Creating a custom +// constraint itself does NOT apply any policy enforcement*. +type GoogleCloudOrgpolicyV2CustomConstraint struct { + // ActionType: Allow or deny type. + // + // Possible values: + // "ACTION_TYPE_UNSPECIFIED" - Unspecified. Results in an error. + // "ALLOW" - Allowed action type. + // "DENY" - Deny action type. + ActionType string `json:"actionType,omitempty"` + + // Condition: Org policy condition/expression. For example: + // `resource.instanceName.matches("[production|test]_.*_(\d)+")'` or, + // `resource.management.auto_upgrade == true` The max length of the + // condition is 1000 characters. + Condition string `json:"condition,omitempty"` + + // Description: Detailed information about this custom policy + // constraint. The max length of the description is 2000 characters. + Description string `json:"description,omitempty"` + + // DisplayName: One line display name for the UI. The max length of the + // display_name is 200 characters. + DisplayName string `json:"displayName,omitempty"` + + // MethodTypes: All the operations being applied for this constraint. + // + // Possible values: + // "METHOD_TYPE_UNSPECIFIED" - Unspecified. Results in an error. + // "CREATE" - Constraint applied when creating the resource. + // "UPDATE" - Constraint applied when updating the resource. + // "DELETE" - Constraint applied when deleting the resource. Not + // supported yet. + MethodTypes []string `json:"methodTypes,omitempty"` + + // Name: Immutable. Name of the constraint. This is unique within the + // organization. Format of the name should be * + // `organizations/{organization_id}/customConstraints/{custom_constraint_ + // id}` Example: + // `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The + // max length is 70 characters and the minimum length is 1. Note that + // the prefix `organizations/{organization_id}/customConstraints/` is + // not counted. + Name string `json:"name,omitempty"` + + // ResourceTypes: Immutable. The resource instance type on which this + // policy applies. Format will be of the form : `/` Example: * + // `compute.googleapis.com/Instance`. + ResourceTypes []string `json:"resourceTypes,omitempty"` + + // UpdateTime: Output only. The last time this custom constraint was + // updated. This represents the last time that the + // `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ActionType") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActionType") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2CustomConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2CustomConstraint + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2Policy: Defines an organization policy which is +// used to specify constraints for configurations of Google Cloud +// resources. +type GoogleCloudOrgpolicyV2Policy struct { + // Alternate: Deprecated. + Alternate *GoogleCloudOrgpolicyV2AlternatePolicySpec `json:"alternate,omitempty"` + + // DryRunSpec: Dry-run policy. Audit-only policy, can be used to monitor + // how the policy would have impacted the existing and future resources + // if it's enforced. + DryRunSpec *GoogleCloudOrgpolicyV2PolicySpec `json:"dryRunSpec,omitempty"` + + // Name: Immutable. The resource name of the policy. Must be one of the + // following forms, where constraint_name is the name of the constraint + // which this policy configures: * + // `projects/{project_number}/policies/{constraint_name}` * + // `folders/{folder_id}/policies/{constraint_name}` * + // `organizations/{organization_id}/policies/{constraint_name}` For + // example, "projects/123/policies/compute.disableSerialPortAccess". + // Note: `projects/{project_id}/policies/{constraint_name}` is also an + // acceptable name for API requests, but responses will return the name + // using the equivalent project number. + Name string `json:"name,omitempty"` + + // Spec: Basic information about the Organization Policy. + Spec *GoogleCloudOrgpolicyV2PolicySpec `json:"spec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Alternate") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Alternate") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2PolicySpec: Defines a Google Cloud policy +// specification which is used to specify constraints for configurations +// of Google Cloud resources. +type GoogleCloudOrgpolicyV2PolicySpec struct { + // Etag: An opaque tag indicating the current version of the policy, + // used for concurrency control. This field is ignored if used in a + // `CreatePolicy` request. When the policy` is returned from either a + // `GetPolicy` or a `ListPolicies` request, this `etag` indicates the + // version of the current policy to use when executing a + // read-modify-write loop. When the policy is returned from a + // `GetEffectivePolicy` request, the `etag` will be unset. + Etag string `json:"etag,omitempty"` + + // InheritFromParent: Determines the inheritance behavior for this + // policy. If `inherit_from_parent` is true, policy rules set higher up + // in the hierarchy (up to the closest root) are inherited and present + // in the effective policy. If it is false, then no rules are inherited, + // and this policy becomes the new root for evaluation. This field can + // be set only for policies which configure list constraints. + InheritFromParent bool `json:"inheritFromParent,omitempty"` + + // Reset: Ignores policies set above this resource and restores the + // `constraint_default` enforcement behavior of the specific constraint + // at this resource. This field can be set in policies for either list + // or boolean constraints. If set, `rules` must be empty and + // `inherit_from_parent` must be set to false. + Reset bool `json:"reset,omitempty"` + + // Rules: In policies for boolean constraints, the following + // requirements apply: - There must be one and only one policy rule + // where condition is unset. - Boolean policy rules with conditions must + // set `enforced` to the opposite of the policy rule without a + // condition. - During policy evaluation, policy rules with conditions + // that are true for a target resource take precedence. + Rules []*GoogleCloudOrgpolicyV2PolicySpecPolicyRule `json:"rules,omitempty"` + + // UpdateTime: Output only. The time stamp this was previously updated. + // This represents the last time a call to `CreatePolicy` or + // `UpdatePolicy` was made for that policy. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Etag") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Etag") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2PolicySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2PolicySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2PolicySpecPolicyRule: A rule used to express +// this policy. +type GoogleCloudOrgpolicyV2PolicySpecPolicyRule struct { + // AllowAll: Setting this to true means that all values are allowed. + // This field can be set only in policies for list constraints. + AllowAll bool `json:"allowAll,omitempty"` + + // Condition: A condition which determines whether this rule is used in + // the evaluation of the policy. When set, the `expression` field in the + // `Expr' must include from 1 to 10 subexpressions, joined by the "||" + // or "&&" operators. Each subexpression must be of the form + // "resource.matchTag('/tag_key_short_name, 'tag_value_short_name')". or + // "resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')". where + // key_name and value_name are the resource names for Label Keys and + // Values. These names are available from the Tag Manager Service. An + // example expression is: "resource.matchTag('123456789/environment, + // 'prod')". or "resource.matchTagId('tagKeys/123', 'tagValues/456')". + Condition *GoogleTypeExpr `json:"condition,omitempty"` + + // DenyAll: Setting this to true means that all values are denied. This + // field can be set only in policies for list constraints. + DenyAll bool `json:"denyAll,omitempty"` + + // Enforce: If `true`, then the policy is enforced. If `false`, then any + // configuration is acceptable. This field can be set only in policies + // for boolean constraints. + Enforce bool `json:"enforce,omitempty"` + + // Values: List of values to be used for this policy rule. This field + // can be set only in policies for list constraints. + Values *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowAll") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowAll") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2PolicySpecPolicyRule) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2PolicySpecPolicyRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues: A message +// that holds specific allowed and denied values. This message can +// define specific values and subtrees of the Resource Manager resource +// hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed +// or denied. This is achieved by using the `under:` and optional `is:` +// prefixes. The `under:` prefix is used to denote resource subtree +// values. The `is:` prefix is used to denote specific values, and is +// required only if the value contains a ":". Values prefixed with "is:" +// are treated the same as values with no prefix. Ancestry subtrees must +// be in one of the following formats: - "projects/", e.g. +// "projects/tokyo-rain-123" - "folders/", e.g. "folders/1234" - +// "organizations/", e.g. "organizations/1234" The `supports_under` +// field of the associated `Constraint` defines whether ancestry +// prefixes can be used. +type GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues struct { + // AllowedValues: List of values allowed at this resource. + AllowedValues []string `json:"allowedValues,omitempty"` + + // DeniedValues: List of values denied at this resource. + DeniedValues []string `json:"deniedValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowedValues") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowedValues") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudPolicysimulatorV1Replay: A resource describing a `Replay`, // or simulation. type GoogleCloudPolicysimulatorV1Replay struct { @@ -540,35 +882,43 @@ func (s *GoogleCloudPolicysimulatorV1ReplayResultsSummary) MarshalJSON() ([]byte return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1AuditConfig: 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 GoogleIamV1AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of - // permission. - AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` +// GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOpe +// rationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata +// is metadata about an OrgPolicyViolationsPreview generations +// operation. +type GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,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"` + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,omitempty"` + + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,omitempty"` + + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` + + // State: The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "RequestTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -576,7 +926,46 @@ type GoogleIamV1AuditConfig struct { // 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 + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay struct { + // CustomConstraints: The OrgPolicy CustomConstraint changes to preview + // violations for. Any existing CustomConstraints with the same name + // will be overridden in the simulation. That is, violations will be + // determined as if all custom constraints in the overlay were + // instantiated. + CustomConstraints []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: The OrgPolicy changes to preview violations for. Any + // existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraints") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -586,34 +975,23 @@ type GoogleIamV1AuditConfig struct { NullFields []string `json:"-"` } -func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditConfig +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1AuditLogConfig: 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 GoogleIamV1AuditLogConfig 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"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverl +// ay: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,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"` + // CustomConstraintParent: Resource the constraint is attached to. + // Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -621,7 +999,7 @@ type GoogleIamV1AuditLogConfig struct { // 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 + // NullFields is a list of field names (e.g. "CustomConstraint") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -631,69 +1009,23 @@ type GoogleIamV1AuditLogConfig struct { NullFields []string `json:"-"` } -func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditLogConfig +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Binding: Associates `members`, or principals, with a -// `role`. -type GoogleIamV1Binding 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 *GoogleTypeExpr `json:"condition,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay struct { + // Policy: The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,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`. * `domain:{domain}`: The G Suite - // domain (primary) that represents all the users of that domain. For - // example, `google.com` or `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. - 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"` + // PolicyParent: The parent of the policy we are attaching to. Example: + // "projects/123456" + PolicyParent string `json:"policyParent,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // 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 @@ -701,8 +1033,8 @@ type GoogleIamV1Binding struct { // 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 + // 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. @@ -710,96 +1042,59 @@ type GoogleIamV1Binding struct { NullFields []string `json:"-"` } -func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Binding +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleIamV1Policy: 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 GoogleIamV1Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this - // policy. - AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview struct { + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` + Name string `json:"name,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 []*GoogleIamV1Binding `json:"bindings,omitempty"` + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay `json:"overlay,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"` + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,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"` + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,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 @@ -807,36 +1102,44 @@ type GoogleIamV1Policy struct { // 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 + // 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 *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Policy +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCou +// nts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Number of scanned resources with zero violations. + Compliant int64 `json:"compliant,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + // Errors: Number of resources that returned an error when scanned. + Errors int64 `json:"errors,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Noncompliant: Number of scanned resources with at least one + // violation. + Noncompliant int64 `json:"noncompliant,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // Scanned: Number of resources checked for compliance. Must equal: + // unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` + + // Unenforced: Number of resources where the constraint was not + // enforced, i.e. the Policy set `enforced: false` for that resource. + Unenforced int64 `json:"unenforced,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compliant") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -844,61 +1147,57 @@ type GoogleLongrunningListOperationsResponse struct { // 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 + // NullFields is a list of field names (e.g. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s *GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation 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"` +// GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOper +// ationMetadata: GenerateOrgPolicyViolationsPreviewOperationMetadata is +// metadata about an OrgPolicyViolationsPreview generations operation. +type GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata struct { + // RequestTime: Time when the request was received. + RequestTime string `json:"requestTime,omitempty"` - // Error: The error result of the operation in case of failure or - // cancellation. - Error *GoogleRpcStatus `json:"error,omitempty"` + // ResourcesFound: Total number of resources that need scanning. Should + // equal resource_scanned + resources_pending + ResourcesFound int64 `json:"resourcesFound,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"` + // ResourcesPending: Number of resources still to scan. + ResourcesPending int64 `json:"resourcesPending,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"` + // ResourcesScanned: Number of resources already scanned. + ResourcesScanned int64 `json:"resourcesScanned,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"` + // StartTime: Time when the request started processing, i.e. when the + // state was set to RUNNING. + StartTime string `json:"startTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // State: The current state of the operation. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "Done") to + // ForceSendFields is a list of field names (e.g. "RequestTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -906,43 +1205,38 @@ type GoogleLongrunningOperation struct { // 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 + // NullFields is a list of field names (e.g. "RequestTime") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s *GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleRpcStatus: 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 GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` +// GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsRespons +// e: ListOrgPolicyViolationsPreviewsResponse is the response message +// for +// OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews. +type GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // results. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,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"` + // OrgPolicyViolationsPreviews: The list of OrgPolicyViolationsPreview + OrgPolicyViolationsPreviews []*GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview `json:"orgPolicyViolationsPreviews,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"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Code") 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 @@ -950,46 +1244,37 @@ type GoogleRpcStatus struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: Represents a whole or partial calendar date, such as -// a birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` +// GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse: +// ListOrgPolicyViolationsResponse is the response message for +// OrgPolicyViolationsPreviewService.ListOrgPolicyViolations +type GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse struct { + // NextPageToken: A token that you can use to retrieve the next page of + // results. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` + // OrgPolicyViolations: The list of OrgPolicyViolations + OrgPolicyViolations []*GoogleCloudPolicysimulatorV1betaOrgPolicyViolation `json:"orgPolicyViolations,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Day") 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 @@ -997,59 +1282,147 @@ type GoogleTypeDate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an + // 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 *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay: The proposed +// changes to OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay struct { + // CustomConstraints: The OrgPolicy CustomConstraint changes to preview + // violations for. Any existing CustomConstraints with the same name + // will be overridden in the simulation. That is, violations will be + // determined as if all custom constraints in the overlay were + // instantiated. + CustomConstraints []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay `json:"customConstraints,omitempty"` + + // Policies: The OrgPolicy changes to preview violations for. Any + // existing OrgPolicies with the same name will be overridden in the + // simulation. That is, violations will be determined as if all policies + // in the overlay were created or updated. + Policies []*GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay `json:"policies,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraints") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraints") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverla +// y: A change to an OrgPolicy custom constraint. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay struct { + // CustomConstraint: The new or updated custom constraint. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` + + // CustomConstraintParent: Resource the constraint is attached to. + // Example: "organization/987654" + CustomConstraintParent string `json:"customConstraintParent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay: A +// change to an OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay struct { + // Policy: The new or updated OrgPolicy. + Policy *GoogleCloudOrgpolicyV2Policy `json:"policy,omitempty"` + + // PolicyParent: The parent of the policy we are attaching to. Example: + // "projects/123456" + PolicyParent string `json:"policyParent,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 *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeExpr: 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 GoogleTypeExpr 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"` +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolation: +// OrgPolicyViolation is a resource representing a single resource +// violating a single OrgPolicy constraint. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolation struct { + // CustomConstraint: The custom constraint being violated. + CustomConstraint *GoogleCloudOrgpolicyV2CustomConstraint `json:"customConstraint,omitempty"` - // Expression: Textual representation of an expression in Common - // Expression Language syntax. - Expression string `json:"expression,omitempty"` + // Error: Any error encountered during the evaluation. + Error *GoogleRpcStatus `json:"error,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"` + // Name: The name of the `OrgPolicyViolation`. Example: + // organizations/my-example-org/locations/global/orgPolicyViolationsPrevi + // ews/506a5f7f/orgPolicyViolations/38ce` + Name string `json:"name,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"` + // Resource: The resource violating the constraint. + Resource *GoogleCloudPolicysimulatorV1betaResourceContext `json:"resource,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to + // ForceSendFields is a list of field names (e.g. "CustomConstraint") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -1057,47 +1430,1066 @@ type GoogleTypeExpr struct { // 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 + // NullFields is a list of field names (e.g. "CustomConstraint") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview: +// OrgPolicyViolationsPreview is a resource providing a preview of the +// violations that will exist if an OrgPolicy change is made. The list +// of violations are modeled as child resources and retrieved via a +// ListOrgPolicyViolations API call. There are potentially more +// OrgPolicyViolations than could fit in an embedded field. Thus, the +// use of a child resource instead of a field. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview struct { + // Name: Output only. The resource name of the + // `OrgPolicyViolationsPreview`. It has the following format: + // `organizations/{organization}/locations/{location}/orgPolicyViolations + // Previews/{orgPolicyViolationsPreview}` Example: + // `organizations/my-example-org/locations/global/orgPolicyViolationsPrev + // iews/506a5f7f` + Name string `json:"name,omitempty"` + + // Overlay: Required. The proposed changes we are previewing violations + // for. + Overlay *GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay `json:"overlay,omitempty"` + + // ResourceCounts: Output only. A summary of the state of all resources + // scanned for compliance with the changed OrgPolicy. + ResourceCounts *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts `json:"resourceCounts,omitempty"` + + // State: Output only. The state of the `OrgPolicyViolationsPreview`. + // + // Possible values: + // "PREVIEW_STATE_UNSPECIFIED" - The state is unspecified. + // "PREVIEW_PENDING" - The OrgPolicyViolationsPreview has not been + // created yet. + // "PREVIEW_RUNNING" - The OrgPolicyViolationsPreview is currently + // being created. + // "PREVIEW_SUCCEEDED" - The OrgPolicyViolationsPreview creation + // finished successfully. + // "PREVIEW_FAILED" - The OrgPolicyViolationsPreview creation failed + // with an error. + State string `json:"state,omitempty"` + + // ViolationsCount: Output only. The number of OrgPolicyViolations in + // this `OrgPolicyViolationsPreview`. This count may differ from + // `resource_summary.noncompliant_count` because each OrgPolicyViolation + // is specific to a resource **and** constraint. If there are multiple + // constraints being evaluated (i.e. multiple policies in the overlay), + // a single resource may violate multiple constraints. + ViolationsCount int64 `json:"violationsCount,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 *GoogleTypeExpr) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeExpr +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// method id "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get": +// GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCoun +// ts: A summary of the state of all resources scanned for compliance +// with the changed OrgPolicy. +type GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts struct { + // Compliant: Number of scanned resources with zero violations. + Compliant int64 `json:"compliant,omitempty"` -type FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + // Errors: Number of resources that returned an error when scanned. + Errors int64 `json:"errors,omitempty"` + + // Noncompliant: Number of scanned resources with at least one + // violation. + Noncompliant int64 `json:"noncompliant,omitempty"` + + // Scanned: Number of resources checked for compliance. Must equal: + // unenforced + noncompliant + compliant + error + Scanned int64 `json:"scanned,omitempty"` + + // Unenforced: Number of resources where the constraint was not + // enforced, i.e. the Policy set `enforced: false` for that resource. + Unenforced int64 `json:"unenforced,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Compliant") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Compliant") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudPolicysimulatorV1betaResourceContext: ResourceContext +// provides the context we know about a resource. It is similar in +// concept to google.cloud.asset.v1.Resource, but focuses on the +// information specifically used by Simulator. +type GoogleCloudPolicysimulatorV1betaResourceContext struct { + // Ancestors: The ancestry path of the resource in Google Cloud resource + // hierarchy + // (https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path + // starts with the closest ancestor in the hierarchy and ends at root. + // If the resource is a project, folder, or organization, the ancestry + // path starts from the resource itself. Example: + // `["projects/123456789", "folders/5432", "organizations/1234"]` + Ancestors []string `json:"ancestors,omitempty"` + + // AssetType: The asset type of the resource as defined by CAIS. + // Example: `compute.googleapis.com/Firewall` See Supported asset types + // (https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + AssetType string `json:"assetType,omitempty"` + + // Resource: The full name of the resource. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instance + // s/instance1` See Resource names + // (https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + Resource string `json:"resource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Ancestors") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Ancestors") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudPolicysimulatorV1betaResourceContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudPolicysimulatorV1betaResourceContext + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditConfig: 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 GoogleIamV1AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + AuditLogConfigs []*GoogleIamV1AuditLogConfig `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 *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1AuditLogConfig: 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 GoogleIamV1AuditLogConfig 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 *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1AuditLogConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates `members`, or principals, with a +// `role`. +type GoogleIamV1Binding 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 *GoogleTypeExpr `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`. * `domain:{domain}`: The G Suite + // domain (primary) that represents all the users of that domain. For + // example, `google.com` or `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. + 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 *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: 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 GoogleIamV1Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*GoogleIamV1AuditConfig `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 []*GoogleIamV1Binding `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"` + + // 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 *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse 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 []*GoogleLongrunningOperation `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 *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation 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 *GoogleRpcStatus `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 *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleRpcStatus: 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 GoogleRpcStatus 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 *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeExpr: 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 GoogleTypeExpr 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 *GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get": + +type FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + c := &FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall{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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { + 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) 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, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.orgPolicyViolationsPreviews.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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.operations.get": + +type FoldersLocationsReplaysOperationsGetCall 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 *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { + c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { + 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 *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { + 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 *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + 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, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "policysimulator.folders.locations.replays.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.folders.locations.replays.operations.list": + +type FoldersLocationsReplaysOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { + c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("filter", filter) + return c } -// 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsService) Get(name string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { - c := &FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1107,7 +2499,7 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Fields(s // 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1115,21 +2507,21 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) IfNoneMat // 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 *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Context(ctx context.Context) *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall { +func (c *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Header() http.Header { +func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1155,14 +2547,15 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1181,7 +2574,7 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1193,25 +2586,41 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts . } 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": "v1beta/folders/{foldersId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get", + // "id": "policysimulator.folders.locations.replays.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1220,9 +2629,30 @@ func (c *FoldersLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do(opts . } -// method id "policysimulator.folders.locations.replays.operations.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 *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type FoldersLocationsReplaysOperationsGetCall struct { +// method id "policysimulator.operations.get": + +type OperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1236,8 +2666,8 @@ type FoldersLocationsReplaysOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLocationsReplaysOperationsGetCall { - c := &FoldersLocationsReplaysOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OperationsService) Get(name string) *OperationsGetCall { + c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -1245,7 +2675,7 @@ func (r *FoldersLocationsReplaysOperationsService) Get(name string) *FoldersLoca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsGetCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1255,7 +2685,7 @@ func (c *FoldersLocationsReplaysOperationsGetCall) 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 *FoldersLocationsReplaysOperationsGetCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -1263,21 +2693,21 @@ func (c *FoldersLocationsReplaysOperationsGetCall) 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 *FoldersLocationsReplaysOperationsGetCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsGetCall { +func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsGetCall) Header() http.Header { +func (c *OperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1303,14 +2733,14 @@ func (c *FoldersLocationsReplaysOperationsGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.get" call. +// Do executes the "policysimulator.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1342,9 +2772,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti 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": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + // "flatPath": "v1beta/operations/{operationsId}", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.get", + // "id": "policysimulator.operations.get", // "parameterOrder": [ // "name" // ], @@ -1352,7 +2782,7 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + // "pattern": "^operations/.*$", // "required": true, // "type": "string" // } @@ -1368,9 +2798,9 @@ func (c *FoldersLocationsReplaysOperationsGetCall) Do(opts ...googleapi.CallOpti } -// method id "policysimulator.folders.locations.replays.operations.list": +// method id "policysimulator.operations.list": -type FoldersLocationsReplaysOperationsListCall struct { +type OperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1384,29 +2814,29 @@ type FoldersLocationsReplaysOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *FoldersLocationsReplaysOperationsService) List(name string) *FoldersLocationsReplaysOperationsListCall { - c := &FoldersLocationsReplaysOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *OperationsService) List(name string) *OperationsListCall { + c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *FoldersLocationsReplaysOperationsListCall) Filter(filter string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Filter(filter string) *OperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *FoldersLocationsReplaysOperationsListCall) PageSize(pageSize int64) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1414,7 +2844,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *FoldersLocationsReplaysOperationsListCall) Fields(s ...googleapi.Field) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1424,7 +2854,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) 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 *FoldersLocationsReplaysOperationsListCall) IfNoneMatch(entityTag string) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1432,21 +2862,21 @@ func (c *FoldersLocationsReplaysOperationsListCall) 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 *FoldersLocationsReplaysOperationsListCall) Context(ctx context.Context) *FoldersLocationsReplaysOperationsListCall { +func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *FoldersLocationsReplaysOperationsListCall) Header() http.Header { +func (c *OperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -1472,7 +2902,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.folders.locations.replays.operations.list" call. +// Do executes the "policysimulator.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -1480,7 +2910,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) doRequest(alt string) (*http // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1512,9 +2942,9 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt 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`.", - // "flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + // "flatPath": "v1beta/operations", // "httpMethod": "GET", - // "id": "policysimulator.folders.locations.replays.operations.list", + // "id": "policysimulator.operations.list", // "parameterOrder": [ // "name" // ], @@ -1527,7 +2957,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + // "pattern": "^operations$", // "required": true, // "type": "string" // }, @@ -1557,7 +2987,7 @@ func (c *FoldersLocationsReplaysOperationsListCall) Do(opts ...googleapi.CallOpt // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -1575,9 +3005,157 @@ func (c *FoldersLocationsReplaysOperationsListCall) Pages(ctx context.Context, f } } -// method id "policysimulator.operations.get": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsCall struct { + s *Service + parent string + googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// OrgPolicyViolationsPreviews: GenerateOrgPolicyViolationsPreview +// generates an OrgPolicyViolationsPreview for the proposed changes in +// the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes +// to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources +// to scan are inferred from these specified changes. +// +// - parent: The organization under which this +// OrgPolicyViolationsPreview will be created. Example: +// `organizations/my-example-org/locations/global`. +func (r *OrganizationsLocationsService) OrgPolicyViolationsPreviews(parent string, googlecloudpolicysimulatorv1betaorgpolicyviolationspreview *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview = googlecloudpolicysimulatorv1betaorgpolicyviolationspreview + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) 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.googlecloudpolicysimulatorv1betaorgpolicyviolationspreview) + 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, "v1beta/{+parent}/orgPolicyViolationsPreviews") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews" 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", + // "httpMethod": "POST", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", + // "request": { + // "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get": -type OperationsGetCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -1586,13 +3164,13 @@ type OperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: GetOrgPolicyViolationsPreview gets the specified +// OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is +// available for at least 7 days. // -// - name: The name of the operation resource. -func (r *OperationsService) Get(name string) *OperationsGetCall { - c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the OrgPolicyViolationsPreview to get. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) Get(name string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -1600,7 +3178,7 @@ func (r *OperationsService) Get(name string) *OperationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1610,7 +3188,7 @@ func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -1618,21 +3196,21 @@ func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsGetCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) 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_ { @@ -1658,14 +3236,17 @@ func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1684,7 +3265,7 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1696,25 +3277,25 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/operations/{operationsId}", + // "description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", // "httpMethod": "GET", - // "id": "policysimulator.operations.get", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The name of the OrgPolicyViolationsPreview to get.", // "location": "path", - // "pattern": "^operations/.*$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1723,45 +3304,43 @@ func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunning } -// method id "policysimulator.operations.list": +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list": -type OperationsListCall struct { +type OrganizationsLocationsOrgPolicyViolationsPreviewsListCall 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`. +// List: ListOrgPolicyViolationsPreviews lists each +// OrgPolicyViolationsPreview in an organization. Each +// OrgPolicyViolationsPreview is available for at least 7 days. // -// - name: The name of the operation's parent resource. -func (r *OperationsService) List(name string) *OperationsListCall { - c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *OperationsListCall) Filter(filter string) *OperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent the violations are scoped to. Format: +// organizations/{organization}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 5 items will be returned. The maximum value is +// 10; values above 10 will be coerced to 10. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1769,7 +3348,7 @@ func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1779,7 +3358,7 @@ func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.ifNoneMatch_ = entityTag return c } @@ -1787,21 +3366,21 @@ func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *OperationsListCall) Header() http.Header { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) 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_ { @@ -1814,7 +3393,7 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/orgPolicyViolationsPreviews") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1822,20 +3401,22 @@ func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "policysimulator.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsRespon +// se or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsRespon +// 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1854,7 +3435,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1866,41 +3447,36 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/operations", + // "description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", // "httpMethod": "GET", - // "id": "policysimulator.operations.list", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^operations$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent the violations are scoped to. Format: organizations/{organization}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/orgPolicyViolationsPreviews", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -1912,7 +3488,7 @@ func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -2078,6 +3654,209 @@ func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOperationsGetCall) Do( } +// method id "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list": + +type OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: ListOrgPolicyViolations lists the OrgPolicyViolations that are +// present in an OrgPolicyViolationsPreview. +// +// - parent: The OrgPolicyViolationsPreview to get OrgPolicyViolations +// from. Format: +// organizations/{organization}/locations/{location}/orgPolicyViolation +// sPreviews/{orgPolicyViolationsPreview}. +func (r *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsService) List(parent string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c := &OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of items to return. The service may return fewer than this value. If +// unspecified, at most 50 items will be returned. The maximum value is +// 1000; values above 1000 will be coerced to 1000. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageSize(pageSize int64) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters must match the +// call that provided the page token. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) PageToken(pageToken string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Context(ctx context.Context) *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall { + 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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) 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, "v1beta/{+parent}/orgPolicyViolations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list" call. +// Exactly one of +// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse.Serve +// rResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse{ + 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": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", + // "flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", + // "httpMethod": "GET", + // "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/orgPolicyViolations", + // "response": { + // "$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse" + // }, + // "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 *OrganizationsLocationsOrgPolicyViolationsPreviewsOrgPolicyViolationsListCall) Pages(ctx context.Context, f func(*GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "policysimulator.organizations.locations.replays.operations.get": type OrganizationsLocationsReplaysOperationsGetCall struct { diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 830c540efdb..bc1509c052f 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -2059,7 +2059,7 @@ } } }, - "revision": "20230713", + "revision": "20230720", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5366,20 +5366,6 @@ "Used for Retail Search." ], "type": "string" - }, - "searchSolutionUseCase": { - "description": "Search solution use case that the project has enrolled.", - "enum": [ - "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED", - "SEARCH_SOLUTION_USE_CASE_SEARCH", - "SEARCH_SOLUTION_USE_CASE_BROWSE" - ], - "enumDescriptions": [ - "The value when it's unspecified. In this case, server behavior defaults to SEARCH_SOLUTION_USE_CASE_SEARCH.", - "Search use case. Expects the traffic has a non-empty query.", - "Browse use case. Expects the traffic has an empty query." - ], - "type": "string" } }, "type": "object" diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 40e123ff558..df8a78780a7 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -6712,19 +6712,6 @@ type GoogleCloudRetailV2alphaEnrollSolutionResponse struct { // "SOLUTION_TYPE_SEARCH" - Used for Retail Search. EnrolledSolution string `json:"enrolledSolution,omitempty"` - // SearchSolutionUseCase: Search solution use case that the project has - // enrolled. - // - // Possible values: - // "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED" - The value when it's - // unspecified. In this case, server behavior defaults to - // SEARCH_SOLUTION_USE_CASE_SEARCH. - // "SEARCH_SOLUTION_USE_CASE_SEARCH" - Search use case. Expects the - // traffic has a non-empty query. - // "SEARCH_SOLUTION_USE_CASE_BROWSE" - Browse use case. Expects the - // traffic has an empty query. - SearchSolutionUseCase string `json:"searchSolutionUseCase,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnrolledSolution") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index b6e053308a0..4098702c67b 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2329,7 +2329,7 @@ } } }, - "revision": "20230713", + "revision": "20230720", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -3753,20 +3753,6 @@ "Used for Retail Search." ], "type": "string" - }, - "searchSolutionUseCase": { - "description": "Search solution use case that the project has enrolled.", - "enum": [ - "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED", - "SEARCH_SOLUTION_USE_CASE_SEARCH", - "SEARCH_SOLUTION_USE_CASE_BROWSE" - ], - "enumDescriptions": [ - "The value when it's unspecified. In this case, server behavior defaults to SEARCH_SOLUTION_USE_CASE_SEARCH.", - "Search use case. Expects the traffic has a non-empty query.", - "Browse use case. Expects the traffic has an empty query." - ], - "type": "string" } }, "type": "object" diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index da1ba7b6e4d..2ab6d481772 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -2917,19 +2917,6 @@ type GoogleCloudRetailV2alphaEnrollSolutionResponse struct { // "SOLUTION_TYPE_SEARCH" - Used for Retail Search. EnrolledSolution string `json:"enrolledSolution,omitempty"` - // SearchSolutionUseCase: Search solution use case that the project has - // enrolled. - // - // Possible values: - // "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED" - The value when it's - // unspecified. In this case, server behavior defaults to - // SEARCH_SOLUTION_USE_CASE_SEARCH. - // "SEARCH_SOLUTION_USE_CASE_SEARCH" - Search use case. Expects the - // traffic has a non-empty query. - // "SEARCH_SOLUTION_USE_CASE_BROWSE" - Browse use case. Expects the - // traffic has an empty query. - SearchSolutionUseCase string `json:"searchSolutionUseCase,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnrolledSolution") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 3a7816a1025..674dd88cfc9 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2087,7 +2087,7 @@ } } }, - "revision": "20230713", + "revision": "20230720", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2798,20 +2798,6 @@ "Used for Retail Search." ], "type": "string" - }, - "searchSolutionUseCase": { - "description": "Search solution use case that the project has enrolled.", - "enum": [ - "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED", - "SEARCH_SOLUTION_USE_CASE_SEARCH", - "SEARCH_SOLUTION_USE_CASE_BROWSE" - ], - "enumDescriptions": [ - "The value when it's unspecified. In this case, server behavior defaults to SEARCH_SOLUTION_USE_CASE_SEARCH.", - "Search use case. Expects the traffic has a non-empty query.", - "Browse use case. Expects the traffic has an empty query." - ], - "type": "string" } }, "type": "object" diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 83171959a2c..071b89cf38b 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -1556,19 +1556,6 @@ type GoogleCloudRetailV2alphaEnrollSolutionResponse struct { // "SOLUTION_TYPE_SEARCH" - Used for Retail Search. EnrolledSolution string `json:"enrolledSolution,omitempty"` - // SearchSolutionUseCase: Search solution use case that the project has - // enrolled. - // - // Possible values: - // "SEARCH_SOLUTION_USE_CASE_UNSPECIFIED" - The value when it's - // unspecified. In this case, server behavior defaults to - // SEARCH_SOLUTION_USE_CASE_SEARCH. - // "SEARCH_SOLUTION_USE_CASE_SEARCH" - Search use case. Expects the - // traffic has a non-empty query. - // "SEARCH_SOLUTION_USE_CASE_BROWSE" - Browse use case. Expects the - // traffic has an empty query. - SearchSolutionUseCase string `json:"searchSolutionUseCase,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnrolledSolution") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any