From c165b1fd904eb1db84003b7256576ecc4d984457 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jun 2022 07:13:46 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- assuredworkloads/v1/assuredworkloads-api.json | 19 +- assuredworkloads/v1/assuredworkloads-gen.go | 36 + bigquery/v2/bigquery-api.json | 32 +- bigquery/v2/bigquery-gen.go | 56 +- composer/v1beta1/composer-api.json | 4 +- composer/v1beta1/composer-gen.go | 4 +- container/v1beta1/container-api.json | 232 ++- container/v1beta1/container-gen.go | 442 +++- .../v1.1/doubleclickbidmanager-api.json | 14 +- .../v1.1/doubleclickbidmanager-gen.go | 3 + recommender/v1/recommender-api.json | 376 +++- recommender/v1/recommender-gen.go | 1784 +++++++++++++++-- .../v1/streetviewpublish-api.json | 7 +- streetviewpublish/v1/streetviewpublish-gen.go | 3 + 14 files changed, 2831 insertions(+), 181 deletions(-) diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 302404d64ac..a047962da0f 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -379,7 +379,7 @@ } } }, - "revision": "20220609", + "revision": "20220623", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { @@ -1163,6 +1163,11 @@ ], "type": "string" }, + "complianceStatus": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus", + "description": "Output only. Count of active Violations in the Workload.", + "readOnly": true + }, "createTime": { "description": "Output only. Immutable. The Workload creation timestamp.", "format": "google-datetime", @@ -1261,6 +1266,18 @@ }, "type": "object" }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus": { + "description": "Represents the Compliance Status of this workload", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus", + "properties": { + "activeViolationCount": { + "description": "Optional. Count of active Violations in the Workload.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings": { "description": "Settings specific to resources needed for FedRAMP High.", "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings", diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index 92b13421e75..0d1c45a7495 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -1248,6 +1248,10 @@ type GoogleCloudAssuredworkloadsVersioningV1mainWorkload struct { // "ITAR" - International Traffic in Arms Regulations ComplianceRegime string `json:"complianceRegime,omitempty"` + // ComplianceStatus: Output only. Count of active Violations in the + // Workload. + ComplianceStatus *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus `json:"complianceStatus,omitempty"` + // CreateTime: Output only. Immutable. The Workload creation timestamp. CreateTime string `json:"createTime,omitempty"` @@ -1384,6 +1388,38 @@ func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings) Marsha return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus: +// Represents the Compliance Status of this workload +type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus struct { + // ActiveViolationCount: Optional. Count of active Violations in the + // Workload. + ActiveViolationCount int64 `json:"activeViolationCount,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ActiveViolationCount") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ActiveViolationCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings // : Settings specific to resources needed for FedRAMP High. type GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings struct { diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index c98a3577fcd..d9fe9a296c6 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1710,7 +1710,7 @@ } } }, - "revision": "20220528", + "revision": "20220611", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -5561,6 +5561,11 @@ "format": "int64", "type": "string" }, + "estimatedRunnableUnits": { + "description": "Units of work that can be scheduled immediately. Providing additional slots for these units of work will speed up the query, provided no other query in the reservation needs additional slots.", + "format": "int64", + "type": "string" + }, "pendingUnits": { "description": "Total parallel units of work remaining for the active stages.", "format": "int64", @@ -6217,6 +6222,11 @@ "$ref": "MaterializedViewDefinition", "description": "[Optional] Materialized view definition." }, + "maxStaleness": { + "description": "[Optional] Max staleness of data that could be returned when table or materialized view is queried (formatted as Google SQL Interval type).", + "format": "byte", + "type": "string" + }, "model": { "$ref": "ModelDefinition", "description": "[Output-only, Beta] Present iff this table represents a ML model. Describes the training information for the model, and it is required to run 'PREDICT' queries." @@ -7199,6 +7209,11 @@ "format": "int64", "type": "string" }, + "maxTimeSeriesLength": { + "description": "Get truncated length by last n points in time series. Use separately from time_series_length_fraction and min_time_series_length.", + "format": "int64", + "type": "string" + }, "maxTreeDepth": { "description": "Maximum depth of a tree for boosted tree models.", "format": "int64", @@ -7214,6 +7229,11 @@ "format": "double", "type": "number" }, + "minTimeSeriesLength": { + "description": "Set fast trend ARIMA_PLUS model minimum training length. Use in pair with time_series_length_fraction.", + "format": "int64", + "type": "string" + }, "minTreeChildWeight": { "description": "Minimum sum of instance weight needed in a child for boosted tree models.", "format": "int64", @@ -7290,6 +7310,11 @@ }, "type": "array" }, + "timeSeriesLengthFraction": { + "description": "Get truncated length by fraction in time series.", + "format": "double", + "type": "number" + }, "timeSeriesTimestampColumn": { "description": "Column to be designated as time series timestamp for ARIMA model.", "type": "string" @@ -7312,6 +7337,11 @@ ], "type": "string" }, + "trendSmoothingWindowSize": { + "description": "The smoothing window size for the trend component of the time series.", + "format": "int64", + "type": "string" + }, "userColumn": { "description": "User column specified for matrix factorization models.", "type": "string" diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 7a473a49afc..909a9d9a6e2 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -6606,6 +6606,12 @@ type QueryTimelineSample struct { // ElapsedMs: Milliseconds elapsed since the start of query execution. ElapsedMs int64 `json:"elapsedMs,omitempty,string"` + // EstimatedRunnableUnits: Units of work that can be scheduled + // immediately. Providing additional slots for these units of work will + // speed up the query, provided no other query in the reservation needs + // additional slots. + EstimatedRunnableUnits int64 `json:"estimatedRunnableUnits,omitempty,string"` + // PendingUnits: Total parallel units of work remaining for the active // stages. PendingUnits int64 `json:"pendingUnits,omitempty,string"` @@ -7709,6 +7715,11 @@ type Table struct { // MaterializedView: [Optional] Materialized view definition. MaterializedView *MaterializedViewDefinition `json:"materializedView,omitempty"` + // MaxStaleness: [Optional] Max staleness of data that could be returned + // when table or materialized view is queried (formatted as Google SQL + // Interval type). + MaxStaleness string `json:"maxStaleness,omitempty"` + // Model: [Output-only, Beta] Present iff this table represents a ML // model. Describes the training information for the model, and it is // required to run 'PREDICT' queries. @@ -8897,6 +8908,11 @@ type TrainingOptions struct { // MaxParallelTrials: Maximum number of trials to run in parallel. MaxParallelTrials int64 `json:"maxParallelTrials,omitempty,string"` + // MaxTimeSeriesLength: Get truncated length by last n points in time + // series. Use separately from time_series_length_fraction and + // min_time_series_length. + MaxTimeSeriesLength int64 `json:"maxTimeSeriesLength,omitempty,string"` + // MaxTreeDepth: Maximum depth of a tree for boosted tree models. MaxTreeDepth int64 `json:"maxTreeDepth,omitempty,string"` @@ -8908,6 +8924,10 @@ type TrainingOptions struct { // MinSplitLoss: Minimum split loss for boosted tree models. MinSplitLoss float64 `json:"minSplitLoss,omitempty"` + // MinTimeSeriesLength: Set fast trend ARIMA_PLUS model minimum training + // length. Use in pair with time_series_length_fraction. + MinTimeSeriesLength int64 `json:"minTimeSeriesLength,omitempty,string"` + // MinTreeChildWeight: Minimum sum of instance weight needed in a child // for boosted tree models. MinTreeChildWeight int64 `json:"minTreeChildWeight,omitempty,string"` @@ -8971,6 +8991,10 @@ type TrainingOptions struct { // ARIMA model training. TimeSeriesIdColumns []string `json:"timeSeriesIdColumns,omitempty"` + // TimeSeriesLengthFraction: Get truncated length by fraction in time + // series. + TimeSeriesLengthFraction float64 `json:"timeSeriesLengthFraction,omitempty"` + // TimeSeriesTimestampColumn: Column to be designated as time series // timestamp for ARIMA model. TimeSeriesTimestampColumn string `json:"timeSeriesTimestampColumn,omitempty"` @@ -8986,6 +9010,10 @@ type TrainingOptions struct { // "HIST" - Fast histogram optimized approximate greedy algorithm. TreeMethod string `json:"treeMethod,omitempty"` + // TrendSmoothingWindowSize: The smoothing window size for the trend + // component of the time series. + TrendSmoothingWindowSize int64 `json:"trendSmoothingWindowSize,omitempty,string"` + // UserColumn: User column specified for matrix factorization models. UserColumn string `json:"userColumn,omitempty"` @@ -9023,19 +9051,20 @@ func (s *TrainingOptions) MarshalJSON() ([]byte, error) { func (s *TrainingOptions) UnmarshalJSON(data []byte) error { type NoMethod TrainingOptions var s1 struct { - ColsampleBylevel gensupport.JSONFloat64 `json:"colsampleBylevel"` - ColsampleBynode gensupport.JSONFloat64 `json:"colsampleBynode"` - ColsampleBytree gensupport.JSONFloat64 `json:"colsampleBytree"` - DataSplitEvalFraction gensupport.JSONFloat64 `json:"dataSplitEvalFraction"` - Dropout gensupport.JSONFloat64 `json:"dropout"` - InitialLearnRate gensupport.JSONFloat64 `json:"initialLearnRate"` - L1Regularization gensupport.JSONFloat64 `json:"l1Regularization"` - L2Regularization gensupport.JSONFloat64 `json:"l2Regularization"` - LearnRate gensupport.JSONFloat64 `json:"learnRate"` - MinRelativeProgress gensupport.JSONFloat64 `json:"minRelativeProgress"` - MinSplitLoss gensupport.JSONFloat64 `json:"minSplitLoss"` - Subsample gensupport.JSONFloat64 `json:"subsample"` - WalsAlpha gensupport.JSONFloat64 `json:"walsAlpha"` + ColsampleBylevel gensupport.JSONFloat64 `json:"colsampleBylevel"` + ColsampleBynode gensupport.JSONFloat64 `json:"colsampleBynode"` + ColsampleBytree gensupport.JSONFloat64 `json:"colsampleBytree"` + DataSplitEvalFraction gensupport.JSONFloat64 `json:"dataSplitEvalFraction"` + Dropout gensupport.JSONFloat64 `json:"dropout"` + InitialLearnRate gensupport.JSONFloat64 `json:"initialLearnRate"` + L1Regularization gensupport.JSONFloat64 `json:"l1Regularization"` + L2Regularization gensupport.JSONFloat64 `json:"l2Regularization"` + LearnRate gensupport.JSONFloat64 `json:"learnRate"` + MinRelativeProgress gensupport.JSONFloat64 `json:"minRelativeProgress"` + MinSplitLoss gensupport.JSONFloat64 `json:"minSplitLoss"` + Subsample gensupport.JSONFloat64 `json:"subsample"` + TimeSeriesLengthFraction gensupport.JSONFloat64 `json:"timeSeriesLengthFraction"` + WalsAlpha gensupport.JSONFloat64 `json:"walsAlpha"` *NoMethod } s1.NoMethod = (*NoMethod)(s) @@ -9054,6 +9083,7 @@ func (s *TrainingOptions) UnmarshalJSON(data []byte) error { s.MinRelativeProgress = float64(s1.MinRelativeProgress) s.MinSplitLoss = float64(s1.MinSplitLoss) s.Subsample = float64(s1.Subsample) + s.TimeSeriesLengthFraction = float64(s1.TimeSeriesLengthFraction) s.WalsAlpha = float64(s1.WalsAlpha) return nil } diff --git a/composer/v1beta1/composer-api.json b/composer/v1beta1/composer-api.json index 6a9bcf30607..1b63bc57149 100644 --- a/composer/v1beta1/composer-api.json +++ b/composer/v1beta1/composer-api.json @@ -298,7 +298,7 @@ "type": "string" }, "updateMask": { - "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", + "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.softwareConfig.cloudDataLineageIntegration` * Configuration for Cloud Data Lineage integration. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -518,7 +518,7 @@ } } }, - "revision": "20220512", + "revision": "20220622", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AllowedIpRange": { diff --git a/composer/v1beta1/composer-gen.go b/composer/v1beta1/composer-gen.go index 705900f227a..2898d394836 100644 --- a/composer/v1beta1/composer-gen.go +++ b/composer/v1beta1/composer-gen.go @@ -2928,6 +2928,8 @@ func (r *ProjectsLocationsEnvironmentsService) Patch(name string, environment *E // than the number of nodes must be provided in the // `config.softwareConfig.schedulerCount` field. Supported for Cloud // Composer environments in versions composer-1.*.*-airflow-2.*.*. * +// `config.softwareConfig.cloudDataLineageIntegration` * Configuration +// for Cloud Data Lineage integration. * // `config.databaseConfig.machineType` * Cloud SQL machine type used by // Airflow database. It has to be one of: db-n1-standard-2, // db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported @@ -3057,7 +3059,7 @@ func (c *ProjectsLocationsEnvironmentsPatchCall) Do(opts ...googleapi.CallOption // "type": "string" // }, // "updateMask": { - // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", + // "description": "Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` parameter would include the following two `paths` values: \"config.softwareConfig.pypiPackages.scikit-learn\" and \"config.softwareConfig.pypiPackages.argparse\". The included patch environment would specify the scikit-learn version as follows: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"scikit-learn\":\"==0.19.0\" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and argparse will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels \"label1\" and \"label2\" while clearing \"label3\" (assuming it already exists), one can provide the paths \"labels.label1\", \"labels.label2\", and \"labels.label3\" and populate the patch environment as follows: { \"labels\":{ \"label1\":\"new-label1-value\" \"label2\":\"new-label2-value\" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path \"config.softwareConfig.pypiPackages\", and the patch environment would be the following: { \"config\":{ \"softwareConfig\":{ \"pypiPackages\":{ \"botocore\":\"==1.7.14\" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current WebServerNetworkAccessControl. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. It is an error to provide both this mask and a mask specifying one or more individual environment variables. * `config.softwareConfig.imageVersion` * Upgrade the version of the environment in-place. Refer to `SoftwareConfig.image_version` for information on how to format the new image version. Additionally, the new image version cannot effect a version downgrade, and must match the current image version's Composer and Airflow major versions. Consult the [Cloud Composer version list](/composer/docs/concepts/versioning/composer-versions) for valid values. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.softwareConfig.cloudDataLineageIntegration` * Configuration for Cloud Data Lineage integration. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.maintenanceWindow` * Maintenance window during which Cloud Composer components may be under maintenance. * `config.workloadsConfig` * The workloads configuration settings for the GKE cluster associated with the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `config.environmentSize` * The size of the Cloud Composer environment. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer.", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index 830919b48ed..9d425f9ec31 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -755,6 +755,34 @@ "resources": { "nodePools": { "methods": { + "completeUpgrade": { + "description": "CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:completeUpgrade", + "httpMethod": "POST", + "id": "container.projects.locations.clusters.nodePools.completeUpgrade", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name (project, location, cluster, node pool id) of the node pool to complete upgrade. Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:completeUpgrade", + "request": { + "$ref": "CompleteNodePoolUpgradeRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a node pool for a cluster.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", @@ -2484,7 +2512,7 @@ } } }, - "revision": "20220610", + "revision": "20220615", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2726,6 +2754,75 @@ }, "type": "object" }, + "BlueGreenInfo": { + "description": "Information relevant to blue-green upgrade.", + "id": "BlueGreenInfo", + "properties": { + "blueInstanceGroupUrls": { + "description": "The resource URLs of the [managed instance groups] (/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with blue pool.", + "items": { + "type": "string" + }, + "type": "array" + }, + "bluePoolDeletionStartTime": { + "description": "Time to start deleting blue pool to complete blue-green upgrade, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "greenInstanceGroupUrls": { + "description": "The resource URLs of the [managed instance groups] (/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with green pool.", + "items": { + "type": "string" + }, + "type": "array" + }, + "greenPoolVersion": { + "description": "Version of green pool.", + "type": "string" + }, + "phase": { + "description": "Current blue-green upgrade phase.", + "enum": [ + "PHASE_UNSPECIFIED", + "UPDATE_STARTED", + "CREATING_GREEN_POOL", + "CORDONING_BLUE_POOL", + "DRAINING_BLUE_POOL", + "NODE_POOL_SOAKING", + "DELETING_BLUE_POOL", + "ROLLBACK_STARTED" + ], + "enumDescriptions": [ + "Unspecified phase.", + "blue-green upgrade has been initiated.", + "Start creating green pool nodes.", + "Start cordoning blue pool nodes.", + "Start draining blue pool nodes.", + "Start soaking time after draining entire blue pool.", + "Start deleting blue nodes.", + "Rollback has been initiated." + ], + "type": "string" + } + }, + "type": "object" + }, + "BlueGreenSettings": { + "description": "Settings for blue-green upgrade.", + "id": "BlueGreenSettings", + "properties": { + "nodePoolSoakDuration": { + "description": "Time needed after draining entire blue pool. After this period, blue pool will be cleaned up.", + "format": "google-duration", + "type": "string" + }, + "standardRolloutPolicy": { + "$ref": "StandardRolloutPolicy", + "description": "Standard policy for the blue-green upgrade." + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "CancelOperationRequest cancels a single operation.", "id": "CancelOperationRequest", @@ -3417,6 +3514,12 @@ }, "type": "object" }, + "CompleteNodePoolUpgradeRequest": { + "description": "CompleteNodePoolUpgradeRequest sets the name of target node pool to complete upgrade.", + "id": "CompleteNodePoolUpgradeRequest", + "properties": {}, + "type": "object" + }, "ConfidentialNodes": { "description": "ConfidentialNodes is configuration for the confidential nodes feature, which makes nodes run on confidential VMs.", "id": "ConfidentialNodes", @@ -3925,6 +4028,11 @@ "description": "The IP address range of the services IPs in this cluster. If blank, a range will be automatically chosen with the default size. This field is only applicable when `use_ip_aliases` is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. `/14`) to have a range chosen with a specific netmask. Set to a [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use.", "type": "string" }, + "servicesIpv6CidrBlock": { + "description": "Output only. [Output only] The services IPv6 CIDR block for the cluster.", + "readOnly": true, + "type": "string" + }, "servicesSecondaryRangeName": { "description": "The name of the secondary range to be used as for the services CIDR block. The secondary range will be used for service ClusterIPs. This must be an existing secondary range associated with the cluster subnetwork. This field is only applicable with use_ip_aliases and create_subnetwork is false.", "type": "string" @@ -3943,6 +4051,11 @@ ], "type": "string" }, + "subnetIpv6CidrBlock": { + "description": "Output only. [Output only] The subnet's IPv6 CIDR block used by nodes and pods.", + "readOnly": true, + "type": "string" + }, "subnetworkName": { "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If this field is empty, then an automatic name will be chosen for the new subnetwork.", "type": "string" @@ -4087,6 +4200,20 @@ "description": "Parameters that can be configured on Linux nodes.", "id": "LinuxNodeConfig", "properties": { + "cgroupMode": { + "description": "cgroup_mode specifies the cgroup mode to be used on the node.", + "enum": [ + "CGROUP_MODE_UNSPECIFIED", + "CGROUP_MODE_V1", + "CGROUP_MODE_V2" + ], + "enumDescriptions": [ + "CGROUP_MODE_UNSPECIFIED is when unspecified cgroup configuration is used. The default for the GKE node OS image will be used.", + "CGROUP_MODE_V1 specifies to use cgroupv1 for the cgroup configuration on the node image.", + "CGROUP_MODE_V2 specifies to use cgroupv2 for the cgroup configuration on the node image." + ], + "type": "string" + }, "sysctls": { "additionalProperties": { "type": "string" @@ -4434,12 +4561,18 @@ "enum": [ "COMPONENT_UNSPECIFIED", "SYSTEM_COMPONENTS", - "WORKLOADS" + "WORKLOADS", + "APISERVER", + "SCHEDULER", + "CONTROLLER_MANAGER" ], "enumDescriptions": [ "Default value. This shouldn't be used.", "system components", - "Deprecated: Use Google Cloud Managed Service for Prometheus." + "Deprecated: Use Google Cloud Managed Service for Prometheus.", + "kube-apiserver", + "kube-scheduler", + "kube-controller-manager" ], "type": "string" }, @@ -4752,7 +4885,7 @@ "properties": { "gcfsConfig": { "$ref": "GcfsConfig", - "description": "GCFS (Google Container File System, a.k.a Riptide) options." + "description": "GCFS (Google Container File System, a.k.a. Riptide) options." } }, "type": "object" @@ -4862,7 +4995,7 @@ "type": "integer" }, "instanceGroupUrls": { - "description": "[Output only] The resource URLs of the [managed instance groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with this node pool.", + "description": "[Output only] The resource URLs of the [managed instance groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with this node pool. During the node pool blue-green upgrade operation, the URLs contain both blue and green resources.", "items": { "type": "string" }, @@ -4930,6 +5063,11 @@ "description": "[Output only] Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available.", "type": "string" }, + "updateInfo": { + "$ref": "UpdateInfo", + "description": "Output only. [Output only] Update info contains relevant information during a node pool update.", + "readOnly": true + }, "upgradeSettings": { "$ref": "UpgradeSettings", "description": "Upgrade settings control disruption and speed of the upgrade." @@ -4964,6 +5102,20 @@ "description": "Is autoscaling enabled for this node pool.", "type": "boolean" }, + "locationPolicy": { + "description": "Location policy used when scaling up a nodepool.", + "enum": [ + "LOCATION_POLICY_UNSPECIFIED", + "BALANCED", + "ANY" + ], + "enumDescriptions": [ + "Not set.", + "BALANCED is a best effort policy that aims to balance the sizes of different zones.", + "ANY policy picks zones that have the highest capacity available." + ], + "type": "string" + }, "maxNodeCount": { "description": "Maximum number of nodes for one location in the NodePool. Must be \u003e= min_node_count. There has to be enough quota to scale up the cluster.", "format": "int32", @@ -4973,6 +5125,16 @@ "description": "Minimum number of nodes for one location in the NodePool. Must be \u003e= 1 and \u003c= max_node_count.", "format": "int32", "type": "integer" + }, + "totalMaxNodeCount": { + "description": "Maximum number of nodes in the node pool. Must be greater than total_min_node_count. There has to be enough quota to scale up the cluster. The total_*_node_count fields are mutually exclusive with the *_node_count fields.", + "format": "int32", + "type": "integer" + }, + "totalMinNodeCount": { + "description": "Minimum number of nodes in the node pool. Must be greater than 1 less than total_max_node_count. The total_*_node_count fields are mutually exclusive with the *_node_count fields.", + "format": "int32", + "type": "integer" } }, "type": "object" @@ -5493,6 +5655,10 @@ "description": "Required. Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.", "type": "string" }, + "respectPdb": { + "description": "Option for rollback to ignore the PodDisruptionBudget. Default value is false.", + "type": "boolean" + }, "zone": { "description": "Required. Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.", "type": "string" @@ -6029,6 +6195,28 @@ }, "type": "object" }, + "StandardRolloutPolicy": { + "description": "Standard rollout policy is the default policy for blue-green.", + "id": "StandardRolloutPolicy", + "properties": { + "batchNodeCount": { + "description": "Number of blue nodes to drain in a batch.", + "format": "int32", + "type": "integer" + }, + "batchPercentage": { + "description": "Percentage of the bool pool nodes to drain in a batch. The range of this field should be (0.0, 1.0].", + "format": "float", + "type": "number" + }, + "batchSoakDuration": { + "description": "Soak time after each batch gets drained. Default to zero.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "StartIPRotationRequest": { "description": "StartIPRotationRequest creates a new IP for the cluster and then performs a node upgrade on each node pool to point to the new IP.", "id": "StartIPRotationRequest", @@ -6225,6 +6413,17 @@ }, "type": "object" }, + "UpdateInfo": { + "description": "UpdateInfo contains resource (instance groups, etc), status and other intermediate information relevant to a node pool upgrade.", + "id": "UpdateInfo", + "properties": { + "blueGreenInfo": { + "$ref": "BlueGreenInfo", + "description": "Information of a blue-green upgrade." + } + }, + "type": "object" + }, "UpdateMasterRequest": { "description": "UpdateMasterRequest updates the master of the cluster.", "id": "UpdateMasterRequest", @@ -6299,6 +6498,10 @@ "description": "The name (project, location, cluster, node pool) of the node pool to update. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.", "type": "string" }, + "nodeNetworkConfig": { + "$ref": "NodeNetworkConfig", + "description": "Node network config." + }, "nodePoolId": { "description": "Required. Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.", "type": "string" @@ -6414,8 +6617,13 @@ "type": "object" }, "UpgradeSettings": { + "description": "These upgrade settings configure the upgrade strategy for the node pool. Use strategy to switch between the strategies applied to the node pool. If the strategy is SURGE, use max_surge and max_unavailable to control the level of parallelism and the level of disruption caused by upgrade. 1. maxSurge controls the number of additional nodes that can be added to the node pool temporarily for the time of the upgrade to increase the number of available nodes. 2. maxUnavailable controls the number of nodes that can be simultaneously unavailable. 3. (maxUnavailable + maxSurge) determines the level of parallelism (how many nodes are being upgraded at the same time). If the strategy is BLUE_GREEN, use blue_green_settings to configure the blue-green upgrade related settings. 1. standard_rollout_policy is the default policy. The policy is used to control the way blue pool gets drained. The draining is executed in the batch mode. The batch size could be specified as either percentage of the node pool size or the number of nodes. batch_soak_duration is the soak time after each batch gets drained. 2. node_pool_soak_duration is the soak time after all blue nodes are drained. After this period, the blue pool nodes will be deleted.", "id": "UpgradeSettings", "properties": { + "blueGreenSettings": { + "$ref": "BlueGreenSettings", + "description": "Settings for blue-green upgrade strategy." + }, "maxSurge": { "description": "The maximum number of nodes that can be created beyond the current size of the node pool during the upgrade process.", "format": "int32", @@ -6425,6 +6633,20 @@ "description": "The maximum number of nodes that can be simultaneously unavailable during the upgrade process. A node is considered available if its status is Ready.", "format": "int32", "type": "integer" + }, + "strategy": { + "description": "Update strategy of the node pool.", + "enum": [ + "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED", + "BLUE_GREEN", + "SURGE" + ], + "enumDescriptions": [ + "Default value.", + "blue-green upgrade.", + "SURGE is the traditional way of upgrading a node pool. max_surge and max_unavailable determines the level of upgrade parallelism." + ], + "type": "string" } }, "type": "object" diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index e3c5eb2a854..49b8c9a9f9f 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -735,6 +735,101 @@ func (s *BinaryAuthorization) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BlueGreenInfo: Information relevant to blue-green upgrade. +type BlueGreenInfo struct { + // BlueInstanceGroupUrls: The resource URLs of the [managed instance + // groups] + // (/compute/docs/instance-groups/creating-groups-of-managed-instances) + // associated with blue pool. + BlueInstanceGroupUrls []string `json:"blueInstanceGroupUrls,omitempty"` + + // BluePoolDeletionStartTime: Time to start deleting blue pool to + // complete blue-green upgrade, in RFC3339 + // (https://www.ietf.org/rfc/rfc3339.txt) text format. + BluePoolDeletionStartTime string `json:"bluePoolDeletionStartTime,omitempty"` + + // GreenInstanceGroupUrls: The resource URLs of the [managed instance + // groups] + // (/compute/docs/instance-groups/creating-groups-of-managed-instances) + // associated with green pool. + GreenInstanceGroupUrls []string `json:"greenInstanceGroupUrls,omitempty"` + + // GreenPoolVersion: Version of green pool. + GreenPoolVersion string `json:"greenPoolVersion,omitempty"` + + // Phase: Current blue-green upgrade phase. + // + // Possible values: + // "PHASE_UNSPECIFIED" - Unspecified phase. + // "UPDATE_STARTED" - blue-green upgrade has been initiated. + // "CREATING_GREEN_POOL" - Start creating green pool nodes. + // "CORDONING_BLUE_POOL" - Start cordoning blue pool nodes. + // "DRAINING_BLUE_POOL" - Start draining blue pool nodes. + // "NODE_POOL_SOAKING" - Start soaking time after draining entire blue + // pool. + // "DELETING_BLUE_POOL" - Start deleting blue nodes. + // "ROLLBACK_STARTED" - Rollback has been initiated. + Phase string `json:"phase,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "BlueInstanceGroupUrls") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BlueInstanceGroupUrls") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BlueGreenInfo) MarshalJSON() ([]byte, error) { + type NoMethod BlueGreenInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BlueGreenSettings: Settings for blue-green upgrade. +type BlueGreenSettings struct { + // NodePoolSoakDuration: Time needed after draining entire blue pool. + // After this period, blue pool will be cleaned up. + NodePoolSoakDuration string `json:"nodePoolSoakDuration,omitempty"` + + // StandardRolloutPolicy: Standard policy for the blue-green upgrade. + StandardRolloutPolicy *StandardRolloutPolicy `json:"standardRolloutPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "NodePoolSoakDuration") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NodePoolSoakDuration") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BlueGreenSettings) MarshalJSON() ([]byte, error) { + type NoMethod BlueGreenSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelOperationRequest: CancelOperationRequest cancels a single // operation. type CancelOperationRequest struct { @@ -1661,6 +1756,11 @@ func (s *CompleteIPRotationRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CompleteNodePoolUpgradeRequest: CompleteNodePoolUpgradeRequest sets +// the name of target node pool to complete upgrade. +type CompleteNodePoolUpgradeRequest struct { +} + // ConfidentialNodes: ConfidentialNodes is configuration for the // confidential nodes feature, which makes nodes run on confidential // VMs. @@ -2653,6 +2753,10 @@ type IPAllocationPolicy struct { // specific range to use. ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` + // ServicesIpv6CidrBlock: Output only. [Output only] The services IPv6 + // CIDR block for the cluster. + ServicesIpv6CidrBlock string `json:"servicesIpv6CidrBlock,omitempty"` + // ServicesSecondaryRangeName: The name of the secondary range to be // used as for the services CIDR block. The secondary range will be used // for service ClusterIPs. This must be an existing secondary range @@ -2669,6 +2773,10 @@ type IPAllocationPolicy struct { // "IPV4_IPV6" - The value used if the cluster is a dual stack cluster StackType string `json:"stackType,omitempty"` + // SubnetIpv6CidrBlock: Output only. [Output only] The subnet's IPv6 + // CIDR block used by nodes and pods. + SubnetIpv6CidrBlock string `json:"subnetIpv6CidrBlock,omitempty"` + // SubnetworkName: A custom subnetwork name to be used if // `create_subnetwork` is true. If this field is empty, then an // automatic name will be chosen for the new subnetwork. @@ -2960,6 +3068,19 @@ func (s *LegacyAbac) MarshalJSON() ([]byte, error) { // LinuxNodeConfig: Parameters that can be configured on Linux nodes. type LinuxNodeConfig struct { + // CgroupMode: cgroup_mode specifies the cgroup mode to be used on the + // node. + // + // Possible values: + // "CGROUP_MODE_UNSPECIFIED" - CGROUP_MODE_UNSPECIFIED is when + // unspecified cgroup configuration is used. The default for the GKE + // node OS image will be used. + // "CGROUP_MODE_V1" - CGROUP_MODE_V1 specifies to use cgroupv1 for the + // cgroup configuration on the node image. + // "CGROUP_MODE_V2" - CGROUP_MODE_V2 specifies to use cgroupv2 for the + // cgroup configuration on the node image. + CgroupMode string `json:"cgroupMode,omitempty"` + // Sysctls: The Linux kernel parameters to be applied to the nodes and // all pods running on the nodes. The following parameters are // supported. net.core.busy_poll net.core.busy_read @@ -2968,7 +3089,7 @@ type LinuxNodeConfig struct { // net.ipv4.tcp_rmem net.ipv4.tcp_wmem net.ipv4.tcp_tw_reuse Sysctls map[string]string `json:"sysctls,omitempty"` - // ForceSendFields is a list of field names (e.g. "Sysctls") to + // ForceSendFields is a list of field names (e.g. "CgroupMode") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2976,7 +3097,7 @@ type LinuxNodeConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Sysctls") to include in + // NullFields is a list of field names (e.g. "CgroupMode") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3669,6 +3790,9 @@ type MonitoringComponentConfig struct { // "SYSTEM_COMPONENTS" - system components // "WORKLOADS" - Deprecated: Use Google Cloud Managed Service for // Prometheus. + // "APISERVER" - kube-apiserver + // "SCHEDULER" - kube-scheduler + // "CONTROLLER_MANAGER" - kube-controller-manager EnableComponents []string `json:"enableComponents,omitempty"` // ForceSendFields is a list of field names (e.g. "EnableComponents") to @@ -4149,7 +4273,7 @@ func (s *NodeConfig) MarshalJSON() ([]byte, error) { // NodeConfigDefaults: Subset of NodeConfig message that has defaults. type NodeConfigDefaults struct { - // GcfsConfig: GCFS (Google Container File System, a.k.a Riptide) + // GcfsConfig: GCFS (Google Container File System, a.k.a. Riptide) // options. GcfsConfig *GcfsConfig `json:"gcfsConfig,omitempty"` @@ -4397,7 +4521,8 @@ type NodePool struct { // InstanceGroupUrls: [Output only] The resource URLs of the managed // instance groups // (https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) - // associated with this node pool. + // associated with this node pool. During the node pool blue-green + // upgrade operation, the URLs contain both blue and green resources. InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` // Locations: The list of Google Compute Engine zones @@ -4459,6 +4584,10 @@ type NodePool struct { // instance, if available. StatusMessage string `json:"statusMessage,omitempty"` + // UpdateInfo: Output only. [Output only] Update info contains relevant + // information during a node pool update. + UpdateInfo *UpdateInfo `json:"updateInfo,omitempty"` + // UpgradeSettings: Upgrade settings control disruption and speed of the // upgrade. UpgradeSettings *UpgradeSettings `json:"upgradeSettings,omitempty"` @@ -4536,6 +4665,16 @@ type NodePoolAutoscaling struct { // Enabled: Is autoscaling enabled for this node pool. Enabled bool `json:"enabled,omitempty"` + // LocationPolicy: Location policy used when scaling up a nodepool. + // + // Possible values: + // "LOCATION_POLICY_UNSPECIFIED" - Not set. + // "BALANCED" - BALANCED is a best effort policy that aims to balance + // the sizes of different zones. + // "ANY" - ANY policy picks zones that have the highest capacity + // available. + LocationPolicy string `json:"locationPolicy,omitempty"` + // MaxNodeCount: Maximum number of nodes for one location in the // NodePool. Must be >= min_node_count. There has to be enough quota to // scale up the cluster. @@ -4545,6 +4684,17 @@ type NodePoolAutoscaling struct { // NodePool. Must be >= 1 and <= max_node_count. MinNodeCount int64 `json:"minNodeCount,omitempty"` + // TotalMaxNodeCount: Maximum number of nodes in the node pool. Must be + // greater than total_min_node_count. There has to be enough quota to + // scale up the cluster. The total_*_node_count fields are mutually + // exclusive with the *_node_count fields. + TotalMaxNodeCount int64 `json:"totalMaxNodeCount,omitempty"` + + // TotalMinNodeCount: Minimum number of nodes in the node pool. Must be + // greater than 1 less than total_max_node_count. The total_*_node_count + // fields are mutually exclusive with the *_node_count fields. + TotalMinNodeCount int64 `json:"totalMinNodeCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "Autoprovisioned") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -5383,6 +5533,10 @@ type RollbackNodePoolUpgradeRequest struct { // This field has been deprecated and replaced by the name field. ProjectId string `json:"projectId,omitempty"` + // RespectPdb: Option for rollback to ignore the PodDisruptionBudget. + // Default value is false. + RespectPdb bool `json:"respectPdb,omitempty"` + // Zone: Required. Deprecated. The name of the Google Compute Engine // zone (https://cloud.google.com/compute/docs/zones#available) in which // the cluster resides. This field has been deprecated and replaced by @@ -6329,6 +6483,58 @@ func (s *ShieldedNodes) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StandardRolloutPolicy: Standard rollout policy is the default policy +// for blue-green. +type StandardRolloutPolicy struct { + // BatchNodeCount: Number of blue nodes to drain in a batch. + BatchNodeCount int64 `json:"batchNodeCount,omitempty"` + + // BatchPercentage: Percentage of the bool pool nodes to drain in a + // batch. The range of this field should be (0.0, 1.0]. + BatchPercentage float64 `json:"batchPercentage,omitempty"` + + // BatchSoakDuration: Soak time after each batch gets drained. Default + // to zero. + BatchSoakDuration string `json:"batchSoakDuration,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BatchNodeCount") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BatchNodeCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *StandardRolloutPolicy) MarshalJSON() ([]byte, error) { + type NoMethod StandardRolloutPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *StandardRolloutPolicy) UnmarshalJSON(data []byte) error { + type NoMethod StandardRolloutPolicy + var s1 struct { + BatchPercentage gensupport.JSONFloat64 `json:"batchPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BatchPercentage = float64(s1.BatchPercentage) + return nil +} + // StartIPRotationRequest: StartIPRotationRequest creates a new IP for // the cluster and then performs a node upgrade on each node pool to // point to the new IP. @@ -6682,6 +6888,36 @@ func (s *UpdateClusterRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UpdateInfo: UpdateInfo contains resource (instance groups, etc), +// status and other intermediate information relevant to a node pool +// upgrade. +type UpdateInfo struct { + // BlueGreenInfo: Information of a blue-green upgrade. + BlueGreenInfo *BlueGreenInfo `json:"blueGreenInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BlueGreenInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BlueGreenInfo") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UpdateInfo) MarshalJSON() ([]byte, error) { + type NoMethod UpdateInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UpdateMasterRequest: UpdateMasterRequest updates the master of the // cluster. type UpdateMasterRequest struct { @@ -6783,6 +7019,9 @@ type UpdateNodePoolRequest struct { // `projects/*/locations/*/clusters/*/nodePools/*`. Name string `json:"name,omitempty"` + // NodeNetworkConfig: Node network config. + NodeNetworkConfig *NodeNetworkConfig `json:"nodeNetworkConfig,omitempty"` + // NodePoolId: Required. Deprecated. The name of the node pool to // upgrade. This field has been deprecated and replaced by the name // field. @@ -6955,7 +7194,30 @@ func (s *UpgradeEvent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// UpgradeSettings: These upgrade settings configure the upgrade +// strategy for the node pool. Use strategy to switch between the +// strategies applied to the node pool. If the strategy is SURGE, use +// max_surge and max_unavailable to control the level of parallelism and +// the level of disruption caused by upgrade. 1. maxSurge controls the +// number of additional nodes that can be added to the node pool +// temporarily for the time of the upgrade to increase the number of +// available nodes. 2. maxUnavailable controls the number of nodes that +// can be simultaneously unavailable. 3. (maxUnavailable + maxSurge) +// determines the level of parallelism (how many nodes are being +// upgraded at the same time). If the strategy is BLUE_GREEN, use +// blue_green_settings to configure the blue-green upgrade related +// settings. 1. standard_rollout_policy is the default policy. The +// policy is used to control the way blue pool gets drained. The +// draining is executed in the batch mode. The batch size could be +// specified as either percentage of the node pool size or the number of +// nodes. batch_soak_duration is the soak time after each batch gets +// drained. 2. node_pool_soak_duration is the soak time after all blue +// nodes are drained. After this period, the blue pool nodes will be +// deleted. type UpgradeSettings struct { + // BlueGreenSettings: Settings for blue-green upgrade strategy. + BlueGreenSettings *BlueGreenSettings `json:"blueGreenSettings,omitempty"` + // MaxSurge: The maximum number of nodes that can be created beyond the // current size of the node pool during the upgrade process. MaxSurge int64 `json:"maxSurge,omitempty"` @@ -6965,20 +7227,31 @@ type UpgradeSettings struct { // considered available if its status is Ready. MaxUnavailable int64 `json:"maxUnavailable,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxSurge") to - // unconditionally include in API requests. By default, fields with + // Strategy: Update strategy of the node pool. + // + // Possible values: + // "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED" - Default value. + // "BLUE_GREEN" - blue-green upgrade. + // "SURGE" - SURGE is the traditional way of upgrading a node pool. + // max_surge and max_unavailable determines the level of upgrade + // parallelism. + Strategy string `json:"strategy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BlueGreenSettings") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxSurge") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an 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. "BlueGreenSettings") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -10681,6 +10954,151 @@ func (c *ProjectsLocationsClustersUpdateMasterCall) Do(opts ...googleapi.CallOpt } +// method id "container.projects.locations.clusters.nodePools.completeUpgrade": + +type ProjectsLocationsClustersNodePoolsCompleteUpgradeCall struct { + s *Service + name string + completenodepoolupgraderequest *CompleteNodePoolUpgradeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CompleteUpgrade: CompleteNodePoolUpgrade will signal an on-going node +// pool upgrade to complete. +// +// - name: The name (project, location, cluster, node pool id) of the +// node pool to complete upgrade. Specified in the format +// 'projects/*/locations/*/clusters/*/nodePools/*'. +func (r *ProjectsLocationsClustersNodePoolsService) CompleteUpgrade(name string, completenodepoolupgraderequest *CompleteNodePoolUpgradeRequest) *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall { + c := &ProjectsLocationsClustersNodePoolsCompleteUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.completenodepoolupgraderequest = completenodepoolupgraderequest + 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 *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall { + 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 *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Context(ctx context.Context) *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall { + 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 *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) 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.completenodepoolupgraderequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:completeUpgrade") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "container.projects.locations.clusters.nodePools.completeUpgrade" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsClustersNodePoolsCompleteUpgradeCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "CompleteNodePoolUpgrade will signal an on-going node pool upgrade to complete.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:completeUpgrade", + // "httpMethod": "POST", + // "id": "container.projects.locations.clusters.nodePools.completeUpgrade", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name (project, location, cluster, node pool id) of the node pool to complete upgrade. Specified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:completeUpgrade", + // "request": { + // "$ref": "CompleteNodePoolUpgradeRequest" + // }, + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "container.projects.locations.clusters.nodePools.create": type ProjectsLocationsClustersNodePoolsCreateCall struct { diff --git a/doubleclickbidmanager/v1.1/doubleclickbidmanager-api.json b/doubleclickbidmanager/v1.1/doubleclickbidmanager-api.json index 32a9fc294d9..8806f095002 100644 --- a/doubleclickbidmanager/v1.1/doubleclickbidmanager-api.json +++ b/doubleclickbidmanager/v1.1/doubleclickbidmanager-api.json @@ -280,7 +280,7 @@ } } }, - "revision": "20220607", + "revision": "20220622", "rootUrl": "https://doubleclickbidmanager.googleapis.com/", "schemas": { "ChannelGrouping": { @@ -629,7 +629,8 @@ "FILTER_VERIFICATION_AUDIBILITY_COMPLETE", "FILTER_MEDIA_TYPE", "FILTER_AUDIO_FEED_TYPE_NAME", - "FILTER_TRUEVIEW_TARGETING_EXPANSION" + "FILTER_TRUEVIEW_TARGETING_EXPANSION", + "FILTER_PUBLISHER_TRAFFIC_SOURCE" ], "enumDescriptions": [ "", @@ -924,6 +925,7 @@ "", "", "", + "", "" ], "type": "string" @@ -1301,7 +1303,8 @@ "FILTER_VERIFICATION_AUDIBILITY_COMPLETE", "FILTER_MEDIA_TYPE", "FILTER_AUDIO_FEED_TYPE_NAME", - "FILTER_TRUEVIEW_TARGETING_EXPANSION" + "FILTER_TRUEVIEW_TARGETING_EXPANSION", + "FILTER_PUBLISHER_TRAFFIC_SOURCE" ], "enumDescriptions": [ "", @@ -1596,6 +1599,7 @@ "", "", "", + "", "" ], "type": "string" @@ -2997,7 +3001,8 @@ "FILTER_VERIFICATION_AUDIBILITY_COMPLETE", "FILTER_MEDIA_TYPE", "FILTER_AUDIO_FEED_TYPE_NAME", - "FILTER_TRUEVIEW_TARGETING_EXPANSION" + "FILTER_TRUEVIEW_TARGETING_EXPANSION", + "FILTER_PUBLISHER_TRAFFIC_SOURCE" ], "enumDescriptions": [ "", @@ -3292,6 +3297,7 @@ "", "", "", + "", "" ], "type": "string" diff --git a/doubleclickbidmanager/v1.1/doubleclickbidmanager-gen.go b/doubleclickbidmanager/v1.1/doubleclickbidmanager-gen.go index 1a1ac59b7e3..a93ee306efa 100644 --- a/doubleclickbidmanager/v1.1/doubleclickbidmanager-gen.go +++ b/doubleclickbidmanager/v1.1/doubleclickbidmanager-gen.go @@ -552,6 +552,7 @@ type FilterPair struct { // "FILTER_MEDIA_TYPE" // "FILTER_AUDIO_FEED_TYPE_NAME" // "FILTER_TRUEVIEW_TARGETING_EXPANSION" + // "FILTER_PUBLISHER_TRAFFIC_SOURCE" Type string `json:"type,omitempty"` // Value: Filter value. @@ -995,6 +996,7 @@ type Parameters struct { // "FILTER_MEDIA_TYPE" // "FILTER_AUDIO_FEED_TYPE_NAME" // "FILTER_TRUEVIEW_TARGETING_EXPANSION" + // "FILTER_PUBLISHER_TRAFFIC_SOURCE" GroupBys []string `json:"groupBys,omitempty"` // IncludeInviteData: Deprecated. This field is no longer in use. @@ -1946,6 +1948,7 @@ type PathQueryOptionsFilter struct { // "FILTER_MEDIA_TYPE" // "FILTER_AUDIO_FEED_TYPE_NAME" // "FILTER_TRUEVIEW_TARGETING_EXPANSION" + // "FILTER_PUBLISHER_TRAFFIC_SOURCE" Filter string `json:"filter,omitempty"` // Match: Indicates how the filter should be matched to the value. diff --git a/recommender/v1/recommender-api.json b/recommender/v1/recommender-api.json index 690ea31830d..c52e25633be 100644 --- a/recommender/v1/recommender-api.json +++ b/recommender/v1/recommender-api.json @@ -646,6 +646,72 @@ "locations": { "resources": { "insightTypes": { + "methods": { + "getConfig": { + "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "GET", + "id": "recommender.organizations.locations.insightTypes.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "PATCH", + "id": "recommender.organizations.locations.insightTypes.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insights": { "methods": { @@ -748,6 +814,72 @@ } }, "recommenders": { + "methods": { + "getConfig": { + "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "GET", + "id": "recommender.organizations.locations.recommenders.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates a Recommender Config. This will create a new revision of the config.", + "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "PATCH", + "id": "recommender.organizations.locations.recommenders.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "recommendations": { "methods": { @@ -914,6 +1046,72 @@ "locations": { "resources": { "insightTypes": { + "methods": { + "getConfig": { + "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "GET", + "id": "recommender.projects.locations.insightTypes.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + "httpMethod": "PATCH", + "id": "recommender.projects.locations.insightTypes.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "insights": { "methods": { @@ -1016,6 +1214,72 @@ } }, "recommenders": { + "methods": { + "getConfig": { + "description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "GET", + "id": "recommender.projects.locations.recommenders.getConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "updateConfig": { + "description": "Updates a Recommender Config. This will create a new revision of the config.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + "httpMethod": "PATCH", + "id": "recommender.projects.locations.recommenders.updateConfig", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "The list of fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, + "validateOnly": { + "description": "If true, validate the request and preview the change, but do not actually update it.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "response": { + "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "recommendations": { "methods": { @@ -1178,7 +1442,7 @@ } } }, - "revision": "20220327", + "revision": "20220626", "rootUrl": "https://recommender.googleapis.com/", "schemas": { "GoogleCloudRecommenderV1CostProjection": { @@ -1366,6 +1630,61 @@ }, "type": "object" }, + "GoogleCloudRecommenderV1InsightTypeConfig": { + "description": "Configuration for an InsightType.", + "id": "GoogleCloudRecommenderV1InsightTypeConfig", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", + "type": "object" + }, + "displayName": { + "description": "A user-settable field to provide a human-readable name to be used in user interfaces.", + "type": "string" + }, + "etag": { + "description": "Fingerprint of the InsightTypeConfig. Provides optimistic locking when updating.", + "type": "string" + }, + "insightTypeGenerationConfig": { + "$ref": "GoogleCloudRecommenderV1InsightTypeGenerationConfig", + "description": "InsightTypeGenerationConfig which configures the generation of insights for this insight type." + }, + "name": { + "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + "type": "string" + }, + "revisionId": { + "description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Last time when the config was updated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRecommenderV1InsightTypeGenerationConfig": { + "description": "A configuration to customize the generation of insights. Eg, customizing the lookback period considered when generating a insight.", + "id": "GoogleCloudRecommenderV1InsightTypeGenerationConfig", + "properties": { + "params": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Parameters for this InsightTypeGenerationConfig. These configs can be used by or are applied to all subtypes.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudRecommenderV1ListInsightsResponse": { "description": "Response to the `ListInsights` method.", "id": "GoogleCloudRecommenderV1ListInsightsResponse", @@ -1684,6 +2003,61 @@ }, "type": "object" }, + "GoogleCloudRecommenderV1RecommenderConfig": { + "description": "Configuration for a Recommender.", + "id": "GoogleCloudRecommenderV1RecommenderConfig", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", + "type": "object" + }, + "displayName": { + "description": "A user-settable field to provide a human-readable name to be used in user interfaces.", + "type": "string" + }, + "etag": { + "description": "Fingerprint of the RecommenderConfig. Provides optimistic locking when updating.", + "type": "string" + }, + "name": { + "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + "type": "string" + }, + "recommenderGenerationConfig": { + "$ref": "GoogleCloudRecommenderV1RecommenderGenerationConfig", + "description": "RecommenderGenerationConfig which configures the Generation of recommendations for this recommender." + }, + "revisionId": { + "description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Last time when the config was updated.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRecommenderV1RecommenderGenerationConfig": { + "description": "A Configuration to customize the generation of recommendations. Eg, customizing the lookback period considered when generating a recommendation.", + "id": "GoogleCloudRecommenderV1RecommenderGenerationConfig", + "properties": { + "params": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Parameters for this RecommenderGenerationConfig. These configs can be used by or are applied to all subtypes.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudRecommenderV1SecurityProjection": { "description": "Contains various ways of describing the impact on Security.", "id": "GoogleCloudRecommenderV1SecurityProjection", diff --git a/recommender/v1/recommender-gen.go b/recommender/v1/recommender-gen.go index 0e0dc282a21..e8fc30310d7 100644 --- a/recommender/v1/recommender-gen.go +++ b/recommender/v1/recommender-gen.go @@ -674,6 +674,101 @@ func (s *GoogleCloudRecommenderV1InsightStateInfo) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRecommenderV1InsightTypeConfig: Configuration for an +// InsightType. +type GoogleCloudRecommenderV1InsightTypeConfig struct { + // Annotations: Allows clients to store small amounts of arbitrary data. + // Annotations must follow the Kubernetes syntax. The total size of all + // keys and values combined is limited to 256k. Key can have 2 segments: + // prefix (optional) and name (required), separated by a slash (/). + // Prefix must be a DNS subdomain. Name must be 63 characters or less, + // begin and end with alphanumerics, with dashes (-), underscores (_), + // dots (.), and alphanumerics between. + Annotations map[string]string `json:"annotations,omitempty"` + + // DisplayName: A user-settable field to provide a human-readable name + // to be used in user interfaces. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Fingerprint of the InsightTypeConfig. Provides optimistic + // locking when updating. + Etag string `json:"etag,omitempty"` + + // InsightTypeGenerationConfig: InsightTypeGenerationConfig which + // configures the generation of insights for this insight type. + InsightTypeGenerationConfig *GoogleCloudRecommenderV1InsightTypeGenerationConfig `json:"insightTypeGenerationConfig,omitempty"` + + // Name: Name of insight type config. Eg, + // projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_T + // YPE_ID]/config + Name string `json:"name,omitempty"` + + // RevisionId: Output only. Immutable. The revision ID of the config. A + // new revision is committed whenever the config is changed in any way. + // The format is an 8-character hexadecimal string. + RevisionId string `json:"revisionId,omitempty"` + + // UpdateTime: Last time when the config was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRecommenderV1InsightTypeConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecommenderV1InsightTypeConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRecommenderV1InsightTypeGenerationConfig: A configuration +// to customize the generation of insights. Eg, customizing the lookback +// period considered when generating a insight. +type GoogleCloudRecommenderV1InsightTypeGenerationConfig struct { + // Params: Parameters for this InsightTypeGenerationConfig. These + // configs can be used by or are applied to all subtypes. + Params googleapi.RawMessage `json:"params,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Params") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Params") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRecommenderV1InsightTypeGenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecommenderV1InsightTypeGenerationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRecommenderV1ListInsightsResponse: Response to the // `ListInsights` method. type GoogleCloudRecommenderV1ListInsightsResponse struct { @@ -1226,6 +1321,101 @@ func (s *GoogleCloudRecommenderV1RecommendationStateInfo) MarshalJSON() ([]byte, return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRecommenderV1RecommenderConfig: Configuration for a +// Recommender. +type GoogleCloudRecommenderV1RecommenderConfig struct { + // Annotations: Allows clients to store small amounts of arbitrary data. + // Annotations must follow the Kubernetes syntax. The total size of all + // keys and values combined is limited to 256k. Key can have 2 segments: + // prefix (optional) and name (required), separated by a slash (/). + // Prefix must be a DNS subdomain. Name must be 63 characters or less, + // begin and end with alphanumerics, with dashes (-), underscores (_), + // dots (.), and alphanumerics between. + Annotations map[string]string `json:"annotations,omitempty"` + + // DisplayName: A user-settable field to provide a human-readable name + // to be used in user interfaces. + DisplayName string `json:"displayName,omitempty"` + + // Etag: Fingerprint of the RecommenderConfig. Provides optimistic + // locking when updating. + Etag string `json:"etag,omitempty"` + + // Name: Name of recommender config. Eg, + // projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMEND + // ER_ID]/config + Name string `json:"name,omitempty"` + + // RecommenderGenerationConfig: RecommenderGenerationConfig which + // configures the Generation of recommendations for this recommender. + RecommenderGenerationConfig *GoogleCloudRecommenderV1RecommenderGenerationConfig `json:"recommenderGenerationConfig,omitempty"` + + // RevisionId: Output only. Immutable. The revision ID of the config. A + // new revision is committed whenever the config is changed in any way. + // The format is an 8-character hexadecimal string. + RevisionId string `json:"revisionId,omitempty"` + + // UpdateTime: Last time when the config was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Annotations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Annotations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRecommenderV1RecommenderConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecommenderV1RecommenderConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRecommenderV1RecommenderGenerationConfig: A Configuration +// to customize the generation of recommendations. Eg, customizing the +// lookback period considered when generating a recommendation. +type GoogleCloudRecommenderV1RecommenderGenerationConfig struct { + // Params: Parameters for this RecommenderGenerationConfig. These + // configs can be used by or are applied to all subtypes. + Params googleapi.RawMessage `json:"params,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Params") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Params") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRecommenderV1RecommenderGenerationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRecommenderV1RecommenderGenerationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRecommenderV1SecurityProjection: Contains various ways of // describing the impact on Security. type GoogleCloudRecommenderV1SecurityProjection struct { @@ -4044,9 +4234,9 @@ func (c *FoldersLocationsRecommendersRecommendationsMarkSucceededCall) Do(opts . } -// method id "recommender.organizations.locations.insightTypes.insights.get": +// method id "recommender.organizations.locations.insightTypes.getConfig": -type OrganizationsLocationsInsightTypesInsightsGetCall struct { +type OrganizationsLocationsInsightTypesGetConfigCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -4055,12 +4245,18 @@ type OrganizationsLocationsInsightTypesInsightsGetCall struct { header_ http.Header } -// Get: Gets the requested insight. Requires the recommender.*.get IAM -// permission for the specified insight type. +// GetConfig: Gets the requested InsightTypeConfig. There is only one +// instance of the config for each InsightType. // -// - name: Name of the insight. -func (r *OrganizationsLocationsInsightTypesInsightsService) Get(name string) *OrganizationsLocationsInsightTypesInsightsGetCall { - c := &OrganizationsLocationsInsightTypesInsightsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the InsightTypeConfig to get. Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY +// PE_ID]/config` * +// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I +// D]/config` * +// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI +// GHT_TYPE_ID]/config`. +func (r *OrganizationsLocationsInsightTypesService) GetConfig(name string) *OrganizationsLocationsInsightTypesGetConfigCall { + c := &OrganizationsLocationsInsightTypesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -4068,7 +4264,7 @@ func (r *OrganizationsLocationsInsightTypesInsightsService) Get(name string) *Or // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsGetCall { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesGetConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4078,7 +4274,7 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Fields(s ...googleap // 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 *OrganizationsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsGetCall { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesGetConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -4086,21 +4282,21 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTa // 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 *OrganizationsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsGetCall { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesGetConfigCall { 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 *OrganizationsLocationsInsightTypesInsightsGetCall) Header() http.Header { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInsightTypesInsightsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInsightTypesGetConfigCall) 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_ { @@ -4126,14 +4322,16 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "recommender.organizations.locations.insightTypes.insights.get" call. -// Exactly one of *GoogleCloudRecommenderV1Insight or error will be -// non-nil. Any non-2xx status code is an error. Response headers are in -// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { +// Do executes the "recommender.organizations.locations.insightTypes.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4152,7 +4350,7 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1Insight{ + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4164,25 +4362,25 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", + // "description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", // "httpMethod": "GET", - // "id": "recommender.organizations.locations.insightTypes.insights.get", + // "id": "recommender.organizations.locations.insightTypes.getConfig", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Name of the insight.", + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", // "required": true, // "type": "string" // } // }, // "path": "v1/{+name}", // "response": { - // "$ref": "GoogleCloudRecommenderV1Insight" + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4191,144 +4389,108 @@ func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi } -// method id "recommender.organizations.locations.insightTypes.insights.list": +// method id "recommender.organizations.locations.insightTypes.updateConfig": -type OrganizationsLocationsInsightTypesInsightsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type OrganizationsLocationsInsightTypesUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists insights for the specified Cloud Resource. Requires the -// recommender.*.list IAM permission for the specified insight type. +// UpdateConfig: Updates an InsightTypeConfig change. This will create a +// new revision of the config. // -// - parent: The container resource on which to execute the request. -// Acceptable formats: * -// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH -// T_TYPE_ID]` * -// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY -// PE_ID]` * -// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy -// pes/[INSIGHT_TYPE_ID]` * -// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE -// _ID]` * -// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ -// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: -// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to -// supported insight types: -// https://cloud.google.com/recommender/docs/insights/insight-types. -func (r *OrganizationsLocationsInsightTypesInsightsService) List(parent string) *OrganizationsLocationsInsightTypesInsightsListCall { - c := &OrganizationsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter expression to -// restrict the insights returned. Supported filter fields: * -// `stateInfo.state` * `insightSubtype` * `severity` Examples: * -// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * -// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR -// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL -// OR severity = HIGH)` (These expressions are based on the filter -// language described at https://google.aip.dev/160) -func (c *OrganizationsLocationsInsightTypesInsightsListCall) Filter(filter string) *OrganizationsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("filter", filter) +// - name: Name of insight type config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT +// _TYPE_ID]/config. +func (r *OrganizationsLocationsInsightTypesService) UpdateConfig(name string, googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig) *OrganizationsLocationsInsightTypesUpdateConfigCall { + c := &OrganizationsLocationsInsightTypesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1insighttypeconfig = googlecloudrecommenderv1insighttypeconfig return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of results to return from this request. Non-positive values are -// ignored. If not specified, the server will determine the number of -// results to return. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *OrganizationsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) UpdateMask(updateMask string) *OrganizationsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) return c } -// PageToken sets the optional parameter "pageToken": If present, -// retrieves the next batch of results from the preceding call to this -// method. `page_token` must be the value of `next_page_token` from the -// previous response. The values of other method parameters must be -// identical to those in the previous call. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *OrganizationsLocationsInsightTypesInsightsListCall { - c.urlParams_.Set("pageToken", pageToken) +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) ValidateOnly(validateOnly bool) *OrganizationsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsListCall { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesUpdateConfigCall { 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 *OrganizationsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsListCall { - 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 *OrganizationsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsListCall { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesUpdateConfigCall { 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 *OrganizationsLocationsInsightTypesInsightsListCall) Header() http.Header { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *OrganizationsLocationsInsightTypesInsightsListCall) doRequest(alt string) (*http.Response, error) { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudrecommenderv1insighttypeconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/insights") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "recommender.organizations.locations.insightTypes.insights.list" call. -// Exactly one of *GoogleCloudRecommenderV1ListInsightsResponse or error +// Do executes the "recommender.organizations.locations.insightTypes.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudRecommenderV1ListInsightsResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1ListInsightsResponse, error) { +func (c *OrganizationsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4347,7 +4509,7 @@ func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, err } - ret := &GoogleCloudRecommenderV1ListInsightsResponse{ + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4359,41 +4521,39 @@ func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleap } return ret, nil // { - // "description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", - // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", - // "httpMethod": "GET", - // "id": "recommender.organizations.locations.insightTypes.insights.list", + // "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.organizations.locations.insightTypes.updateConfig", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", - // "location": "query", + // "name": { + // "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", - // "location": "path", - // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", - // "required": true, - // "type": "string" + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" // } // }, - // "path": "v1/{+parent}/insights", + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1ListInsightsResponse" + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -4402,9 +4562,367 @@ func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleap } -// 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. +// method id "recommender.organizations.locations.insightTypes.insights.get": + +type OrganizationsLocationsInsightTypesInsightsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the requested insight. Requires the recommender.*.get IAM +// permission for the specified insight type. +// +// - name: Name of the insight. +func (r *OrganizationsLocationsInsightTypesInsightsService) Get(name string) *OrganizationsLocationsInsightTypesInsightsGetCall { + c := &OrganizationsLocationsInsightTypesInsightsGetCall{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 *OrganizationsLocationsInsightTypesInsightsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsGetCall { + 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 *OrganizationsLocationsInsightTypesInsightsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsGetCall { + 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 *OrganizationsLocationsInsightTypesInsightsGetCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsGetCall { + 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 *OrganizationsLocationsInsightTypesInsightsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.organizations.locations.insightTypes.insights.get" call. +// Exactly one of *GoogleCloudRecommenderV1Insight or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *GoogleCloudRecommenderV1Insight.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *OrganizationsLocationsInsightTypesInsightsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1Insight, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1Insight{ + 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 requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", + // "httpMethod": "GET", + // "id": "recommender.organizations.locations.insightTypes.insights.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the insight.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1Insight" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.organizations.locations.insightTypes.insights.list": + +type OrganizationsLocationsInsightTypesInsightsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists insights for the specified Cloud Resource. Requires the +// recommender.*.list IAM permission for the specified insight type. +// +// - parent: The container resource on which to execute the request. +// Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGH +// T_TYPE_ID]` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TY +// PE_ID]` * +// `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTy +// pes/[INSIGHT_TYPE_ID]` * +// `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE +// _ID]` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[ +// INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: +// https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to +// supported insight types: +// https://cloud.google.com/recommender/docs/insights/insight-types. +func (r *OrganizationsLocationsInsightTypesInsightsService) List(parent string) *OrganizationsLocationsInsightTypesInsightsListCall { + c := &OrganizationsLocationsInsightTypesInsightsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter expression to +// restrict the insights returned. Supported filter fields: * +// `stateInfo.state` * `insightSubtype` * `severity` Examples: * +// `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * +// `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR +// severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL +// OR severity = HIGH)` (These expressions are based on the filter +// language described at https://google.aip.dev/160) +func (c *OrganizationsLocationsInsightTypesInsightsListCall) Filter(filter string) *OrganizationsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to return from this request. Non-positive values are +// ignored. If not specified, the server will determine the number of +// results to return. +func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageSize(pageSize int64) *OrganizationsLocationsInsightTypesInsightsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If present, +// retrieves the next batch of results from the preceding call to this +// method. `page_token` must be the value of `next_page_token` from the +// previous response. The values of other method parameters must be +// identical to those in the previous call. +func (c *OrganizationsLocationsInsightTypesInsightsListCall) PageToken(pageToken string) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesInsightsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesInsightsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesInsightsListCall) Context(ctx context.Context) *OrganizationsLocationsInsightTypesInsightsListCall { + 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 *OrganizationsLocationsInsightTypesInsightsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsInsightTypesInsightsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/insights") + 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 "recommender.organizations.locations.insightTypes.insights.list" call. +// Exactly one of *GoogleCloudRecommenderV1ListInsightsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1ListInsightsResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsInsightTypesInsightsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1ListInsightsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1ListInsightsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", + // "httpMethod": "GET", + // "id": "recommender.organizations.locations.insightTypes.insights.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` (These expressions are based on the filter language described at https://google.aip.dev/160)", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/insights", + // "response": { + // "$ref": "GoogleCloudRecommenderV1ListInsightsResponse" + // }, + // "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 *OrganizationsLocationsInsightTypesInsightsListCall) Pages(ctx context.Context, f func(*GoogleCloudRecommenderV1ListInsightsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point @@ -4556,12 +5074,341 @@ func (c *OrganizationsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ... // "type": "string" // } // }, - // "path": "v1/{+name}:markAccepted", + // "path": "v1/{+name}:markAccepted", + // "request": { + // "$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRecommenderV1Insight" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.organizations.locations.recommenders.getConfig": + +type OrganizationsLocationsRecommendersGetConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetConfig: Gets the requested Recommender Config. There is only one +// instance of the config for each Recommender. +// +// - name: Name of the Recommendation Config to get. Acceptable formats: +// * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMM +// ENDER_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE +// R_ID]/config` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ +// RECOMMENDER_ID]/config`. +func (r *OrganizationsLocationsRecommendersService) GetConfig(name string) *OrganizationsLocationsRecommendersGetConfigCall { + c := &OrganizationsLocationsRecommendersGetConfigCall{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 *OrganizationsLocationsRecommendersGetConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecommendersGetConfigCall { + 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 *OrganizationsLocationsRecommendersGetConfigCall) IfNoneMatch(entityTag string) *OrganizationsLocationsRecommendersGetConfigCall { + 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 *OrganizationsLocationsRecommendersGetConfigCall) Context(ctx context.Context) *OrganizationsLocationsRecommendersGetConfigCall { + 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 *OrganizationsLocationsRecommendersGetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsRecommendersGetConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.organizations.locations.recommenders.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1RecommenderConfig{ + 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 requested Recommender Config. There is only one instance of the config for each Recommender.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "GET", + // "id": "recommender.organizations.locations.recommenders.getConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.organizations.locations.recommenders.updateConfig": + +type OrganizationsLocationsRecommendersUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateConfig: Updates a Recommender Config. This will create a new +// revision of the config. +// +// - name: Name of recommender config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMME +// NDER_ID]/config. +func (r *OrganizationsLocationsRecommendersService) UpdateConfig(name string, googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig) *OrganizationsLocationsRecommendersUpdateConfigCall { + c := &OrganizationsLocationsRecommendersUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1recommenderconfig = googlecloudrecommenderv1recommenderconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *OrganizationsLocationsRecommendersUpdateConfigCall) UpdateMask(updateMask string) *OrganizationsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *OrganizationsLocationsRecommendersUpdateConfigCall) ValidateOnly(validateOnly bool) *OrganizationsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *OrganizationsLocationsRecommendersUpdateConfigCall) Fields(s ...googleapi.Field) *OrganizationsLocationsRecommendersUpdateConfigCall { + 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 *OrganizationsLocationsRecommendersUpdateConfigCall) Context(ctx context.Context) *OrganizationsLocationsRecommendersUpdateConfigCall { + 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 *OrganizationsLocationsRecommendersUpdateConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsLocationsRecommendersUpdateConfigCall) 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.googlecloudrecommenderv1recommenderconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.organizations.locations.recommenders.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *OrganizationsLocationsRecommendersUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1RecommenderConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Recommender Config. This will create a new revision of the config.", + // "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.organizations.locations.recommenders.updateConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + // "location": "path", + // "pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1Insight" + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5387,12 +6234,340 @@ func (c *OrganizationsLocationsRecommendersRecommendationsMarkSucceededCall) Do( // "type": "string" // } // }, - // "path": "v1/{+name}:markSucceeded", + // "path": "v1/{+name}:markSucceeded", + // "request": { + // "$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" + // }, + // "response": { + // "$ref": "GoogleCloudRecommenderV1Recommendation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.projects.locations.insightTypes.getConfig": + +type ProjectsLocationsInsightTypesGetConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetConfig: Gets the requested InsightTypeConfig. There is only one +// instance of the config for each InsightType. +// +// - name: Name of the InsightTypeConfig to get. Acceptable formats: * +// `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TY +// PE_ID]/config` * +// `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_I +// D]/config` * +// `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSI +// GHT_TYPE_ID]/config`. +func (r *ProjectsLocationsInsightTypesService) GetConfig(name string) *ProjectsLocationsInsightTypesGetConfigCall { + c := &ProjectsLocationsInsightTypesGetConfigCall{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 *ProjectsLocationsInsightTypesGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightTypesGetConfigCall { + 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 *ProjectsLocationsInsightTypesGetConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsInsightTypesGetConfigCall { + 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 *ProjectsLocationsInsightTypesGetConfigCall) Context(ctx context.Context) *ProjectsLocationsInsightTypesGetConfigCall { + 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 *ProjectsLocationsInsightTypesGetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightTypesGetConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.projects.locations.insightTypes.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsInsightTypesGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ + 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 requested InsightTypeConfig. There is only one instance of the config for each InsightType.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "httpMethod": "GET", + // "id": "recommender.projects.locations.insightTypes.getConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/global/recommenders/[INSIGHT_TYPE_ID]/config`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.projects.locations.insightTypes.updateConfig": + +type ProjectsLocationsInsightTypesUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateConfig: Updates an InsightTypeConfig change. This will create a +// new revision of the config. +// +// - name: Name of insight type config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT +// _TYPE_ID]/config. +func (r *ProjectsLocationsInsightTypesService) UpdateConfig(name string, googlecloudrecommenderv1insighttypeconfig *GoogleCloudRecommenderV1InsightTypeConfig) *ProjectsLocationsInsightTypesUpdateConfigCall { + c := &ProjectsLocationsInsightTypesUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1insighttypeconfig = googlecloudrecommenderv1insighttypeconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *ProjectsLocationsInsightTypesUpdateConfigCall) UpdateMask(updateMask string) *ProjectsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *ProjectsLocationsInsightTypesUpdateConfigCall) ValidateOnly(validateOnly bool) *ProjectsLocationsInsightTypesUpdateConfigCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsInsightTypesUpdateConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightTypesUpdateConfigCall { + 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 *ProjectsLocationsInsightTypesUpdateConfigCall) Context(ctx context.Context) *ProjectsLocationsInsightTypesUpdateConfigCall { + 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 *ProjectsLocationsInsightTypesUpdateConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInsightTypesUpdateConfigCall) 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.googlecloudrecommenderv1insighttypeconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.projects.locations.insightTypes.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1InsightTypeConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1InsightTypeConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsInsightTypesUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1InsightTypeConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1InsightTypeConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.projects.locations.insightTypes.updateConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", // "request": { - // "$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" // }, // "response": { - // "$ref": "GoogleCloudRecommenderV1Recommendation" + // "$ref": "GoogleCloudRecommenderV1InsightTypeConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -5927,6 +7102,335 @@ func (c *ProjectsLocationsInsightTypesInsightsMarkAcceptedCall) Do(opts ...googl } +// method id "recommender.projects.locations.recommenders.getConfig": + +type ProjectsLocationsRecommendersGetConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetConfig: Gets the requested Recommender Config. There is only one +// instance of the config for each Recommender. +// +// - name: Name of the Recommendation Config to get. Acceptable formats: +// * +// `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMM +// ENDER_ID]/config` * +// `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDE +// R_ID]/config` * +// `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[ +// RECOMMENDER_ID]/config`. +func (r *ProjectsLocationsRecommendersService) GetConfig(name string) *ProjectsLocationsRecommendersGetConfigCall { + c := &ProjectsLocationsRecommendersGetConfigCall{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 *ProjectsLocationsRecommendersGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRecommendersGetConfigCall { + 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 *ProjectsLocationsRecommendersGetConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsRecommendersGetConfigCall { + 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 *ProjectsLocationsRecommendersGetConfigCall) Context(ctx context.Context) *ProjectsLocationsRecommendersGetConfigCall { + 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 *ProjectsLocationsRecommendersGetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRecommendersGetConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.projects.locations.recommenders.getConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsRecommendersGetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1RecommenderConfig{ + 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 requested Recommender Config. There is only one instance of the config for each Recommender.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "GET", + // "id": "recommender.projects.locations.recommenders.getConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "recommender.projects.locations.recommenders.updateConfig": + +type ProjectsLocationsRecommendersUpdateConfigCall struct { + s *Service + name string + googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateConfig: Updates a Recommender Config. This will create a new +// revision of the config. +// +// - name: Name of recommender config. Eg, +// projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMME +// NDER_ID]/config. +func (r *ProjectsLocationsRecommendersService) UpdateConfig(name string, googlecloudrecommenderv1recommenderconfig *GoogleCloudRecommenderV1RecommenderConfig) *ProjectsLocationsRecommendersUpdateConfigCall { + c := &ProjectsLocationsRecommendersUpdateConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudrecommenderv1recommenderconfig = googlecloudrecommenderv1recommenderconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": The list of +// fields to be updated. +func (c *ProjectsLocationsRecommendersUpdateConfigCall) UpdateMask(updateMask string) *ProjectsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, +// validate the request and preview the change, but do not actually +// update it. +func (c *ProjectsLocationsRecommendersUpdateConfigCall) ValidateOnly(validateOnly bool) *ProjectsLocationsRecommendersUpdateConfigCall { + c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRecommendersUpdateConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRecommendersUpdateConfigCall { + 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 *ProjectsLocationsRecommendersUpdateConfigCall) Context(ctx context.Context) *ProjectsLocationsRecommendersUpdateConfigCall { + 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 *ProjectsLocationsRecommendersUpdateConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRecommendersUpdateConfigCall) 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.googlecloudrecommenderv1recommenderconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "recommender.projects.locations.recommenders.updateConfig" call. +// Exactly one of *GoogleCloudRecommenderV1RecommenderConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudRecommenderV1RecommenderConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsRecommendersUpdateConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudRecommenderV1RecommenderConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &GoogleCloudRecommenderV1RecommenderConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Recommender Config. This will create a new revision of the config.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", + // "httpMethod": "PATCH", + // "id": "recommender.projects.locations.recommenders.updateConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "The list of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "validateOnly": { + // "description": "If true, validate the request and preview the change, but do not actually update it.", + // "location": "query", + // "type": "boolean" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // }, + // "response": { + // "$ref": "GoogleCloudRecommenderV1RecommenderConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "recommender.projects.locations.recommenders.recommendations.get": type ProjectsLocationsRecommendersRecommendationsGetCall struct { diff --git a/streetviewpublish/v1/streetviewpublish-api.json b/streetviewpublish/v1/streetviewpublish-api.json index cc46c606619..1886bb8a54e 100644 --- a/streetviewpublish/v1/streetviewpublish-api.json +++ b/streetviewpublish/v1/streetviewpublish-api.json @@ -533,7 +533,7 @@ } } }, - "revision": "20220623", + "revision": "20220628", "rootUrl": "https://streetviewpublish.googleapis.com/", "schemas": { "BatchDeletePhotosRequest": { @@ -1098,6 +1098,11 @@ "format": "double", "type": "number" }, + "gpsRecordTimestampUnixEpoch": { + "description": "Time of the GPS record since UTC epoch.", + "format": "google-datetime", + "type": "string" + }, "heading": { "description": "The following pose parameters pertain to the center of the photo. They match https://developers.google.com/streetview/spherical-metadata. Compass heading, measured at the center of the photo in degrees clockwise from North. Value must be \u003e=0 and \u003c360. NaN indicates an unmeasured quantity.", "format": "double", diff --git a/streetviewpublish/v1/streetviewpublish-gen.go b/streetviewpublish/v1/streetviewpublish-gen.go index 2babe1a803b..c457f4c7de3 100644 --- a/streetviewpublish/v1/streetviewpublish-gen.go +++ b/streetviewpublish/v1/streetviewpublish-gen.go @@ -1113,6 +1113,9 @@ type Pose struct { // indicates an unmeasured quantity. Altitude float64 `json:"altitude,omitempty"` + // GpsRecordTimestampUnixEpoch: Time of the GPS record since UTC epoch. + GpsRecordTimestampUnixEpoch string `json:"gpsRecordTimestampUnixEpoch,omitempty"` + // Heading: The following pose parameters pertain to the center of the // photo. They match // https://developers.google.com/streetview/spherical-metadata. Compass